more work on register preservation

This commit is contained in:
FeralChild64 committed 2019-07-25 18:12:39 +02:00
1 parent a2c02bde97
commit 893371733b
3 files changed
+18 -11

No files matched your search

+5 -5
View File
@@ -90,18 +90,18 @@ NOTE: Even the 'DONE' routines won't support features described as missing in on
| $FFBD | SETNAM | DONE | | | $FFBD | SETNAM | DONE | |
| $FFC0 | OPEN | PARTIAL | * work in progress | | $FFC0 | OPEN | PARTIAL | * work in progress |
| $FFC3 | CLOSE | DONE | | | $FFC3 | CLOSE | DONE | |
| $FFC6 | CHKIN | PARTIAL | * work in progress | | $FFC6 | CHKIN | DONE | |
| $FFC9 | CHKOUT | PARTIAL | * work in progress | | $FFC9 | CHKOUT | PARTIAL | |
| $FFCC | CLRCHN | PARTIAL | * work in progress | | $FFCC | CLRCHN | DONE | |
| $FFCF | CHRIN | PARTIAL | | | $FFCF | CHRIN | PARTIAL | |
| $FFD2 | CHROUT | PARTIAL | | | $FFD2 | CHROUT | PARTIAL | |
| $FFD5 | LOAD | PARTIAL | no VERIFY support yet | | $FFD5 | LOAD | PARTIAL | * work in progress, no VERIFY support yet |
| $FFD8 | SAVE | NOT DONE | * work in progress | | $FFD8 | SAVE | NOT DONE | * work in progress |
| $FFDB | SETTIM | NOT DONE | | | $FFDB | SETTIM | NOT DONE | |
| $FFDE | RDTIM | NOT DONE | | | $FFDE | RDTIM | NOT DONE | |
| $FFE1 | STOP | PARTIAL | no connection with UDTIM | | $FFE1 | STOP | PARTIAL | no connection with UDTIM |
| $FFE4 | GETIN | PARTIAL | * work in progress | | $FFE4 | GETIN | PARTIAL | * work in progress |
| $FFE7 | CLALL | PARTIAL | * work in progress | | $FFE7 | CLALL | DONE | |
| $FFEA | UDTIM | NOT DONE | | | $FFEA | UDTIM | NOT DONE | |
| $FFED | SCREEN | DONE | | | $FFED | SCREEN | DONE | |
| $FFF0 | PLOT | NOT DONE | | | $FFF0 | PLOT | NOT DONE | |
+3 -3
View File
@@ -8,7 +8,7 @@
;; CPU registers that has to be preserved (see [RG64]): .Y ;; CPU registers that has to be preserved (see [RG64]): .Y
;; ;;
;; XXX currently does not preserve register Y, to be fixed! ;; XXX keyboard part currently does not preserve register Y, to be fixed!
;; Reads a byte of input, unless from keyboard. ;; Reads a byte of input, unless from keyboard.
;; If from keyboard, then it gets a whole line of input, and returns the first char. ;; If from keyboard, then it gets a whole line of input, and returns the first char.
@@ -202,7 +202,7 @@ not_shifted:
clc clc
adc #$40 adc #$40
rts ;; FALLTROUGH
not_vendor: not_vendor:
rts rts
+10 -3
View File
@@ -8,20 +8,27 @@
;; CPU registers that has to be preserved (see [RG64]): .Y ;; CPU registers that has to be preserved (see [RG64]): .Y
;; ;;
;; XXX currently does not preserve register Y, to be fixed!
clall: clall:
;; Store .Y register
tya
pha
;; Original routine probably just sets LDTND to 0, but this is not really safe, ;; Original routine probably just sets LDTND to 0, but this is not really safe,
;; so we actually close all the channels; at least IDE64 does the same for ;; so we actually close all the channels; at least IDE64 does the same for
;; it's channels, see CLALL description in the IDE64 User's Guide ;; it's channels, see CLALL description in the IDE64 User's Guide
*
ldy LDTND ldy LDTND
beq + beq +
dey dey
lda LAT, y lda LAT, y
jsr close ; XXX jump through ICLOSE? jsr close ; XXX jump through ICLOSE?
jmp clall jmp -
* *
;; Restore .Y register
pla
tay
;; 'C64 Programmers Reference Guide', page 281, claims it calls CLRCHN too ;; 'C64 Programmers Reference Guide', page 281, claims it calls CLRCHN too
jmp clrchn jmp clrchn