several IEC routines now properly preserve X/Y registers
This commit is contained in:
1 parent
eb8eefff82
commit
f26431b502
14 files changed
+98
-85
No files matched your search
@@ -0,0 +1,38 @@
|
||||
|
||||
;;
|
||||
;; Helper routines to return with error/success
|
||||
;;
|
||||
;; All of them restore X/Y registers from stack,
|
||||
;; they take care about Carry flag,
|
||||
;; error return reeset IEC line to default state,
|
||||
;; take care about .A and IOSTATUS
|
||||
;;
|
||||
|
||||
iec_return_success:
|
||||
|
||||
;; BSOUR is certainly not valid anymore
|
||||
lda #$00
|
||||
sta C3PO
|
||||
;; Restore registers
|
||||
pla
|
||||
tay
|
||||
pla
|
||||
tax
|
||||
;; Report success
|
||||
clc
|
||||
rts
|
||||
|
||||
iec_return_DEVICE_NOT_FOUND:
|
||||
|
||||
;; Set IEC line to normal idle state
|
||||
jsr iec_set_idle
|
||||
;; BSOUR is certainly not valid anymore
|
||||
lda #$00
|
||||
sta C3PO
|
||||
;; Restore registers
|
||||
pla
|
||||
tay
|
||||
pla
|
||||
tax
|
||||
;; Report error
|
||||
jmp kernalerror_DEVICE_NOT_FOUND
|
||||
Reference in new issue
Block a user