-
Notifications
You must be signed in to change notification settings - Fork 78
/
kernal_fk.txt
193 lines (115 loc) · 6.82 KB
/
kernal_fk.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
- C64 KERNAL API (Frank Kontros)
-
- C64 KERNAL jump table, composed by Frank Kontros (jeno@kontr.uzhgorod.ua).
- http://www.zimmers.net/anonftp/pub/cbm/c64/programming/documents/c64-kernal.txt
-
- Corrections (typos as well as content), translations etc.
- welcome at: https://github.com/mist64/c64ref
-
----------------------------------------------
-
# This plain text file is formatted so that it can be automatically
# parsed in order to create cross-references etc.
# * Lines starting with "-" is top-level information. The first line
# is the title. Lines starting with "--" are separators.
# * Lines starting with "#" are internal comments.
# * Hex addresses start at column 0.
# * Symbols start at column 7.
# * The description starts at column 15.
# * All lines of the description until the first blank line are
# combined into the heading.
# * The remaining text is in MarkDown format.
# The encoding is UTF-8.
$FF81 CINT init VIC & screen editor
- - - - - - A X Y
$FF84 IOINIT initialize CIA & IRQ
- - - - - - A X Y
$FF87 RAMTAS RAM test & search RAM end
- - - - - - A X Y
$FF8A RESTOR restore default I/O vectors
- - - - - - A - Y
$FF8D VECTOR read/set I/O vectors
in: C=0 moves from Y/X to vectors - X Y - X - A - Y
C=1 moves vectors to Y/X - X Y - X - A - Y
$FF90 SETMSG enable/disable KERNAL messages
in: A bit7=1 error msgs on A - - - - - A - -
bit6=1 control msgs on
$FF93 SECOND send secondary addr after listen
in: A=secondary address A - - - - - A - -
$FF96 TKSA send secondary addr after talk
in: A=secondary address A - - - - - A - -
$FF99 MEMTOP read/set top of memory
in: C=0; Y/X address - X Y - X Y - - -
out:C=1; Y/X address - - - - X Y - X Y
$FF9C MEMBOT read/set bottom of memory
in: C=0; Y/X address - X Y - X Y - - -
out:C=1; Y/X address - - - - X Y - X Y
$FF9F SCNKEY scan keyboard
- - - - - - A X Y
$FFA2 SETTMO set IEEE timeout
in: A bit7=1 disable, bit7=0 enable A - - A - - - - -
$FFA5 ACPTR input byte from SERIAL
out:A=byte, C=1 and ST=2 if timeout - - - A - - A - -
$FFA8 CIOUT output byte to SERIAL
in: A=byte, C=1 and ST=3 if timeout A - - A - - - - -
$FFAB UNTLK untalk all SERIAL devices
- - - - - - A - -
$FFAE UNLSN unlisten all SERIAL devices
- - - - - - A - -
$FFB1 LISTEN make SERIAL device listen
in: A=device number A - - - - - A - -
$FFB4 TALK make SERIAL device talk
in: A=device number A - - - - - A - -
$FFB7 READST read I/O status byte
out:A=status byte - - - A - - A - -
$FFBA SETLFS set file parameters
in: A=logical file number A X Y A X Y - - -
X=device number
Y=secondary addr
$FFBD SETNAM set file name
in: A=length of filename A X Y A X Y - - -
Y/X=pointer to name addr
$FFC0 OPEN open log.file after SETLFS,SETNAM
out:A=error# if C=1 - - - - - - A X Y
$FFC3 CLOSE close a logical file
in: A=logical file number A - - - - - A X Y
$FFC6 CHKIN open channel for input
in: X=logical file number - X - - - - A X -
$FFC9 CHKOUT open channel for output
in: X=logical file number - X - - - - A X -
$FFCC CLRCHN restore default devices
- - - - - - A X -
$FFCF CHRIN input character
out:A=character, C=1 and ST=error - - - A - - A - -
$FFD2 CHROUT output character
in: A=character, C=1 and ST=error A - - A - - - - -
$FFD5 LOAD load after call SETLFS,SETNAM
in: A=0 load, a=1 verify A X Y A X Y A X Y
Y/X = dest.addr if sec.addr=0
$FFD8 SAVE save after call SETLFS,SETNAM
in: A=zero page pointer to start.addr A X Y - - - A X Y
Y/X=ending address
$FFDB SETTIM set jiffy clock
in: A=MSB, X=middle, Y=LSB A X Y - - - - - -
$FFDE RDTIM read jiffy clock
out:A=MSB, X=middle, Y=LSB - - - A X Y A X Y
$FFE1 STOP check stop key
out:Z=0 if STOP not used; X unchanged - - - A - - A - -
Z=1 if STOP used; X changed - - - A - - A X -
A=last line of keyboard matrix
$FFE4 GETIN get a byte from channel
out:keyboard:A=0 if puffer empty - - - A - - A X Y
RS232:status byte - - - A - - A - -
serial:status byte - - - A - - A - -
tape:status byte - - - A - - A - Y
$FFE7 CLALL close or abort all files
- - - - - - A X -
$FFEA UDTIM update jiffy clock
- - - - - - A X -
$FFED SCREEN return screen size
out:X=columns, Y=rows - - - - X Y - X Y
$FFF0 PLOT read/set cursor position
in: C=0, X=row, Y=column - X Y - X Y - - -
out:C=1, X=row, Y=column - - - - X Y - X Y
$FFF3 IOBASE returns the addr of I/O devices
out:Y/X=addr($DC00) - - - - X Y - X Y