1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 23:29:39 +00:00

Do the IIgs check as documented

This commit is contained in:
Colin Leroy-Mira 2023-10-11 08:47:45 +02:00 committed by Oliver Schmidt
parent e3759a3ead
commit 39d6080945

View File

@ -314,20 +314,19 @@ SER_CLOSE:
SER_OPEN:
bit $C082 ; Check if this is a IIgs
lda $FE1F ; https://prodos8.com/docs/technote/misc/07/
cmp #$60 ; Everything but the IIgs has an RTS there
bne HardwareFound
sec
jsr $FE1F ; https://prodos8.com/docs/technote/misc/07/
bcc IIgs
; Device (hardware) not found
bit $C080
lda #SER_ERR_NO_DEVICE
lda #SER_ERR_NO_DEVICE ; Not a IIgs
SetupErrOut:
cli
ldx #$00 ; Promote char return value
stx Opened ; Mark port closed
rts
HardwareFound:
IIgs:
bit $C080
sei ; Disable interrupts