mirror of
https://github.com/cc65/cc65.git
synced 2024-09-27 04:54:54 +00:00
Do the IIgs check as documented
This commit is contained in:
parent
6ae563a4fb
commit
f891fe36d0
@ -314,20 +314,19 @@ SER_CLOSE:
|
|||||||
|
|
||||||
SER_OPEN:
|
SER_OPEN:
|
||||||
bit $C082 ; Check if this is a IIgs
|
bit $C082 ; Check if this is a IIgs
|
||||||
lda $FE1F ; https://prodos8.com/docs/technote/misc/07/
|
sec
|
||||||
cmp #$60 ; Everything but the IIgs has an RTS there
|
jsr $FE1F ; https://prodos8.com/docs/technote/misc/07/
|
||||||
bne HardwareFound
|
bcc IIgs
|
||||||
|
|
||||||
; Device (hardware) not found
|
|
||||||
bit $C080
|
bit $C080
|
||||||
lda #SER_ERR_NO_DEVICE
|
lda #SER_ERR_NO_DEVICE ; Not a IIgs
|
||||||
SetupErrOut:
|
SetupErrOut:
|
||||||
cli
|
cli
|
||||||
ldx #$00 ; Promote char return value
|
ldx #$00 ; Promote char return value
|
||||||
stx Opened ; Mark port closed
|
stx Opened ; Mark port closed
|
||||||
rts
|
rts
|
||||||
|
|
||||||
HardwareFound:
|
IIgs:
|
||||||
bit $C080
|
bit $C080
|
||||||
sei ; Disable interrupts
|
sei ; Disable interrupts
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user