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
+22 -15

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 | |
| $FFC0 | OPEN | PARTIAL | * work in progress |
| $FFC3 | CLOSE | DONE | |
| $FFC6 | CHKIN | PARTIAL | * work in progress |
| $FFC9 | CHKOUT | PARTIAL | * work in progress |
| $FFCC | CLRCHN | PARTIAL | * work in progress |
| $FFC6 | CHKIN | DONE | |
| $FFC9 | CHKOUT | PARTIAL | |
| $FFCC | CLRCHN | DONE | |
| $FFCF | CHRIN | 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 |
| $FFDB | SETTIM | NOT DONE | |
| $FFDE | RDTIM | NOT DONE | |
| $FFE1 | STOP | PARTIAL | no connection with UDTIM |
| $FFE4 | GETIN | PARTIAL | * work in progress |
| $FFE7 | CLALL | PARTIAL | * work in progress |
| $FFE7 | CLALL | DONE | |
| $FFEA | UDTIM | NOT DONE | |
| $FFED | SCREEN | DONE | |
| $FFF0 | PLOT | NOT DONE | |
+7 -7
View File
@@ -8,11 +8,11 @@
;; 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.
;; If from keyboard, then it gets a whole line of input, and returns the first char.
;; Repeated calls after that read out the successive bytes of the line of input.
;; Reads a byte of input, unless from keyboard.
;; If from keyboard, then it gets a whole line of input, and returns the first char.
;; Repeated calls after that read out the successive bytes of the line of input.
chrin:
;; First determine the device number
@@ -202,7 +202,7 @@ not_shifted:
clc
adc #$40
;; FALLTROUGH
not_vendor:
rts
not_vendor:
rts
+10 -3
View File
@@ -8,20 +8,27 @@
;; CPU registers that has to be preserved (see [RG64]): .Y
;;
;; XXX currently does not preserve register Y, to be fixed!
clall:
;; Store .Y register
tya
pha
;; 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
;; it's channels, see CLALL description in the IDE64 User's Guide
*
ldy LDTND
beq +
dey
lda LAT, y
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
jmp clrchn