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

***************************
*
*
*
APPLE II
*
*
SYSTEM MONITOR
*
*
*
*
COPYRIGHT 1977 BY
*
*
APPLE COMPUTER, INC. *
*
*
*
ALL RIGHTS RESERVED
*
*
*
*
S. WOZNIAK
*
*
A. BAUM
*
*
*
***************************
; TITLE "APPLE II SYSTEM MONITOR"
LOC0
EQU
$00
LOC1
EQU
$01
WNDLFT
EQU
$20
WNDWDTH EQU
$21
WNDTOP
EQU
$22
WNDBTM
EQU
$23
CH
EQU
$24
CV
EQU
$25
GBASL
EQU
$26
GBASH
EQU
$27
BASL
EQU
$28
BASH
EQU
$29
BAS2L
EQU
$2A
BAS2H
EQU
$2B
H2
EQU
$2C
LMNEM
EQU
$2C
RTNL
EQU
$2C
V2
EQU
$2D
RMNEM
EQU
$2D
RTNH
EQU
$2D
MASK
EQU
$2E
CHKSUM
EQU
$2E
FORMAT
EQU
$2E
LASTIN
EQU
$2F
LENGTH
EQU
$2F
SIGN
EQU
$2F
COLOR
EQU
$30
MODE
EQU
$31
INVFLG
EQU
$32
PROMPT
EQU
$33
YSAV
EQU
$34
YSAV1
EQU
$35
CSWL
EQU
$36
CSWH
EQU
$37
KSWL
EQU
$38
KSWH
EQU
$39
PCL
EQU
$3A
PCH
EQU
$3B
XQT
EQU
$3C
A1L
EQU
$3C
A1H
EQU
$3D
A2L
EQU
$3E
A2H
EQU
$3F

F800:
F801:
F802:
F805:
F806:
F808:
F80A:
F80C:
F80E:
F810:
F812:
F814:
F816:
F818:
F819:

4A
08
20
28
A9
90
69
85
B1
45
25
51
91
60
20

47 F8
0F
02
E0
2E
26
30
2E
26
26
00 F8

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

A3L
A3H
A4L
A4H
A5L
A5H
ACC
XREG
YREG
STATUS
SPNT
RNDL
RNDH
ACL
ACH
XTNDL
XTNDH
AUXL
AUXH
PICK
IN
USRADR
NMI
IRQLOC
IOADR
KBD
KBDSTRB
TAPEOUT
SPKR
TXTCLR
TXTSET
MIXCLR
MIXSET
LOWSCR
HISCR
LORES
HIRES
TAPEIN
PADDL0
PTRIG
BASIC
BASIC2
PLOT

RTMASK
PLOT1

HLINE

EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
ORG
LSR
PHP
JSR
PLP
LDA
BCC
ADC
STA
LDA
EOR
AND
EOR
STA
RTS
JSR

$40
$41
$42
$43
$44
$45
$45
$46
$47
$48
$49
$4E
$4F
$50
$51
$52
$53
$54
$55
$95
$0200
$03F8
$03FB
$03FE
$C000
$C000
$C010
$C020
$C030
$C050
$C051
$C052
$C053
$C054
$C055
$C056
$C057
$C060
$C064
$C070
$E000
$E003
$F800
GBASCALC

;ROM START ADDRESS
;Y-COORD/2
;SAVE LSB IN CARRY
;CALC BASE ADR IN GBASL,H
;RESTORE LSB FROM CARRY
;MASK $0F IF EVEN

#$0F
RTMASK
#$E0
MASK
(GBASL),Y
COLOR
MASK
(GBASL),Y
(GBASL),Y

;DATA
; EOR COLOR
; AND MASK
;
EOR DATA
;
TO DATA

PLOT

;PLOT SQUARE

;MASK $F0 IF ODD

F81C:
F81E:
F820:
F821:
F824:
F826:
F828:
F829:
F82C:
F82D:
F82F:
F831:
F832:
F834:
F836:
F838:

C4
B0
C8
20
90
69
48
20
68
C5
90
60
A0
D0
A0
84

2C
11

F83A:
F83C:
F83E:
F840:
F843:
F844:
F846:
F847:
F848:
F849:
F84B:
F84D:
F84F:
F850:
F852:
F854:
F856:
F858:
F859:
F85A:
F85C:
F85E:
F85F:
F861:
F862:
F864:
F866:
F868:
F869:
F86A:
F86B:
F86C:
F86E:
F870:
F871:
F872:
F873:
F876:
F878:
F879:
F87B:

A0
A9
85
20
88
10
60
48
4A
29
09
85
68
29
90
69
85
0A
0A
05
85
60
A5
18
69
29
85
0A
0A
0A
0A
05
85
60
4A
08
20
B1
28
90
4A

27
00
30
28 F8

0E F8
F6
01
00 F8
2D
F5
2F
02
27
2D

F6

03
04
27
18
02
7F
26
26
26
30
03
0F
30

30
30

47 F8
26
04

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

HLINE1

VLINEZ
VLINE

RTS1
CLRSCR
CLRTOP
CLRSC2

CPY
BCS
INY
JSR
BCC
ADC
PHA
JSR
PLA
CMP
BCC
RTS
LDY
BNE
LDY
STY

LDY
LDA
STA
JSR
DEY
BPL
RTS
GBASCALC PHA
LSR
AND
ORA
STA
PLA
AND
BCC
ADC
GBCALC
STA
ASL
ASL
ORA
STA
RTS
NXTCOL
LDA
CLC
ADC
SETCOL
AND
STA
ASL
ASL
ASL
ASL
ORA
STA
RTS
SCRN
LSR
PHP
JSR
LDA
PLP
SCRN2
BCC
LSR
CLRSC3

H2
RTS1

PLOT

;DONE?
; YES, RETURN
; NO, INC INDEX (X-COORD)
;PLOT NEXT SQUARE
;ALWAYS TAKEN
;NEXT Y-COORD
; SAVE ON STACK
; PLOT SQUARE

V2
VLINEZ

;DONE?
; NO, LOOP

#$2F
CLRSC2
#$27
V2

;MAX Y, FULL SCRN CLR
;ALWAYS TAKEN
;MAX Y, TOP SCREEN CLR
;STORE AS BOTTOM COORD
; FOR VLINE CALLS
;RIGHTMOST X-COORD (COLUMN)
;TOP COORD FOR VLINE CALLS
;CLEAR COLOR (BLACK)
;DRAW VLINE
;NEXT LEFTMOST X-COORD
;LOOP UNTIL DONE

PLOT1
HLINE1
#$01

#$27
#$00
COLOR
VLINE
CLRSC3

;FOR INPUT 000DEFGH
#$03
#$04
GBASH
#$18
GBCALC
#$7F
GBASL

;

GENERATE GBASH=000001FG

;

AND GBASL=HDEDE000

GBASL
GBASL
COLOR

;INCREMENT COLOR BY 3

#$03
#$0F
COLOR

;SETS COLOR=17*A MOD 16
;BOTH HALF BYTES OF COLOR EQUAL

COLOR
COLOR

GBASCALC
(GBASL),Y
RTMSKZ

;READ SCREEN Y-COORD/2
;SAVE LSB (CARRY)
;CALC BASE ADDRESS
;GET BYTE
;RESTORE LSB FROM CARRY
;IF EVEN, USE LO H

F87C:
F87D:
F87E:
F87F:
F881:
F882:
F884:
F886:
F889:
F88C:
F88E:
F88F:
F890:
F892:
F893:
F895:
F897:
F899:
F89B:
F89C:
F89D:
F8A0:
F8A3:
F8A5:
F8A7:
F8A9:
F8AA:
F8AD:
F8AF:

4A
4A
4A
29
60
A6
A4
20
20
A1
A8
4A
90
6A
B0
C9
F0
29
4A
AA
BD
20
D0
A0
A9
AA
BD
85
29

F8B1:
F8B3:
F8B4:
F8B6:
F8B7:
F8B8:
F8BA:
F8BC:
F8BE:
F8BF:
F8C1:
F8C2:
F8C3:
F8C5:
F8C6:
F8C8:
F8C9:
F8CA:
F8CC:
F8CD:
F8D0:
F8D3:
F8D4:
F8D6:
F8D9:
F8DB:
F8DE:
F8E0:

85
98
29
AA
98
A0
E0
F0
4A
90
4A
4A
09
88
D0
C8
88
D0
60
FF
20
48
B1
20
A2
20
C4
C8

0F
3A
3B
96 FD
48 F9
3A
09
10
A2
0C
87
62 F9
79 F8
04
80
00
A6 F9
2E
03
2F
8F
03
8A
0B
08
20
FA
F2
FF FF
82 F8
3A
DA FD
01
4A F9
2F

175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232

RTMSKZ
INSDS1

INSDS2

IEVEN

ERR
GETFMT

MNNDX1
MNNDX2

MNNDX3

INSTDSP
PRNTOP
PRNTBL

LSR
LSR
LSR
AND
RTS
LDX
LDY
JSR
JSR
LDA
TAY
LSR
BCC
ROR
BCS
CMP
BEQ
AND
LSR
TAX
LDA
JSR
BNE
LDY
LDA
TAX
LDA
STA
AND
STA
TYA
AND
TAX
TYA
LDY
CPX
BEQ
LSR
BCC
LSR
LSR
ORA
DEY
BNE
INY
DEY
BNE
RTS
DFB
JSR
PHA
LDA
JSR
LDX
JSR
CPY
INY

;SHIFT HIGH HALF BYTE DOWN
#$0F

;MASK 4-BITS

PCL
PCH
PRYX2
PRBLNK
(PCL,X)

;PRINT PCL,H

IEVEN
ERR
#$A2
ERR
#$87

;FOLLOWED BY A BLANK
;GET OP CODE
;EVEN/ODD TEST
;BIT 1 TEST
;XXXXXX11 INVALID OP
;OPCODE $89 INVALID
;MASK BITS
;LSB INTO CARRY FOR L/R TEST

FMT1,X
SCRN2
GETFMT
#$80
#$00

;GET FORMAT INDEX BYTE
;R/L H-BYTE ON CARRY

FMT2,X
FORMAT
#$03

;INDEX INTO PRINT FORMAT TABLE
;SAVE FOR ADR FIELD FORMATTING
;MASK FOR 2-BIT LENGTH
; (P=1 BYTE, 1=2 BYTE, 2=3 BYTE)

LENGTH
#$8F

;SUBSTITUTE $80 FOR INVALID OPS
;SET PRINT FORMAT INDEX TO 0

;OPCODE
;MASK FOR 1XXX1010 TEST
; SAVE IT
;OPCODE TO A AGAIN

#$03
#$8A
MNNDX3
MNNDX3
#$20
MNNDX2

;FORM INDEX INTO MNEMONIC TABLE
;1)
;2)
;3)
;4)
;5)

1XXX1010->00101XXX
XXXYYY01->00111XXX
XXXYYY10->00110XXX
XXXYY100->00100XXX
XXXXX000->000XXXXX

MNNDX1
$FF,$FF,$FF
INSDS1
;GEN FMT, LEN BYTES
;SAVE MNEMONIC TABLE INDEX
(PCL),Y
PRBYTE
#$01
;PRINT 2 BLANKS
PRBL2
LENGTH
;PRINT INST (1-3 BYTES)
;IN A 12 CHR FIELD

F8E1:
F8E3:
F8E5:
F8E7:
F8E9:
F8EA:
F8EB:
F8EE:
F8F0:
F8F3:
F8F5:
F8F7:
F8F9:
F8FB:
F8FD:
F8FE:
F8FF:
F901:
F903:
F906:
F907:
F909:
F90C:
F90E:
F910:
F912:
F914:
F916:
F918:
F91B:
F91E:
F921:
F923:
F926:
F927:
F929:
F92A:
F92B:
F92D:
F930:
F932:
F934:
F936:
F938:
F93B:
F93C:
F93D:
F93F:
F940:
F941:
F944:
F945:
F948:
F94A:
F94C:
F94F:
F950:
F952:

90
A2
C0
90
68
A8
B9
85
B9
85
A9
A0
06
26
2A
88
D0
69
20
CA
D0
20
A4
A2
E0
F0
06
90
BD
20
BD
F0
20
CA
D0
60
88
30
20
A5
C9
B1
90
20
AA
E8
D0
C8
98
20
8A
4C
A2
A9
20
CA
D0
60

F1
03
04
F2
C0 F9
2C
00 FA
2D
00
05
2D
2C
F8
BF
ED FD
EC
48
2F
06
03
1C
2E
0E
B3
ED
B9
03
ED

F9

F9
FD
F9
FD

E7
E7
DA FD
2E
E8
3A
F2
56 F9
01
DA FD
DA FD
03
A0
ED FD
F8

233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290

PRMN1
PRMN2

PRADR1
PRADR2

PRADR3
PRADR4
PRADR5

RELADR

PRNTYX
PRNTAX
PRNTX
PRBLNK
PRBL2
PRBL3

BCC
LDX
CPY
BCC
PLA
TAY
LDA
STA
LDA
STA
LDA
LDY
ASL
ROL
ROL
DEY
BNE
ADC
JSR
DEX
BNE
JSR
LDY
LDX
CPX
BEQ
ASL
BCC
LDA
JSR
LDA
BEQ
JSR
DEX
BNE
RTS
DEY
BMI
JSR
LDA
CMP
LDA
BCC
JSR
TAX
INX
BNE
INY
TYA
JSR
TXA
JMP
LDX
LDA
JSR
DEX
BNE
RTS

PRNTOP
#$03
#$04
PRNTBL
MNEML,Y
LMNEM
MNEMR,Y
RMNEM
#$00
#$05
RMNEM
LMNEM
PRMN2
#$BF
COUT
PRMN1
PRBLNK
LENGTH
#$06
#$03
PRADR5
FORMAT
PRADR3
CHAR1-1,X
COUT
CHAR2-1,X
PRADR3
COUT

;CHAR COUNT FOR MNEMONIC PRINT
;RECOVER MNEMONIC INDEX
;FETCH 3-CHAR MNEMONIC
; (PACKED IN 2-BYTES)

;SHIFT 5 BITS OF
; CHARACTER INTO A
;
(CLEARS CARRY)
;ADD "?" OFFSET
;OUTPUT A CHAR OF MNEM
;OUTPUT 3 BLANKS
;CNT FOR 6 FORMAT BITS
;IF X=3 THEN ADDR.

PRADR1
PRADR2
PRBYTE
FORMAT
#$E8
(PCL),Y
PRADR4
PCADJ3

;HANDLE REL ADR MODE
;SPECIAL (PRINT TARGET,
; NOT OFFSET)
;PCL,PCH+OFFSET+1 TO A,Y

PRNTYX

;+1 TO Y,X

PRBYTE

;OUTPUT TARGET ADR
; OF BRANCH AND RETURN

PRBYTE
#$03
#$A0
COUT

;BLANK COUNT
;LOAD A SPACE
;OUTPUT A BLANK

PRBL2

;LOOP UNTIL COUNT=0

F953:
F954:
F956:
F958:
F959:
F95B:
F95C:
F95E:
F960:
F961:

38
A5
A4
AA
10
88
65
90
C8
60

F962:
F965:
F967:
F96A:
F96C:
F96F:
F971:
F974:
F976:
F979:
F97B:
F97E:
F980:
F983:
F985:
F988:
F98A:
F98D:
F98F:
F992:
F994:
F997:
F999:
F99C:
F99E:
F9A1:
F9A2:
F9A5:
F9A6:
F9A7:
F9A8:
F9A9:
F9AA:
F9AB:
F9AC:
F9AD:
F9AE:
F9AF:
F9B0:
F9B1:
F9B2:
F9B3:
F9B4:
F9B7:

04
30
80
03
54
80
90
54
0D
90
20
0D
04
22
33
44
11
33
C8
01
44
80
90
44
0D
90
26
9A
00
21
81
82
00
00
59
4D
91
92
86
4A
85
9D
AC
A3

54

291
292
293
294
295
296
297
298
299
300
301
302
303
304
305

90

306

DFB

$80,$04,$90,$03,$22

0D

307

DFB

$54,$33,$0D,$80,$04

20

308

DFB

$90,$04,$20,$54,$33

04

309

DFB

$0D,$80,$04,$90,$04

3B

310

DFB

$20,$54,$3B,$0D,$80

00

311

DFB

$04,$90,$00,$22,$44

C8

312

DFB

$33,$0D,$C8,$44,$00

44

313

DFB

$11,$22,$44,$33,$0D

A9

314

DFB

$C8,$44,$A9,$01,$22

0D

315

DFB

$44,$33,$0D,$80,$04

22

316

DFB

$90,$01,$22,$44,$33

04

317

DFB

$0D,$80,$04,$90

31 87

318

DFB

$26,$31,$87,$9A ;$ZZXXXY01 INSTR'S

DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
ASC

$00
$21
$81
$82
$00
$00
$59
$4D
$91
$92
$86
$4A
$85
$9D
",),#($"

2F
3B
01
3A
01

20
0D
04
22
33
04
04
33
80
04
54
80
90
44
0D
00
22
0D
44
22
33
04
01
33
80

A9 AC
A8 A4

319
320
321
322
323
324
325
326
327
328
329
330
331
332
333

PCADJ
PCADJ2
PCADJ3

SEC
LDA
LDY
TAX
BPL
DEY
PCADJ4
ADC
BCC
INY
RTS2
RTS
* FMT1 BYTES:
* IF Y=0
* IF Y=1
*
FMT1
DFB

FMT2

CHAR1

LENGTH
PCH
PCADJ4
PCL
RTS2

;0=1-BYTE, 1=2-BYTE
; 2=3-BYTE
;TEST DISPLACEMENT SIGN
; (FOR REL BRANCH)
;EXTEND NEG BY DEC PCH
;PCL+LENGTH(OR DISPL)+1 TO A
; CARRY INTO Y (PCH)

XXXXXXY0 INSTRS
THEN LEFT HALF BYTE
THEN RIGHT HALF BYTE
(X=INDEX)
$04,$20,$54,$30,$0D

;ERR
;IMM
;Z-PAGE
;ABS
;IMPLIED
;ACCUMULATOR
;(ZPAG,X)
;(ZPAG),Y
;ZPAG,X
;ABS,X
;ABS,Y
;(ABS)
;ZPAG,Y
;RELATIVE

F9BA: D9 00 D8
F9BD: A4 A4 00

F9C0:
F9C3:
F9C6:
F9C9:
F9CC:
F9CF:
F9D2:
F9D5:
F9D8:
F9DB:
F9DE:
F9E0:
F9E3:
F9E6:
F9E8:
F9EB:
F9EE:
F9F0:
F9F3:
F9F6:
F9F8:
F9FB:
F9FE:
FA00:
FA03:
FA06:
FA09:
FA0C:
FA0F:
FA12:
FA15:
FA18:
FA1B:
FA1E:
FA20:
FA23:
FA26:
FA28:
FA2B:
FA2E:
FA30:
FA33:
FA36:
FA38:
FA3B:
FA3E:
FA40:
FA43:

1C
23
1B
8A
9D
A1
19
A8
24
23
19
00
5B
24
AE
AD
7C
15
9C
29
84
11
23
D8
48
94
44
68
94
08
B4
74
4A
A4
00
A2
74
44
32
22
1A
26
88
C4
48
A2
FF
20

8A
5D
A1
1D
8B
00
AE
19
53
24
A1
1A
A5
24
AE
29
00
9C
A5
53
13
A5
A0
62
26
88
C8
44
00
84
28
F4
72
8A
AA
74
72
68
B2
00
1A
72
C8
CA
44
C8
FF
D0

1C
8B
9D
23
1D
29
69
23
1B
53
5B
69
A8
00
6D
69
34
69
5A
62
54
54
E8
B4
74
6E
CC
F2
A2
74
B2
00
26
72
26
44
FF
F8

334

CHAR2

DFB

$D9,$00,$D8,$A4,$A4,$00

335
336
337
338
339
340
341
342
343

*CHAR2: "Y",0,"X$$",0
* MNEML IS OF FORM:
* (A) XXXXX000
* (B) XXXYY100
* (C) 1XXX1010
* (D) XXXYYY10
* (E) XXXYYY01
*
(X=INDEX)
MNEML
DFB
$1C,$8A,$1C,$23,$5D,$8B

344

DFB

$1B,$A1,$9D,$8A,$1D,$23

345

DFB

$9D,$8B,$1D,$A1,$00,$29

346

DFB

$19,$AE,$69,$A8,$19,$23

347

DFB

$24,$53,$1B,$23,$24,$53

348
349

DFB
DFB

$19,$A1
;(A) FORMAT ABOVE
$00,$1A,$5B,$5B,$A5,$69

350
351

DFB
DFB

$24,$24
;(B) FORMAT
$AE,$AE,$A8,$AD,$29,$00

352
353

DFB
DFB

$7C,$00
;(C) FORMAT
$15,$9C,$6D,$9C,$A5,$69

354
355

DFB
DFB

$29,$53
;(D) FORMAT
$84,$13,$34,$11,$A5,$69

DFB
DFB

$23,$A0
;(E) FORMAT
$D8,$62,$5A,$48,$26,$62

358

DFB

$94,$88,$54,$44,$C8,$54

359

DFB

$68,$44,$E8,$94,$00,$B4

360

DFB

$08,$84,$74,$B4,$28,$6E

361

DFB

$74,$F4,$CC,$4A,$72,$F2

362
363

DFB
DFB

$A4,$8A
;(A) FORMAT
$00,$AA,$A2,$A2,$74,$74

364
365

DFB
DFB

$74,$72
;(B) FORMAT
$44,$68,$B2,$32,$B2,$00

366
367

DFB
DFB

$22,$00
;(C) FORMAT
$1A,$1A,$26,$26,$72,$72

368
369

DFB
DFB

$88,$C8
;(D) FORMAT
$C4,$CA,$26,$48,$44,$44

370
371
372

DFB
DFB
JSR

$A2,$C8
;(E) FORMAT
$FF,$FF,$FF
INSTDSP
;DISASSEMBLE ONE INST

356
357

MNEMR

STEP

FA46:
FA47:
FA49:
FA4A:
FA4C:
FA4E:
FA51:
FA53:
FA54:
FA56:
FA58:
FA5A:
FA5C:
FA5E:
FA60:
FA62:
FA64:
FA66:
FA68:
FA6A:
FA6C:
FA6E:
FA70:
FA72:
FA74:
FA76:
FA78:
FA7A:
FA7D:
FA7E:
FA80:
FA83:
FA86:
FA88:
FA89:
FA8A:
FA8B:
FA8C:
FA8D:
FA8F:
FA92:
FA93:
FA96:
FA97:
FA99:
FA9A:
FA9C:
FA9F:
FAA2:
FAA5:
FAA6:
FAA7:
FAA9:
FAAA:
FAAC:
FAAD:
FAAF:
FAB1:

68
85
68
85
A2
BD
95
CA
D0
A1
F0
A4
C9
F0
C9
F0
C9
F0
C9
F0
C9
F0
29
49
C9
F0
B1
99
88
10
20
4C
85
68
48
0A
0A
0A
30
6C
28
20
68
85
68
85
20
20
4C
18
68
85
68
85
68
85
A5
20

2C
2D
08
10 FB
3C
F8
3A
42
2F
20
59
60
45
4C
5C
6C
59
40
35
1F
14
04
02
3A
3C 00
F8
3F FF
3C 00
45

03
FE 03
4C FF
3A
3B
82 F8
DA FA
65 FF
48
3A
3B
2F
56 F9

373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430

XQINIT

XQ1
XQ2

IRQ

BREAK

XBRK
XRTI
XRTS
PCINC2
PCINC3

PLA
STA
PLA
STA
LDX
LDA
STA
DEX
BNE
LDA
BEQ
LDY
CMP
BEQ
CMP
BEQ
CMP
BEQ
CMP
BEQ
CMP
BEQ
AND
EOR
CMP
BEQ
LDA
STA
DEY
BPL
JSR
JMP
STA
PLA
PHA
ASL
ASL
ASL
BMI
JMP
PLP
JSR
PLA
STA
PLA
STA
JSR
JSR
JMP
CLC
PLA
STA
PLA
STA
PLA
STA
LDA
JSR

RTNL

; AT (PCL,H)
;ADJUST TO USER
; STACK. SAVE
; RTN ADR.

RTNH
#$08
INITBL-1,X ;INIT XEQ AREA
XQT,X
XQINIT
(PCL,X)
XBRK
LENGTH
#$20
XJSR
#$60
XRTS
#$4C
XJMP
#$6C
XJMPAT
#$40
XRTI
#$1F
#$14
#$04
XQ2
(PCL),Y
XQT,Y
XQ1
RESTORE
XQT
ACC

;USER OPCODE BYTE
;SPECIAL IF BREAK
;LEN FROM DISASSEMBLY
;HANDLE JSR, RTS, JMP,
; JMP (), RTI SPECIAL

;COPY USER INST TO XEQ AREA
; WITH TRAILING NOPS
;CHANGE REL BRANCH
; DISP TO 4 FOR
; JMP TO BRANCH OR
; NBRANCH FROM XEQ.
;RESTORE USER REG CONTENTS.
;XEQ USER OP FROM RAM
; (RETURN TO NBRANCH)
;**IRQ HANDLER

BREAK
(IRQLOC)

;TEST FOR BREAK
;USER ROUTINE VECTOR IN RAM

SAV1

;SAVE REG'S ON BREAK
; INCLUDING PC

PCL
PCH
INSDS1
RGDSP1
MON
STATUS
PCL
PCH
LENGTH
PCADJ3

;PRINT USER PC.
; AND REG'S
;GO TO MONITOR
;SIMULATE RTI BY EXPECTING
; STATUS FROM STACK, THEN RTS
;RTS SIMULATION
; EXTRACT PC FROM STACK
; AND UPDATE PC BY 1 (LEN=0)
;UPDATE PC BY LEN

FAB4:
FAB6:
FAB7:
FAB9:
FABA:
FABD:
FABE:
FABF:
FAC0:
FAC1:
FAC2:
FAC4:
FAC5:
FAC7:
FAC8:
FAC9:
FACB:
FACD:
FACF:
FAD1:
FAD3:
FAD4:
FAD6:
FAD7:
FADA:
FADC:
FADE:
FAE0:
FAE2:
FAE4:
FAE6:
FAE9:
FAEC:
FAEF:
FAF1:
FAF4:
FAF6:
FAF9:
FAFA:
FAFC:
FAFD:
FAFE:
FB00:
FB02:
FB05:
FB07:
FB08:
FB09:
FB0B:
FB0E:
FB0F:
FB11:
FB12:
FB13:
FB16:
FB19:
FB1A:
FB1B:

84
18
90
18
20
AA
98
48
8A
48
A0
18
B1
AA
88
B1
86
85
B0
A5
48
A5
48
20
A9
85
A9
85
A2
A9
20
BD
20
A9
20
B5
20
E8
30
60
18
A0
B1
20
85
98
38
B0
20
38
B0
EA
EA
4C
4C
C1
D8
D9

3B
14
54 F9

02
3A
3A
3B
3A
F3
2D
2C
8E
45
40
00
41
FB
A0
ED
1E
ED
BD
ED
4A
DA

FD

FD
FA
FD
FD
FD

E8
01
3A
56 F9
3A
A2
4A FF
9E
0B FB
FD FA

431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488

XJSR

XJMP
XJMPAT

NEWPCL
RTNJMP

REGDSP
RGDSP1

RDSP1

BRANCH

NBRNCH
INITBL

RTBL

STY
CLC
BCC
CLC
JSR
TAX
TYA
PHA
TXA
PHA
LDY
CLC
LDA
TAX
DEY
LDA
STX
STA
BCS
LDA
PHA
LDA
PHA
JSR
LDA
STA
LDA
STA
LDX
LDA
JSR
LDA
JSR
LDA
JSR
LDA
JSR
INX
BMI
RTS
CLC
LDY
LDA
JSR
STA
TYA
SEC
BCS
JSR
SEC
BCS
NOP
NOP
JMP
JMP
DFB
DFB
DFB

PCH
NEWPCL
PCADJ2

;UPDATE PC AND PUSH
; ONTO STACH FOR
; JSR SIMULATE

#$02
(PCL),Y
;LOAD PC FOR JMP,
; (JMP) SIMULATE.
(PCL),Y
PCH
PCL
XJMP
RTNH
RTNL
CROUT
;DISPLAY USER REG
#ACC
; CONTENTS WITH
A3L
; LABELS
#ACC/256
A3H
#$FB
#$A0
COUT
RTBL-$FB,X
COUT
#$BD
COUT
ACC+5,X
PRBYTE
RDSP1
#$01
(PCL),Y
PCADJ3
PCL
PCINC2
SAVE
PCINC3
NBRNCH
BRANCH
$C1
$D8
$D9

;BRANCH TAKEN,
; ADD LEN+2 TO PC

;NORMAL RETURN AFTER
; XEQ USER OF
;GO UPDATE PC
;DUMMY FILL FOR
; XEQ AREA

FB1C:
FB1D:
FB1E:
FB21:
FB23:
FB24:
FB25:
FB28:
FB2A:
FB2B:
FB2D:
FB2E:
FB2F:
FB31:
FB33:
FB36:
FB39:
FB3C:
FB3E:
FB40:
FB43:
FB46:
FB49:
FB4B:
FB4D:
FB4F:
FB51:
FB53:
FB55:
FB57:
FB59:
FB5B:
FB5D:
FB60:
FB63:
FB65:
FB67:
FB68:
FB6A:
FB6B:
FB6D:
FB6F:
FB71:
FB73:
FB74:
FB76:
FB78:
FB79:
FB7A:
FB7B:
FB7D:
FB7E:
FB80:
FB81:
FB84:
FB86:
FB88:
FB8A:

D0
D3
AD
A0
EA
EA
BD
10
C8
D0
88
60
A9
85
AD
AD
AD
A9
F0
AD
AD
20
A9
85
A9
85
A9
85
A9
85
A9
85
4C
20
A0
A5
4A
90
18
A2
B5
75
95
E8
D0
A2
76
50
CA
10
88
D0
60
20
A0
06
26
26

70 C0
00
64 C0
04
F8
00
48
56
54
51
00
0B
50
53
36
14
22
00
20
28
21
18
23
17
25
22
A4
10
50

C0
C0
C0
C0
C0
F8

FC
FB

0C
FE
54
56
54
F7
03

FB
E5
A4 FB
10
50
51
52

489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546

PREAD

PREAD2

RTS2D
INIT

SETTXT
SETGR

SETWND

TABV
MULPM
MUL
MUL2

MUL3

MUL4
MUL5

DIVPM
DIV
DIV2

DFB
DFB
LDA
LDY
NOP
NOP
LDA
BPL
INY
BNE
DEY
RTS
LDA
STA
LDA
LDA
LDA
LDA
BEQ
LDA
LDA
JSR
LDA
STA
LDA
STA
LDA
STA
LDA
STA
LDA
STA
JMP
JSR
LDY
LDA
LSR
BCC
CLC
LDX
LDA
ADC
STA
INX
BNE
LDX
DFB
DFB
DEX
BPL
DEY
BNE
RTS
JSR
LDY
ASL
ROL
ROL

$D0
$D3
PTRIG
#$00

;TRIGGER PADDLES
;INIT COUNT
;COMPENSATE FOR 1ST COUNT

PADDL0,X
RTS2D

;COUNT Y-REG EVERY
; 12 USEC

PREAD2

;

#$00
STATUS
LORES
LOWSCR
TXTSET
#$00
SETWND
TXTCLR
MIXSET
CLRTOP
#$14
WNDTOP
#$00
WNDLFT
#$28
WNDWDTH
#$18
WNDBTM
#$17
CV
VTAB
MD1
#$10
ACL

;CLR STATUS FOR DEBUG
; SOFTWARE

MUL4
#$FE
XTNDL+2,X
AUXL+2,X
XTNDL+2,X

EXIT AT 255 MAX

;INIT VIDEO MODE
;SET FOR TEXT MODE
; FULL SCREEN WINDOW
;SET FOR GRAPHICS MODE
; LOWER 4 LINES AS
; TEXT WINDOW
;SET FOR 40 COL WINDOW
; TOP IN A-REG,
; BTTM AT LINE 24

;

VTAB TO ROW 23

;VTABS TO ROW IN A-REG
;ABS VAL OF AC AUX
;INDEX FOR 16 BITS
;ACX * AUX + XTND
; TO AC, XTND
;IF NO CARRY,
; NO PARTIAL PROD.
;ADD MPLCND (AUX)
; TO PARTIAL PROD
; (XTND)

MUL3
#$03
$76
$50
MUL5
MUL2
MD1
#$10
ACL
ACH
XTNDL

;ABS VAL OF AC, AUX.
;INDEX FOR 16 BITS
;XTND/AUX

FB8C:
FB8E:
FB8F:
FB91:
FB93:
FB94:
FB96:
FB98:
FB9A:
FB9C:
FB9E:
FBA0:
FBA1:
FBA3:
FBA4:
FBA6:
FBA8:
FBAA:
FBAD:
FBAF:
FBB1:
FBB3:
FBB4:
FBB5:
FBB7:
FBB9:
FBBA:
FBBC:
FBBE:
FBC0:
FBC1:
FBC2:
FBC3:
FBC5:
FBC7:
FBC9:
FBCA:
FBCC:
FBCE:
FBD0:
FBD2:
FBD3:
FBD4:
FBD6:
FBD8:
FBD9:
FBDB:
FBDD:
FBDF:
FBE2:
FBE4:
FBE6:
FBE9:
FBEC:
FBED:
FBEF:
FBF0:
FBF2:

26
38
A5
E5
AA
A5
E5
90
86
85
E6
88
D0
60
A0
84
A2
20
A2
B5
10
38
98
F5
95
98
F5
95
E6
60
48
4A
29
09
85
68
29
90
69
85
0A
0A
05
85
60
C9
D0
A9
20
A0
A9
20
AD
88
D0
60
A4
91

53
52
54
53
55
06
52
53
50
E3
00
2F
54
AF FB
50
01
0D
00
00
01
01
2F

03
04
29
18
02
7F
28
28
28
87
12
40
A8 FC
C0
0C
A8 FC
30 C0
F5
24
28

547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604

DIV3
MD1

MD3

MDRTS
BASCALC

BSCLC2

BELL1

BELL2

RTS2B
STOADV

ROL
SEC
LDA
SBC
TAX
LDA
SBC
BCC
STX
STA
INC
DEY
BNE
RTS
LDY
STY
LDX
JSR
LDX
LDA
BPL
SEC
TYA
SBC
STA
TYA
SBC
STA
INC
RTS
PHA
LSR
AND
ORA
STA
PLA
AND
BCC
ADC
STA
ASL
ASL
ORA
STA
RTS
CMP
BNE
LDA
JSR
LDY
LDA
JSR
LDA
DEY
BNE
RTS
LDY
STA

XTNDH

;

TO AC.

XTNDL
AUXL

;MOD TO XTND.

XTNDH
AUXH
DIV3
XTNDL
XTNDH
ACL
DIV2
#$00
SIGN
#AUXL
MD3
#ACL
LOC1,X
MDRTS

;ABS VAL OF AC, AUX
; WITH RESULT SIGN
; IN LSB OF SIGN.

LOC0,X
LOC0,X

;COMPL SPECIFIED REG
; IF NEG.

;X SPECIFIES AC OR AUX

LOC1,X
LOC1,X
SIGN

#$03
#$04
BASH
#$18
BSCLC2
#$7F
BASL

;CALC BASE ADR IN BASL,H
; FOR GIVEN LINE NO
; 0<=LINE NO.<=$17
;ARG=000ABCDE, GENERATE
; BASH=000001CD
; AND
; BASL=EABAB000

BASL
BASL
#$87
RTS2B
#$40
WAIT
#$C0
#$0C
WAIT
SPKR

;BELL CHAR? (CNTRL-G)
; NO, RETURN
;DELAY .01 SECONDS
;TOGGLE SPEAKER AT
; 1 KHZ FOR .1 SEC.

BELL2
CH
(BASL),Y

;CURSOR H INDEX TO Y-REG
;STORE CHAR IN LINE

FBF4:
FBF6:
FBF8:
FBFA:
FBFC:
FBFD:
FBFF:
FC01:
FC02:
FC04:
FC06:
FC08:
FC0A:
FC0C:
FC0E:
FC10:
FC12:
FC14:
FC16:
FC18:
FC1A:
FC1C:
FC1E:
FC20:
FC22:
FC24:
FC27:
FC29:
FC2B:
FC2C:
FC2E:
FC30:
FC32:
FC34:
FC36:
FC38:
FC3A:
FC3C:
FC3E:
FC40:
FC42:
FC44:
FC46:
FC47:
FC4A:
FC4D:
FC4F:
FC50:
FC52:
FC54:
FC56:
FC58:
FC5A:
FC5C:
FC5E:
FC60:
FC62:
FC64:

E6
A5
C5
B0
60
C9
B0
A8
10
C9
F0
C9
F0
C9
D0
C6
10
A5
85
C6
A5
C5
B0
C6
A5
20
65
85
60
49
F0
69
90
F0
69
90
F0
69
90
D0
A4
A5
48
20
20
A0
68
69
C5
90
B0
A5
85
A0
84
F0
A9
85

24
24
21
66
A0
EF
EC
8D
5A
8A
5A
88
C9
24
E8
21
24
24
22
25
0B
25
25
C1 FB
20
28
C0
28
FD
C0
DA
FD
2C
DE
FD
5C
E9
24
25
24 FC
9E FC
00
00
23
F0
CA
22
25
00
24
E4
00
24

605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662

ADVANCE

RTS3
VIDOUT

BS

UP

VTAB
VTABZ
RTS4
ESC1

CLREOP
CLEOP1

HOME

CR

INC
LDA
CMP
BCS
RTS
CMP
BCS
TAY
BPL
CMP
BEQ
CMP
BEQ
CMP
BNE
DEC
BPL
LDA
STA
DEC
LDA
CMP
BCS
DEC
LDA
JSR
ADC
STA
RTS
EOR
BEQ
ADC
BCC
BEQ
ADC
BCC
BEQ
ADC
BCC
BNE
LDY
LDA
PHA
JSR
JSR
LDY
PLA
ADC
CMP
BCC
BCS
LDA
STA
LDY
STY
BEQ
LDA
STA

CH
CH
WNDWDTH
CR
#$A0
STOADV
STOADV
#$8D
CR
#$8A
LF
#$88
BELL1
CH
RTS3
WNDWDTH
CH
CH
WNDTOP
CV
RTS4
CV
CV
BASCALC
WNDLFT
BASL
#$C0
HOME
#$FD
ADVANCE
BS
#$FD
LF
UP
#$FD
CLREOL
RTS4
CH
CV
VTABZ
CLEOLZ
#$00
#$00
WNDBTM
CLEOP1
VTAB
WNDTOP
CV
#$00
CH
CLEOP1
#$00
CH

;INCREMENT CURSOR H INDEX
; (MOVE RIGHT)
;BEYOND WINDOW WIDTH?
; YES CR TO NEXT LINE
; NO,RETURN
;CONTROL CHAR?
; NO,OUTPUT IT.
;INVERSE VIDEO?
; YES, OUTPUT IT.
;CR?
; YES.
;LINE FEED?
; IF SO, DO IT.
;BACK SPACE? (CNTRL-H)
; NO, CHECK FOR BELL.
;DECREMENT CURSOR H INDEX
;IF POS, OK. ELSE MOVE UP
;SET CH TO WNDWDTH-1
;(RIGHTMOST SCREEN POS)
;CURSOR V INDEX
;IF TOP LINE THEN RETURN
;DEC CURSOR V-INDEX
;GET CURSOR V-INDEX
;GENERATE BASE ADR
;ADD WINDOW LEFT INDEX
;TO BASL
;ESC?
; IF SO, DO HOME AND CLEAR
;ESC-A OR B CHECK
; A, ADVANCE
; B, BACKSPACE
;ESC-C OR D CHECK
; C, DOWN
; D, GO UP
;ESC-E OR F CHECK
; E, CLEAR TO END OF LINE
; NOT F, RETURN
;CURSOR H TO Y INDEX
;CURSOR V TO A-REGISTER
;SAVE CURRENT LINE ON STK
;CALC BASE ADDRESS
;CLEAR TO EOL, SET CARRY
;CLEAR FROM H INDEX=0 FOR REST
;INCREMENT CURRENT LINE
;(CARRY IS SET)
;DONE TO BOTTOM OF WINDOW?
; NO, KEEP CLEARING LINES
; YES, TAB TO CURRENT LINE
;INIT CURSOR V
; AND H-INDICES
;THEN CLEAR TO END OF PAGE
;CURSOR TO LEFT OF INDEX
;(RET CURSOR H=0)

FC66:
FC68:
FC6A:
FC6C:
FC6E:
FC70:
FC72:
FC73:
FC76:
FC78:
FC7A:
FC7C:
FC7E:
FC80:
FC81:
FC82:
FC84:
FC86:
FC88:
FC89:
FC8C:
FC8E:
FC90:
FC91:
FC93:
FC95:
FC97:
FC9A:
FC9C:
FC9E:
FCA0:
FCA2:
FCA3:
FCA5:
FCA7:
FCA8:
FCA9:
FCAA:
FCAC:
FCAE:
FCAF:
FCB1:
FCB3:
FCB4:
FCB6:
FCB8:
FCBA:
FCBC:
FCBE:
FCC0:
FCC2:
FCC4:
FCC6:
FCC8:
FCC9:
FCCB:
FCCE:
FCD0:

E6
A5
C5
90
C6
A5
48
20
A5
85
A5
85
A4
88
68
69
C5
B0
48
20
B1
91
88
10
30
A0
20
B0
A4
A9
91
C8
C4
90
60
38
48
E9
D0
68
E9
D0
60
E6
D0
E6
A5
C5
A5
E5
E6
D0
E6
60
A0
20
D0
69

25
25
23
B6
25
22
24 FC
28
2A
29
2B
21
01
23
0D
24 FC
28
2A
F9
E1
00
9E FC
86
24
A0
28
21
F9

01
FC
01
F6
42
02
43
3C
3E
3D
3F
3C
02
3D
4B
DB FC
F9
FE

663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720

LF

SCROLL
SCRL1

SCRL2

SCRL3
CLREOL
CLEOLZ
CLEOL2

WAIT
WAIT2
WAIT3

NXTA4
NXTA1

RTS4B
HEADR

INC
LDA
CMP
BCC
DEC
LDA
PHA
JSR
LDA
STA
LDA
STA
LDY
DEY
PLA
ADC
CMP
BCS
PHA
JSR
LDA
STA
DEY
BPL
BMI
LDY
JSR
BCS
LDY
LDA
STA
INY
CPY
BCC
RTS
SEC
PHA
SBC
BNE
PLA
SBC
BNE
RTS
INC
BNE
INC
LDA
CMP
LDA
SBC
INC
BNE
INC
RTS
LDY
JSR
BNE
ADC

CV
CV
WNDBTM
VTABZ
CV
WNDTOP

;INCR CURSOR V(DOWN 1 LINE)

VTABZ
BASL
BAS2L
BASH
BAS2H
WNDWDTH

;GENERATE BASE ADR
;COPY BASL,H
; TO BAS2L,H

#$01
WNDBTM
SCRL3

;INCR LINE NUMBER
;DONE?
; YES, FINISH

VTABZ
(BASL),Y
(BAS2L),Y

;FORM BASL,H (BASE ADDR)
;MOVE A CHR UP ON LINE

SCRL2
SCRL1
#$00
CLEOLZ
VTAB
CH
#$A0
(BASL),Y
WNDWDTH
CLEOL2

#$01
WAIT3
#$01
WAIT2

;OFF SCREEN?
; NO, SET BASE ADDR
;DECR CURSOR V (BACK TO BOTTOM)
;START AT TOP OF SCRL WNDW

;INIT Y TO RIGHTMOST INDEX
; OF SCROLLING WINDOW

;NEXT CHAR OF LINE
;NEXT LINE (ALWAYS TAKEN)
;CLEAR BOTTOM LINE
;GET BASE ADDR FOR BOTTOM LINE
;CARRY IS SET
;CURSOR H INDEX
;STORE BLANKS FROM 'HERE'
; TO END OF LINES (WNDWDTH)

;1.0204 USEC
;(13+27/2*A+5/2*A*A)

A4L
NXTA1
A4H
A1L
A2L
A1H
A2H
A1L
RTS4B
A1H

;INCR 2-BYTE A4
; AND A1

#$4B
ZERDLY
HEADR
#$FE

;WRITE A*256 'LONG 1'
; HALF CYCLES
; (650 USEC EACH)

;INCR 2-BYTE A1.
;

AND COMPARE TO A2

;

(CARRY SET IF >=)

FCD2:
FCD4:
FCD6:
FCD9:
FCDA:
FCDB:
FCDC:
FCDE:
FCE0:
FCE2:
FCE3:
FCE5:
FCE8:
FCEA:
FCEB:
FCEC:
FCEE:
FCEF:
FCF2:
FCF3:
FCF4:
FCF6:
FCF7:
FCF9:
FCFA:
FCFD:
FCFE:
FD01:
FD03:
FD05:
FD07:
FD09:
FD0B:
FD0C:
FD0E:
FD10:
FD11:
FD13:
FD15:
FD17:
FD18:
FD1B:
FD1D:
FD1F:
FD21:
FD24:
FD26:
FD28:
FD2B:
FD2E:
FD2F:
FD32:
FD35:
FD38:
FD3A:
FD3C:
FD3D:
FD3F:

B0
A0
20
C8
C8
88
D0
90
A0
88
D0
AC
A0
CA
60
A2
48
20
68
2A
A0
CA
D0
60
20
88
AD
45
10
45
85
C0
60
A4
B1
48
29
09
91
68
6C
E6
D0
E6
2C
10
91
AD
2C
60
20
20
20
C9
F0
60
A5
48

F5
21
DB FC

FD
05
32
FD
20 C0
2C
08
FA FC
3A
F5
FD FC
60 C0
2F
F8
2F
2F
80
24
28
3F
40
28
38
4E
02
4F
00
F5
28
00
10

00

C0
C0
C0

0C FD
2C FC
0C FD
9B
F3
32

721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778

WRBIT
ZERDLY

ONEDLY
WRTAPE

RDBYTE
RDBYT2

RD2BIT
RDBIT

RDKEY

KEYIN
KEYIN2

ESC
RDCHAR

NOTCR

BCS
LDY
JSR
INY
INY
DEY
BNE
BCC
LDY
DEY
BNE
LDY
LDY
DEX
RTS
LDX
PHA
JSR
PLA
ROL
LDY
DEX
BNE
RTS
JSR
DEY
LDA
EOR
BPL
EOR
STA
CPY
RTS
LDY
LDA
PHA
AND
ORA
STA
PLA
JMP
INC
BNE
INC
BIT
BPL
STA
LDA
BIT
RTS
JSR
JSR
JSR
CMP
BEQ
RTS
LDA
PHA

HEADR
#$21
ZERDLY

ZERDLY
WRTAPE
#$32

;THEN A 'SHORT 0'
; (400 USEC)
;WRITE TWO HALF CYCLES
; OF 250 USEC ('0')
; OR 500 USEC ('0')
;Y IS COUNT FOR
; TIMING LOOP

ONEDLY
TAPEOUT
#$2C
#$08
RD2BIT

;8 BITS TO READ
;READ TWO TRANSITIONS
; (FIND EDGE)

#$3A

;NEXT BIT
;COUNT FOR SAMPLES

RDBYT2
RDBIT
TAPEIN
LASTIN
RDBIT
LASTIN
LASTIN
#$80
CH
(BASL),Y

;DECR Y UNTIL
; TAPE TRANSITION

;SET CARRY ON Y
;SET SCREEN TO FLASH

#$3F
#$40
(BASL),Y
(KSWL)
RNDL
KEYIN2
RNDH
KBD
KEYIN
(BASL),Y
KBD
KBDSTRB

;GO TO USER KEY-IN

RDKEY
ESC1
RDKEY
#$9B
ESC

;GET KEYCODE
; HANDLE ESC FUNC.
;READ KEY
;ESC?
; YES, DON'T RETURN

INVFLG

;INCR RND NUMBER
;KEY DOWN?
; LOOP
;REPLACE FLASHING SCREEN
;GET KEYCODE
;CLR KEY STROBE

FD40:
FD42:
FD44:
FD47:
FD4A:
FD4B:
FD4D:
FD50:
FD52:
FD54:
FD56:
FD58:
FD5A:
FD5C:
FD5F:
FD60:
FD62:
FD64:
FD67:
FD6A:
FD6C:
FD6F:
FD71:
FD72:
FD74:
FD75:
FD78:
FD7A:
FD7C:
FD7E:
FD80:
FD82:
FD84:
FD87:
FD89:
FD8B:
FD8E:
FD90:
FD92:
FD94:
FD96:
FD99:
FD9C:
FD9E:
FDA0:
FDA3:
FDA5:
FDA7:
FDA9:
FDAB:
FDAD:
FDAF:
FDB1:
FDB3:
FDB6:
FDB8:
FDBB:
FDBD:

A9
85
BD
20
68
85
BD
C9
F0
C9
F0
E0
90
20
E8
D0
A9
20
20
A5
20
A2
8A
F0
CA
20
C9
D0
B1
C9
90
29
9D
C9
D0
20
A9
D0
A4
A6
20
20
A0
A9
4C
A5
09
85
A5
85
A5
29
D0
20
A9
20
B1
20

FF
32
00 02
ED FD
32
00 02
88
1D
98
0A
F8
03
3A FF
13
DC
ED FD
8E FD
33
ED FD
01
F3
35
95
02
28
E0
02
DF
00
8D
B2
9C
8D
5B
3D
3C
8E
40
00
AD
ED
3C
07
3E
3D
3F
3C
07
03
92
A0
ED
3C
DA

FD

02
FC

FD
F9
FD

FD
FD
FD

779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836

NOTCR1
CANCEL
GETLNZ
GETLN
BCKSPC
NXTCHAR

CAPTST
ADDINP

CROUT
PRA1
PRYX2

XAM8

MODSCHK
XAM
DATAOUT

LDA
STA
LDA
JSR
PLA
STA
LDA
CMP
BEQ
CMP
BEQ
CPX
BCC
JSR
INX
BNE
LDA
JSR
JSR
LDA
JSR
LDX
TXA
BEQ
DEX
JSR
CMP
BNE
LDA
CMP
BCC
AND
STA
CMP
BNE
JSR
LDA
BNE
LDY
LDX
JSR
JSR
LDY
LDA
JMP
LDA
ORA
STA
LDA
STA
LDA
AND
BNE
JSR
LDA
JSR
LDA
JSR

#$FF
INVFLG
IN,X
COUT
INVFLG
IN,X
#$88
BCKSPC
#$98
CANCEL
#$F8
NOTCR1
BELL
NXTCHAR
#$DC
COUT
CROUT
PROMPT
COUT
#$01

;ECHO USER LINE
; NON INVERSE

;CHECK FOR EDIT KEYS
; BS, CTRL-X
;MARGIN?
; YES, SOUND BELL
;ADVANCE INPUT INDEX
;BACKSLASH AFTER CANCELLED LINE
;OUTPUT CR
;OUTPUT PROMPT CHAR
;INIT INPUT INDEX
; WILL BACKSPACE TO 0

GETLNZ
RDCHAR
#PICK
CAPTST
(BASL),Y
#$E0
ADDINP
#$DF
IN,X
#$8D
NOTCR
CLREOL
#$8D
COUT
A1H
A1L
CROUT
PRNTYX
#$00
#$AD
COUT
A1L
#$07
A2L
A1H
A2H
A1L
#$07
DATAOUT
PRA1
#$A0
COUT
(A1L),Y
PRBYTE

;USE SCREEN CHAR
; FOR CTRL-U
;CONVERT TO CAPS
;ADD TO INPUT BUF
;CLR TO EOL IF CR
;PRINT CR,A1 IN HEX

;PRINT '-'
;SET TO FINISH AT
; MOD 8=7

;OUTPUT BLANK
;OUTPUT BYTE IN HEX

FDC0:
FDC3:
FDC5:
FDC6:
FDC7:
FDC9:
FDCA:
FDCB:
FDCD:
FDCF:
FDD1:
FDD3:
FDD4:
FDD6:
FDD9:
FDDA:
FDDB:
FDDC:
FDDD:
FDDE:
FDDF:
FDE2:
FDE3:
FDE5:
FDE7:
FDE9:
FDEB:
FDED:
FDF0:
FDF2:
FDF4:
FDF6:
FDF8:
FDF9:
FDFC:
FDFD:
FDFF:
FE00:
FE02:
FE04:
FE05:
FE07:
FE09:
FE0B:
FE0D:
FE0F:
FE11:
FE13:
FE15:
FE17:
FE18:
FE1A:
FE1D:
FE1F:
FE20:
FE22:
FE24:
FE26:

20
90
60
4A
90
4A
4A
A5
90
49
65
48
A9
20
68
48
4A
4A
4A
4A
20
68
29
09
C9
90
69
6C
C9
90
25
84
48
20
68
A4
60
C6
F0
CA
D0
C9
D0
85
A5
91
E6
D0
E6
60
A4
B9
85
60
A2
B5
95
95

BA FC
E8
EA
3E
02
FF
3C
BD
ED FD

E5 FD
0F
B0
BA
02
06
36 00
A0
02
32
35
FD FB
35
34
9F
16
BA
BB
31
3E
40
40
02
41
34
FF 01
31
01
3E
42
44

837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894

RTS4C
XAMPM

ADD

PRBYTE

PRHEX
PRHEXZ

COUT
COUT1
COUTZ

BL1
BLANK

STOR

RTS5
SETMODE
SETMDZ
LT
LT2

JSR
BCC
RTS
LSR
BCC
LSR
LSR
LDA
BCC
EOR
ADC
PHA
LDA
JSR
PLA
PHA
LSR
LSR
LSR
LSR
JSR
PLA
AND
ORA
CMP
BCC
ADC
JMP
CMP
BCC
AND
STY
PHA
JSR
PLA
LDY
RTS
DEC
BEQ
DEX
BNE
CMP
BNE
STA
LDA
STA
INC
BNE
INC
RTS
LDY
LDA
STA
RTS
LDX
LDA
STA
STA

NXTA1
MODSCHK
XAM
A2L
ADD
#$FF
A1L
#$BD
COUT

;CHECK IF TIME TO,
; PRINT ADDR
;DETERMINE IF MON
; MODE IS XAM
; ADD, OR SUB

;SUB: FORM 2'S COMPLEMENT

;PRINT '=', THEN RESULT
;PRINT BYTE AS 2 HEX
; DIGITS, DESTROYS A-REG

PRHEXZ
#$0F
#$B0
#$BA
COUT
#$06
(CSWL)
#$A0
COUTZ
INVFLG
YSAV1
VIDOUT
YSAV1

;PRINT HEX DIG IN A-REG
; LSB'S

;VECTOR TO USER OUTPUT ROUTINE
;DON'T OUTPUT CTRL'S INVERSE
;MASK WITH INVERSE FLAG
;SAV Y-REG
;SAV A-REG
;OUTPUT A-REG AS ASCII
;RESTORE A-REG
; AND Y-REG
; THEN RETURN

YSAV
XAM8
SETMDZ
#$BA
XAMPM
MODE
A2L
(A3L),Y
A3L
RTS5
A3H
YSAV
IN-1,Y
MODE
#$01
A2L,X
A4L,X
A5L,X

;BLANK TO MON
;AFTER BLANK
;DATA STORE MODE?
; NO, XAM, ADD, OR SUB
;KEEP IN STORE MODE
;STORE AS LOW BYTE AS (A3)
;INCR A3, RETURN
;SAVE CONVERTED ':', '+',
; '-', '.' AS MODE.

;COPY A2 (2 BYTES) TO
; A4 AND A5

FE28:
FE29:
FE2B:
FE2C:
FE2E:
FE30:
FE33:
FE35:
FE36:
FE38:
FE3A:
FE3C:
FE3F:
FE41:
FE44:
FE46:
FE49:
FE4B:
FE4E:
FE50:
FE53:
FE55:
FE58:
FE5B:
FE5D:
FE5E:
FE61:
FE63:
FE64:
FE67:
FE6A:
FE6C:
FE6E:
FE6F:
FE70:
FE72:
FE74:
FE75:
FE76:
FE78:
FE7A:
FE7C:
FE7D:
FE7F:
FE80:
FE82:
FE84:
FE86:
FE88:
FE89:
FE8B:
FE8D:
FE8F:
FE91:
FE93:
FE95:
FE97:
FE99:

CA
10
60
B1
91
20
90
60
B1
D1
F0
20
B1
20
A9
20
A9
20
B1
20
A9
20
20
90
60
20
A9
48
20
20
85
84
68
38
E9
D0
60
8A
F0
B5
95
CA
10
60
A0
D0
A0
84
60
A9
85
A2
A0
D0
A9
85
A2
A0

F7
3C
42
B4 FC
F7
3C
42
1C
92
3C
DA
A0
ED
A8
ED
42
DA
A9
ED
B4
D9

FD
FD
FD
FD
FD
FD
FC

75 FE
14
D0 F8
53 F9
3A
3B
01
EF
07
3C
3A
F9
3F
02
FF
32
00
3E
38
1B
08
00
3E
36
F0

895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952

MOVE

VFY

VFYOK
LIST
LIST2

A1PC
A1PCLP

A1PCRTS
SETINV
SETNORM
SETIFLG
SETKBD
INPORT
INPRT
SETVID
OUTPORT
OUTPRT

DEX
BPL
RTS
LDA
STA
JSR
BCC
RTS
LDA
CMP
BEQ
JSR
LDA
JSR
LDA
JSR
LDA
JSR
LDA
JSR
LDA
JSR
JSR
BCC
RTS
JSR
LDA
PHA
JSR
JSR
STA
STY
PLA
SEC
SBC
BNE
RTS
TXA
BEQ
LDA
STA
DEX
BPL
RTS
LDY
BNE
LDY
STY
RTS
LDA
STA
LDX
LDY
BNE
LDA
STA
LDX
LDY

LT2
(A1L),Y
(A4L),Y
NXTA4
MOVE

;MOVE (A1 TO A2) TO
; (A4)

(A1L),Y
(A4L),Y
VFYOK
PRA1
(A1L),Y
PRBYTE
#$A0
COUT
#$A8
COUT
(A4L),Y
PRBYTE
#$A9
COUT
NXTA4
VFY

;VERIFY (A1 TO A2) WITH
; (A4)

A1PC
#$14

;MOVE A1 (2 BYTES) TO
; PC IF SPEC'D AND
; DISEMBLE 20 INSTRS

INSTDSP
PCADJ
PCL
PCH
#$01
LIST2
A1PCRTS
A1L,X
PCL,X

;ADJUST PC EACH INSTR

;NEXT OF 20 INSTRS
;IF USER SPEC'D ADR
; COPY FROM A1 TO PC

A1PCLP
#$3F
SETIFLG
#$FF
INVFLG

;SET FOR INVERSE VID
; VIA COUT1
;SET FOR NORMAL VID

#$00
A2L
#KSWL
#KEYIN
IOPRT
#$00
A2L
#CSWL
#COUT1

;SIMULATE PORT #0 INPUT
; SPECIFIED (KEYIN ROUTINE)

;SIMULATE PORT #0 OUTPUT
; SPECIFIED (COUT1 ROUTINE)

FE9B:
FE9D:
FE9F:
FEA1:
FEA3:
FEA5:
FEA7:
FEA9:
FEAB:
FEAD:
FEAE:
FEAF:
FEB0:
FEB3:
FEB6:
FEB9:
FEBC:
FEBF:
FEC2:
FEC4:
FEC7:
FECA:
FECD:
FECF:
FED2:
FED4:
FED6:
FED8:
FED9:
FEDB:
FEDE:
FEE1:
FEE3:
FEE4:
FEE6:
FEE8:
FEEB:
FEED:
FEEF:
FEF0:
FEF3:
FEF5:
FEF6:
FEF9:
FEFA:
FEFB:
FEFD:
FF00:
FF02:
FF05:
FF07:
FF0A:
FF0C:
FF0F:
FF11:
FF14:
FF16:
FF19:

A5
29
F0
09
A0
F0
A9
94
95
60
EA
EA
4C
4C
20
20
6C
4C
C6
20
4C
4C
A9
20
A0
A2
41
48
A1
20
20
A0
68
90
A0
20
F0
A2
0A
20
D0
60
20
68
68
D0
20
A9
20
85
20
A0
20
B0
20
A0
20
81

3E
0F
06
C0
00
02
FD
00
01

00
03
75
3F
3A
D7
34
75
43
F8
40
C9
27
00
3C

E0
E0
FE
FF
00
FA
FE
FA
03
FC

3C
ED FE
BA FC
1D
EE
22
ED FE
4D
10
D6 FC
FA
00 FE
6C
FA
16
C9
2E
FA
24
FD
F9
FD
3B
EC
3C

FC
FC
FC
FC
FC
FC

953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010

IOPRT

IOPRT1
IOPRT2

XBASIC
BASCONT
GO
REGZ
TRACE
STEPZ
USR
WRITE
WR1

WRBYTE
WRBYT2

CRMON

READ

RD2

RD3

LDA
AND
BEQ
ORA
LDY
BEQ
LDA
STY
STA
RTS
NOP
NOP
JMP
JMP
JSR
JSR
JMP
JMP
DEC
JSR
JMP
JMP
LDA
JSR
LDY
LDX
EOR
PHA
LDA
JSR
JSR
LDY
PLA
BCC
LDY
JSR
BEQ
LDX
ASL
JSR
BNE
RTS
JSR
PLA
PLA
BNE
JSR
LDA
JSR
STA
JSR
LDY
JSR
BCS
JSR
LDY
JSR
STA

A2L
;SET RAM IN/OUT VECTORS
#$0F
IOPRT1
#IOADR/256
#$00
IOPRT2
#COUT1/256
LOC0,X
LOC1,X

BASIC
BASIC2
A1PC
RESTORE
(PCL)
REGDSP
YSAV
A1PC
STEP
USRADR
#$40
HEADR
#$27
#$00
(A1L,X)

;TO BASIC WITH SCRATCH
;CONTINUE BASIC
;ADR TO PC IF SPEC'D
;RESTORE META REGS
;GO TO USER SUBR
;TO REG DISPLAY
;ADR TO PC IF SPEC'D
;TAKE ONE STEP
;TO USR SUBR AT USRADR
;WRITE 10-SEC HEADER

(A1L,X)
WRBYTE
NXTA1
#$1D
WR1
#$22
WRBYTE
BELL
#$10
WRBIT
WRBYT2
BL1
MONZ
RD2BIT
#$16
HEADR
CHKSUM
RD2BIT
#$24
RDBIT
RD2
RDBIT
#$3B
RDBYTE
(A1L,X)

;HANDLE A CR AS BLANK
; THEN POP STACK
; AND RTN TO MON
;FIND TAPEIN EDGE
;DELAY 3.5 SECONDS
;INIT CHKSUM=$FF
;FIND TAPEIN EDGE
;LOOK FOR SYNC BIT
; (SHORT 0)
; LOOP UNTIL FOUND
;SKIP SECOND SYNC H-CYCLE
;INDEX FOR 0/1 TEST
;READ A BYTE
;STORE AT (A1)

FF1B:
FF1D:
FF1F:
FF22:
FF24:
FF26:
FF29:
FF2B:
FF2D:
FF2F:
FF32:
FF34:
FF37:
FF3A:
FF3C:
FF3F:
FF41:
FF42:
FF44:
FF46:
FF48:
FF49:
FF4A:
FF4C:
FF4E:
FF50:
FF51:
FF52:
FF54:
FF55:
FF57:
FF58:
FF59:
FF5C:
FF5F:
FF62:
FF65:
FF66:
FF69:
FF6B:
FF6D:
FF70:
FF73:
FF76:
FF78:
FF7A:
FF7B:
FF7D:
FF80:
FF82:
FF85:
FF87:
FF8A:
FF8C:
FF8D:
FF8E:
FF8F:
FF90:

45
85
20
A0
90
20
C5
F0
A9
20
A9
20
20
A9
4C
A5
48
A5
A6
A4
28
60
85
86
84
08
68
85
BA
86
D8
60
20
20
20
20
D8
20
A9
85
20
20
20
84
A0
88
30
D9
D0
20
A4
4C
A2
0A
0A
0A
0A
0A

2E
2E
BA
35
F0
EC
2E
0D
C5
ED
D2
ED
ED
87
ED
48

FC
FC

FD
FD
FD
FD

45
46
47
45
46
47
48
49
84
2F
93
89

FE
FB
FE
FE

3A
AA
33
67
C7
A7
34
17

FF
FD
FF
FF

E8
CC FF
F8
BE FF
34
73 FF
03

1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068

PRERR

BELL
RESTORE
RESTR1

SAVE
SAV1

RESET

MON
MONZ

NXTITM
CHRSRCH

DIG

NXTBIT

EOR
STA
JSR
LDY
BCC
JSR
CMP
BEQ
LDA
JSR
LDA
JSR
JSR
LDA
JMP
LDA
PHA
LDA
LDX
LDY
PLP
RTS
STA
STX
STY
PHP
PLA
STA
TSX
STX
CLD
RTS
JSR
JSR
JSR
JSR
CLD
JSR
LDA
STA
JSR
JSR
JSR
STY
LDY
DEY
BMI
CMP
BNE
JSR
LDY
JMP
LDX
ASL
ASL
ASL
ASL
ASL

CHKSUM
CHKSUM
NXTA1
#$35
RD3
RDBYTE
CHKSUM
BELL
#$C5
COUT
#$D2
COUT
COUT
#$87
COUT
STATUS

;UPDATE RUNNING CHKSUM
;INC A1, COMPARE TO A2
;COMPENSATE 0/1 INDEX
;LOOP UNTIL DONE
;READ CHKSUM BYTE
;GOOD, SOUND BELL AND RETURN
;PRINT "ERR", THEN BELL

;OUTPUT BELL AND RETURN
;RESTORE 6502 REG CONTENTS
; USED BY DEBUG SOFTWARE

ACC
XREG
YREG
ACC
XREG
YREG

;SAVE 6502 REG CONTENTS

STATUS
SPNT
SETNORM
INIT
SETVID
SETKBD
BELL
#$AA
PROMPT
GETLNZ
ZMODE
GETNUM
YSAV
#$17
MON
CHRTBL,Y
CHRSRCH
TOSUB
YSAV
NXTITM
#$03

;SET SCREEN MODE
; AND INIT KBD/SCREEN
; AS I/O DEV'S
;MUST SET HEX MODE!
;'*' PROMPT FOR MON
;READ A LINE
;CLEAR MON MODE, SCAN IDX
;GET ITEM, NON-HEX
; CHAR IN A-REG
; X-REG=0 IF NO HEX INPUT
;NOT FOUND, GO TO MON
;FIND CMND CHAR IN TEL
;FOUND, CALL CORRESPONDING
; SUBROUTINE

;GOT HEX DIG,
; SHIFT INTO A2

FF91:
FF93:
FF95:
FF96:
FF98:
FF9A:
FF9C:
FF9E:
FFA0:
FFA2:
FFA3:
FFA5:
FFA7:
FFA9:
FFAB:
FFAD:
FFB0:
FFB1:
FFB3:
FFB5:
FFB7:
FFB9:
FFBB:
FFBD:
FFBE:
FFC0:
FFC1:
FFC4:
FFC5:
FFC7:
FFC9:
FFCB:
FFCC:
FFCD:
FFCE:
FFCF:
FFD0:
FFD1:
FFD2:
FFD3:
FFD4:
FFD5:
FFD6:
FFD7:
FFD8:
FFD9:
FFDA:
FFDB:
FFDC:
FFDD:
FFDE:
FFDF:
FFE0:
FFE1:
FFE2:
FFE3:
FFE4:
FFE5:

26
26
CA
10
A5
D0
B5
95
95
E8
F0
D0
A2
86
86
B9
C8
49
C9
90
69
C9
B0
60
A9
48
B9
48
A5
A0
84
60
BC
B2
BE
ED
EF
C4
EC
A9
BB
A6
A4
06
95
07
02
05
F0
00
EB
93
A7
C6
99
B2
C9
BE

3E
3F
F8
31
06
3F
3D
41
F3
06
00
3E
3F
00 02
B0
0A
D3
88
FA
CD
FE
E3 FF
31
00
31

1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126

NXTBAS

NXTBS2
GETNUM
NXTCHR

TOSUB

ZMODE
CHRTBL

SUBTBL

ROL
ROL
DEX
BPL
LDA
BNE
LDA
STA
STA
INX
BEQ
BNE
LDX
STX
STX
LDA
INY
EOR
CMP
BCC
ADC
CMP
BCS
RTS
LDA
PHA
LDA
PHA
LDA
LDY
STY
RTS
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB

A2L
A2H
NXTBIT
MODE
NXTBS2
A2H,X
A1H,X
A3H,X
NXTBAS
NXTCHR
#$00
A2L
A2H
IN,Y
#$B0
#$0A
DIG
#$88
#$FA
DIG
#GO/256
SUBTBL,Y
MODE
#$00
MODE
$BC
$B2
$BE
$ED
$EF
$C4
$EC
$A9
$BB
$A6
$A4
$06
$95
$07
$02
$05
$F0
$00
$EB
$93
$A7
$C6
$99
BASCONT-1
USR-1
REGZ-1

;LEAVE X=$FF IF DIG
;IF MODE IS ZERO
; THEN COPY A2 TO
; A1 AND A3

;CLEAR A2
;GET CHAR

;IF HEX DIG, THEN

;PUSH HIGH-ORDER
; SUBR ADR ON STK
;PUSH LOW-ORDER
; SUBR ADR ON STK
;CLR MODE, OLD MODE
; TO A-REG
; GO TO SUBR VIA RTS
;F("CTRL-C")
;F("CTRL-Y")
;F("CTRL-E")
;F("T")
;F("V")
;F("CTRL-K")
;F("S")
;F("CTRL-P")
;F("CTRL-B")
;F("-")
;F("+")
;F("M") (F=EX-OR $B0+$89)
;F("<")
;F("N")
;F("I")
;F("L")
;F("W")
;F("G")
;F("R")
;F(":")
;F(".")
;F("CR")
;F(BLANK)

FFE6:
FFE7:
FFE8:
FFE9:
FFEA:
FFEB:
FFEC:
FFED:
FFEE:
FFEF:
FFF0:
FFF1:
FFF2:
FFF3:
FFF4:
FFF5:
FFF6:
FFF7:
FFF8:
FFF9:
FFFA:
FFFB:
FFFC:
FFFD:
FFFE:
FFFF:

C1
35
8C
C3
96
AF
17
17
2B
1F
83
7F
5D
CC
B5
FC
17
17
F5
03
FB
03
59
FF
86
FA

1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153 XQTNZ

DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
DFB
EQU

TRACE-1
VFY-1
INPRT-1
STEPZ-1
OUTPRT-1
XBASIC-1
SETMODE-1
SETMODE-1
MOVE-1
LT-1
SETNORM-1
SETINV-1
LIST-1
WRITE-1
GO-1
READ-1
SETMODE-1
SETMODE-1
CRMON-1
BLANK-1
NMI
NMI/256
RESET
RESET/256
IRQ
IRQ/256
$3C

;NMI VECTOR
;RESET VECTOR
;IRQ VECTOR

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.