more work on register preservation
This commit is contained in:
1 parent
a2c02bde97
commit
893371733b
3 files changed
+22
-15
No files matched your search
+7
-7
@@ -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
@@ -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
|
||||
Reference in new issue
Block a user