6502 HEX MONITOR LISTING
FF00
FF01
FF02
FF04
FF07
FF09
FF0C
FF0F
FF11
FF13
FF15
FF17
FF18
FF1A
FF1C
FF1F
FF21
FF24
FF26
FF27
FF29
FF20
FF2E
FF31
FF34
FF37
FF39
FF35
FF3D
FF3F
FF40
FF41
FF43
FF44
FF47
FF49
FF4B
FF4D
FF4F
FF51
FF53
FF55
FF57
FF59
FF5B
FF5D
FFBF
FF62
FF64
FF66
FF68
FFCA
FF6C
FFCE
FF6F
FF70
FF71
FF72
FF74
D8
58
A0 7F
SC 12 D0
A9 A7
8D 11 DO
8D 13 DO
C9 DF
FO 1 3
C9 95
FO 03
C8
10 OF
A9 DC
20 EF FF
A9 8D
20 EF FF
A0 01
88
30 F6
AD 11 D0
10 FB
AD 10 D0
99 00 02
20 EF FF
C9 8D
DO D4
AO EF
A9 00
AA
0A
85 2B
C8
B9 00 02
C9 8D
FO D4
C9 AB
90 F4
F0 F0
C9 BA
FO EB
09 L)2
pa 3n
86 28
86 29
84 ZA
59 00 02
49 50
C9 0A
90 06
69 88
C9 FA
90 11
0A
OA
0A
0A
A2 04
0A
RESET






NOTCR





ESCAPE

QETLINE


BACKSPACE

NEXTCHAR









SETSTOR
SETMODE
BLSKIP
NEXT ITEM












NEXTHEX






DIG




HEXSHIFT
CLD
CLI
LDY #$7P
STY DSP
LDA 4$A7
STA KBD CR
STA DSP CR
OMP #$DF
BEQ BACKSPACE
OMP #$9B
BEG ESCAPE
INY
BPL NEXTCHAR
LDA #$r)C
JSR FOlIO
LDA #$8D
JSR ECHO
LDY #$01
DEY
SMI GETLINE
LDA RED CR
BPL NEXTOHAR
LDA KBD
STA IN, Y
JSR ECHO
OMP #$8D
SNE NOTOR
LDY #$FF
LDA #sao
TAX
ASL
STA MODE
INY
LDA IN, Y
OMP #$SD
BEO CETLINE
OMP #$AE
BOO BLSKIP
BEG SETMOI)S
CMP #$BA
BEG SETSTOR
CMP #$D2
BEQ RUN
STX L
STX H
STY YSAV
LDA IN. Y
FOR #$BO
CMP #$OA
BCC DIG
ADO #$88
OMP #$FA
BOO NOTHEX
ASL
ASL
ASL
ASL
LDX #$04
ASL
Clear decimal arithmetic mode.

Mask for DSP data direction register.
Set it up.
KIAD and DSP control register mask.
Enable interrupts, set CA1. OBI, for
positive edge sense/output mode.
"<-"?
Yes.
ESC?
Yes.
Advance text index.
Auto ESC if >127.
"\"
Output it.
CR.
Output it.
Initiallize text index,
Backup text index.
Beyond start of line, reinitialize,
Key ready?
Loop until ready.
Load character. 57 should be "1" .
Add to text buffer.
Display cha racte r.
OR?
No.
Reset text index.
For XAM mode.
0->X.
Leaves $7IB if setting STOP mode.
$00 = XAM $7B = STOP, $AE = BLOK XAM.
Advance text index,
Get character,
OR?
Yes, done this line,
"."?
Skip delimiter.
Set BLOCK XAM mode.
":"?
Yes, set STOP mode.
"R"?
Yes, run user program.
$00->L.
and 14,
Save V for comparison.
Get character for hex test.
Map digits to SO -9.
Digit?
Yes.
Map letter "A"-"F" to SFA-FF.
Hex letter?
No, character not hex,

Hex digit to MSD of A,


Shift count.
Hex digit left MSB to carry.


- 5 -