more comments, slightly safer IEC
This commit is contained in:
1 parent
6bf715e610
commit
47019cc25d
12 files changed
+102
-12
No files matched your search
BIN
Binary file not shown.
+10
-1
@@ -1,3 +1,12 @@
|
||||
; Function defined on pp272-273 of C64 Programmers Reference Guide
|
||||
|
||||
;;
|
||||
;; Official Kernal routine, described in:
|
||||
;;
|
||||
;; - [RG64] C64 Programmer's Reference Guide - page 274
|
||||
;; - [CM64] Compute's Mapping the Commodore 64 - page 224/225
|
||||
;;
|
||||
;; CPU registers that has to be preserved (see [RG64]): .Y
|
||||
;;
|
||||
|
||||
acptr:
|
||||
rts
|
||||
+9
-1
@@ -1,4 +1,12 @@
|
||||
; Function defined on pp272-273 of C64 Programmers Reference Guide
|
||||
|
||||
;;
|
||||
;; Official Kernal routine, described in:
|
||||
;;
|
||||
;; - [RG64] C64 Programmer's Reference Guide - page 275
|
||||
;; - [CM64] Compute's Mapping the Commodore 64 - page 229
|
||||
;;
|
||||
;; CPU registers that has to be preserved (see [RG64]): .Y
|
||||
;;
|
||||
|
||||
chkin:
|
||||
|
||||
|
||||
+9
-1
@@ -1,4 +1,12 @@
|
||||
; Function defined on pp272-273 of C64 Programmers Reference Guide
|
||||
|
||||
;;
|
||||
;; Official Kernal routine, described in:
|
||||
;;
|
||||
;; - [RG64] C64 Programmer's Reference Guide - page 276
|
||||
;; - [CM64] Compute's Mapping the Commodore 64 - page 229
|
||||
;;
|
||||
;; CPU registers that has to be preserved (see [RG64]): .Y
|
||||
;;
|
||||
|
||||
chkout:
|
||||
|
||||
|
||||
+11
-2
@@ -1,5 +1,14 @@
|
||||
; Function defined on pp272-273 of C64 Programmers Reference Guide
|
||||
;; Compute's Mapping the 64, p228
|
||||
|
||||
;;
|
||||
;; Official Kernal routine, described in:
|
||||
;;
|
||||
;; - [RG64] C64 Programmer's Reference Guide - page 277/278
|
||||
;; - [CM64] Compute's Mapping the Commodore 64 - page 228
|
||||
;;
|
||||
;; CPU registers that has to be preserved (see [RG64]): .Y
|
||||
;;
|
||||
|
||||
|
||||
;; 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.
|
||||
|
||||
+11
-1
@@ -1,4 +1,14 @@
|
||||
; Function defined on pp272-273 of C64 Programmers Reference Guide
|
||||
|
||||
;;
|
||||
;; Official Kernal routine, described in:
|
||||
;;
|
||||
;; - [RG64] C64 Programmer's Reference Guide - page 278/279
|
||||
;; - [CM64] Compute's Mapping the Commodore 64 - page 228
|
||||
;;
|
||||
;; CPU registers that has to be preserved (see [RG64]): .Y
|
||||
;;
|
||||
|
||||
|
||||
chrout:
|
||||
;; Crude implementation of character output
|
||||
|
||||
|
||||
+11
-2
@@ -1,5 +1,14 @@
|
||||
;; Function defined on pp272-273 of C64 Programmers Reference Guide
|
||||
;; Compute's Mapping the 64 p215
|
||||
|
||||
;;
|
||||
;; Official Kernal routine, described in:
|
||||
;;
|
||||
;; - [RG64] C64 Programmer's Reference Guide - page 280
|
||||
;; - [CM64] Compute's Mapping the Commodore 64 - page 242
|
||||
;;
|
||||
;; CPU registers that has to be preserved (see [RG64]): none
|
||||
;;
|
||||
|
||||
|
||||
cint:
|
||||
jsr setup_vicii
|
||||
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
; Function defined on pp272-273 of C64 Programmers Reference Guide
|
||||
|
||||
;;
|
||||
;; Official Kernal routine, described in:
|
||||
;;
|
||||
;; - [RG64] C64 Programmer's Reference Guide - page 285
|
||||
;; - [CM64] Compute's Mapping the Commodore 64 - page 238
|
||||
;;
|
||||
;; CPU registers that has to be preserved (see [RG64]): none
|
||||
;;
|
||||
|
||||
ioinit:
|
||||
|
||||
; Set $00/$01 port mode and value
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
|
||||
iec_turnaround_to_listen:
|
||||
|
||||
;; Timing is critical here - execute on disabled IRQs
|
||||
php
|
||||
sei
|
||||
|
||||
;; Pull DATA, release CLK and ATN (we are not sending commands)
|
||||
jsr iec_pull_data_release_atn_clk
|
||||
|
||||
@@ -17,11 +21,13 @@ iec_turnaround_to_listen:
|
||||
bne -
|
||||
|
||||
;; Timeout
|
||||
plp
|
||||
sec
|
||||
rts
|
||||
|
||||
;; CLK is pulled by the device, OK
|
||||
*
|
||||
*
|
||||
plp
|
||||
clc
|
||||
rts
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
|
||||
iec_turnaround_to_talk:
|
||||
|
||||
;; Timing is critical here - execute on disabled IRQs
|
||||
php
|
||||
sei
|
||||
|
||||
;; First make sure both CLK, DATA and ATN are released at our side
|
||||
jsr iec_release_atn
|
||||
jsr iec_release_clk_data
|
||||
@@ -14,5 +18,6 @@ iec_turnaround_to_talk:
|
||||
;; Pull CLK line, it should be held by talker
|
||||
jsr iec_pull_clk_release_data
|
||||
|
||||
plp
|
||||
clc
|
||||
rts
|
||||
+10
-1
@@ -1,4 +1,13 @@
|
||||
; Function defined on pp272-273 of C64 Programmers Reference Guide
|
||||
|
||||
;;
|
||||
;; Official Kernal routine, described in:
|
||||
;;
|
||||
;; - [RG64] C64 Programmer's Reference Guide - page 291
|
||||
;; - [CM64] Compute's Mapping the Commodore 64 - page 237
|
||||
;;
|
||||
;; CPU registers that has to be preserved (see [RG64]): none
|
||||
;;
|
||||
|
||||
ramtas:
|
||||
; C64 Programmer's Reference guide p291:
|
||||
; Clear $0000-$0101, $0200-$03ff
|
||||
|
||||
+9
-1
@@ -1,4 +1,12 @@
|
||||
; Functions defined on pp272-273 of C64 Programmers Reference Guide
|
||||
|
||||
;;
|
||||
;; Official Kernal routine, described in:
|
||||
;;
|
||||
;; - [RG64] C64 Programmer's Reference Guide - page 293 (RESTOR), 304 (VECTOR)
|
||||
;; - [CM64] Compute's Mapping the Commodore 64 - page 237
|
||||
;;
|
||||
;; CPU registers that has to be preserved (see [RG64]): none
|
||||
;;
|
||||
|
||||
restor:
|
||||
|
||||
|
||||
Reference in new issue
Block a user