more routines placed under compatible addresses
This commit is contained in:
1 parent
802890ff9c
commit
9187e3e601
11 files changed
+56
-29
No files matched your search
@@ -14,7 +14,7 @@
|
|||||||
;; 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.
|
||||||
;; Repeated calls after that read out the successive bytes of the line of input.
|
;; Repeated calls after that read out the successive bytes of the line of input.
|
||||||
|
|
||||||
chrin:
|
chrin_real:
|
||||||
|
|
||||||
;; Determine the device number
|
;; Determine the device number
|
||||||
lda DFLTN
|
lda DFLTN
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
||||||
chrout:
|
chrout_real:
|
||||||
|
|
||||||
sta last_printed_character_ascii
|
sta last_printed_character_ascii
|
||||||
|
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
||||||
clall:
|
clall_real:
|
||||||
|
|
||||||
;; Store .Y register
|
;; Store .Y register
|
||||||
tya
|
tya
|
||||||
@@ -23,7 +23,7 @@ clall:
|
|||||||
beq +
|
beq +
|
||||||
dey
|
dey
|
||||||
lda LAT, y
|
lda LAT, y
|
||||||
jsr close ; XXX jump through ICLOSE?
|
jsr JCLOSE
|
||||||
jmp -
|
jmp -
|
||||||
*
|
*
|
||||||
;; Restore .Y register
|
;; Restore .Y register
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
|
||||||
|
|
||||||
|
;; Common ppart of CLOSE and LOAD routines
|
||||||
|
|
||||||
|
close_load:
|
||||||
|
|
||||||
|
tax
|
||||||
|
|
||||||
|
;; Command drive to stop talking and to close the file
|
||||||
|
jsr untlk
|
||||||
|
|
||||||
|
txa
|
||||||
|
jsr listen
|
||||||
|
|
||||||
|
lda #$E0 ; CLOSE command
|
||||||
|
sta IEC_TMP2
|
||||||
|
jsr iec_tx_command
|
||||||
|
jsr iec_tx_command_finalize
|
||||||
|
|
||||||
|
;; Tell drive to unlisten
|
||||||
|
jsr unlsn
|
||||||
|
|
||||||
|
rts
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
||||||
clrchn:
|
clrchn_real:
|
||||||
|
|
||||||
;; Handle IEC input device
|
;; Handle IEC input device
|
||||||
lda DFLTN
|
lda DFLTN
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
;; Our implementation is longer than the original one,
|
||||||
|
;; placing it here would cause a collision with CHROUT
|
||||||
|
|
||||||
|
chrin:
|
||||||
|
jmp chrin_real
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
;; Our implementation is longer than the original one,
|
||||||
|
;; placing it here would cause a collision with CHKIN
|
||||||
|
|
||||||
|
chrout:
|
||||||
|
jmp chrout_real
|
||||||
+1
-21
@@ -38,7 +38,7 @@ close:
|
|||||||
jsr iec_tx_command
|
jsr iec_tx_command
|
||||||
bcs close_remove_from_table
|
bcs close_remove_from_table
|
||||||
jsr iec_tx_command_finalize
|
jsr iec_tx_command_finalize
|
||||||
|
|
||||||
close_remove_from_table:
|
close_remove_from_table:
|
||||||
;; Remove channel from the table
|
;; Remove channel from the table
|
||||||
iny
|
iny
|
||||||
@@ -62,23 +62,3 @@ close_error_not_found:
|
|||||||
|
|
||||||
sec ; report success - not sure if original CLOSE does this, but it's nevertheless a good practice
|
sec ; report success - not sure if original CLOSE does this, but it's nevertheless a good practice
|
||||||
rts
|
rts
|
||||||
|
|
||||||
close_load: ; entry also for LOAD routine
|
|
||||||
|
|
||||||
tax
|
|
||||||
|
|
||||||
;; Command drive to stop talking and to close the file
|
|
||||||
jsr untlk
|
|
||||||
|
|
||||||
txa
|
|
||||||
jsr listen
|
|
||||||
|
|
||||||
lda #$E0 ; CLOSE command
|
|
||||||
sta IEC_TMP2
|
|
||||||
jsr iec_tx_command
|
|
||||||
jsr iec_tx_command_finalize
|
|
||||||
|
|
||||||
;; Tell drive to unlisten
|
|
||||||
jsr unlsn
|
|
||||||
|
|
||||||
rts
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
;; Our implementation is longer than the original one,
|
||||||
|
;; placing it here would cause a collision with CLRCHN
|
||||||
|
|
||||||
|
clall:
|
||||||
|
jmp clall_real
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
;; Our implementation is longer than the original one,
|
||||||
|
;; placing it here would cause a collision with OPEN
|
||||||
|
|
||||||
|
clrchn:
|
||||||
|
jmp clrchn_real
|
||||||
@@ -10,14 +10,14 @@ vector_defaults:
|
|||||||
.word default_irq_handler ;; CINV
|
.word default_irq_handler ;; CINV
|
||||||
.word $0000 ;; CBINV XXX implement this, has to be $FE66 for autostart support
|
.word $0000 ;; CBINV XXX implement this, has to be $FE66 for autostart support
|
||||||
.word $0000 ;; NMINV XXX implement this, has to be $FE47 for autostart support
|
.word $0000 ;; NMINV XXX implement this, has to be $FE47 for autostart support
|
||||||
|
|
||||||
.word open ;; IOPEN
|
.word open ;; IOPEN
|
||||||
.word close ;; ICLOSE
|
.word close ;; ICLOSE
|
||||||
.word chkin ;; ICHKIN XXX move routine to $F20E - for autostart support
|
.word chkin ;; ICHKIN XXX move routine to $F20E - for autostart support
|
||||||
.word ckout ;; ICKOUT XXX move routine to $F250 - for autostart support
|
.word ckout ;; ICKOUT XXX move routine to $F250 - for autostart support
|
||||||
.word clrchn ;; ICLRCH XXX move routine to $F333 - for autostart support
|
.word clrchn ;; ICLRCH
|
||||||
.word chrin ;; IBASIN
|
.word chrin ;; IBASIN
|
||||||
.word chrout ;; IBSOUT XXX move routine to $F1CA - for autostart support
|
.word chrout ;; IBSOUT
|
||||||
.word stop ;; ISTOP
|
.word stop ;; ISTOP
|
||||||
.word getin ;; IGETIN
|
.word getin ;; IGETIN
|
||||||
.word clall ;; ICLALL
|
.word clall ;; ICLALL
|
||||||
|
|||||||
Reference in new issue
Block a user