Model 4P Boot ROM Disassembled

Memory Loc
Op Code
Memory Contents
ASCII
Comment

L0000H:

0000H
DI
F3
 
;Start here when Reset switch is pressed
0001H
LD B,(HL)
46
F
;Four pointless LD instructions which…
0002H
LD B,H
44
D
;spell the initials of the ROM’s author.
0003H
LD C,C
49
I
;When using BOOT command in 5.x & 6.x..
0004H
LD D,(HL)
56
V
;execution of ROM will start at 0005H.

L0005H:

0005H
JR L003EH
18 37
 
;Skip over the RSTs, and continue below
0007H
NOP
00
 
;Next are RST vectors — all jump to RAM
0008H
JP 04000H
C3 00 40
 
;RST 8 (Disk I/O) — will point to a copy of

L000BH:

000BH
JP 08B5H
C3 B5 08
 
;<==this instruction, so a RST 8 will go…
000EH
NOP
00
 
;from ROM to RAM and back to ROM.
000FH
NOP
00
 
;

L0010H:

0010H
JP 04003H
C3 03 40
 
;RST 10H (Display String) will also point…
0013H
JP L0249H
C3 49 02
 
;to a copy of the instruction on the…
0016H
NOP
00
 
;following line.
0017H
NOP
00
 
;
0018H
JP 04006H
C3 06 40
 
;RST 18H (Display Message)
001BH
JP L0255H
C3 55 02
 
;Ditto

L001EH:

001EH
NOP
00
 
;
001FH
NOP
00
 
;

L0020H:

0020H
JP 04009H
C3 09 40
 
;RST 20H (Get Byte)
0023H
JP L0B74H
C3 74 0B
 
;Initialized to get byte from MODEL%/III file
0026H
NOP
00
 
;(Vector in RAM is altered for RS-232 boot)
0027H
NOP
00
 
;
0028H
JP 0400CH
C3 0C 40
002BH
JP L0B48H
C3 48 0B
 
;RST 28H (Load Object Code)
002EH
NOP
00
 
;
002FH
NOP
00
 
;

L0030H:

0030H
JP 0400FH
C3 0F 40
 
;RST 30H (Scan Keyboard)

L0033H:

0033H
JP L083EH
C3 3E 08
 
;Ditto
0036H
NOP
00
 
;
0037H
NOP
00
 
;
0038H
JP 04012H
C3 12 40
 
;RST 38H — Mode 1 Interrupts
003BH
RET
C9
 
;If any interrupts, just ignore them
003CH
NOP
00
 
;(These RSTs jump to the same addresses…
003DH
NOP
00
 
;as the RSTs in the Model III ROM.)

L003EH:

003EH
XOR A
AF
 
;Initialization continues here
003FH
OUT (0E4H),A
D3 E4
 
;NMI mask — no NMIs, please
0041H
LD A,050H
3E 50
 
;Use 4 MHz clock, enable I/O bus
0043H
OUT (0ECH),A
D3 EC
 
;
0045H
LD B,007H
06 07
 
;Number of times to loop
0047H
LD HL,L000BH
21 0B 00
 
;Point to instruction to copy
004AH
LD DE,04000H
11 00 40
 
;Point to RAM destination of RST 8 jump

L004DH:

004DH
LD C,003H
0E 03
 
;Number of bytes to copy

L004FH:

004FH
LD A,(HL)
7E
 
;Copy three bytes from (HL) to (DE)…
0050H
LD (DE),A
12
 
;these are the instructions that…
0051H
INC DE
13
 
;the RSTs will jump to.
0052H
INC HL
23
 
;
0053H
DEC C
0D
 
;
0054H
JR NZ,L004FH
20 F9
 
;Copy second and third bytes of instruction
0056H
LD A,L
7D
 
;Add 5 to HL, so it points to the next…
0057H
ADD A,005H
C6 05
 
;instruction to copy into RAM.
0059H
LD L,A
6F
 
;
005AH
DJNZ L004DH
10 F1
 
;Loop until all 7 instructions are copied
005CH
LD SP,040A0H
31 A0 40
 
;Set up stack pointer
005FH
LD C,088H
0E 88
 
;CRTC Address Register
0061H
JR L00C1H
18 5E
 
;Skip over data, and continue from there

L0063H:

0063H
LD C,C
49
I
;Extension for ROM image file
0064H
LD C,C
49
I
0065H
LD C,C
49
I
0066H
JP 04015H
C3 15 40
 
;NMI — Jump here (and proceed) if NMI occurs

L0069H:

0069H
JP L0A48H
C3 48 0A
 
;This block is copied to RAM, 4015H-4047H
006CH
LD C,L
4D
M
;Filename for ROM image
006DH
LD C,A
4F
O
006EH
LD B,H
44
D
006FH
LD B,L
45
E
0070H
LD C,H
4C
L
0071H
DEC H
25
%
0072H
JR NZ,34
20 20
0074H
XOR A
AF
 
;Last part of boot — ends up at 4020H
0075H
OUT (09CH),A
D3 9C
 
;Switch boot ROM out…
0077H
JP 04300H
C3 00 43
 
;and start executing boot sector.
007AH
NOP
00
 
;
007BH
LD H,(HL)
66
f
;Ends up at 4027H — pointless LDs, which…
007CH
LD H,H
64
d
;are the author’s initials in lowercase.
007DH
LD L,C
69
i
;Executed when fatal error occurs, and…
007EH
HALT
76
v
;<==this instruction ends the boot procedure.
007FH
NOP
00
 
;

L0080H:

0080H
LD SP,03128H
31 28 31
1 ( 1
;Boot ROM version and date… 1 ( 1
0083H
LD (HL),029H
36 29
6 )
0085H
JR NZ,L00B8H
20 31
1
0087H
JR C,L00B6H
38 2D
8 –
0089H
LD C,A
4F
O
008AH
LD H,E
63
c
008BH
LD (HL),H
74
t
008CH
DEC L
2D
008DH
JR C,53
38 33
8 3
008FH
NOP
00
 
;message terminated with zero byte.
0090H
NOP
00
 
;
0091H
NOP
00
 
;
0092H
XOR A
AF
 
;Ends up at 403EH after block copy
0093H
OUT (09CH),A
D3 9C
 
;Switch boot ROM out…
0095H
LD HL,(L000BH)
2A 0B 00
 
;Get word from from ROM image, or…
0098H
INC A
3C
 
;whatever’s there instead.
0099H
OUT (09CH),A
D3 9C
 
;Boot ROM back in, and return
009BH
RET
C9
 
;This is the end of the block copied to RAM.

L009CH:

009CH
LD B,D
42
B
;
009DH
LD L,A
6F
o
009EH
LD L,A
6F
o
009FH
LD (HL),H
74
t
00A0H
JR NZ,84
20 52
R
00A2H
LD C,A
4F
O
00A3H
LD C,L
4D
M
00A4H
JR NZ,L00FCH
20 56
V
00A6H
LD H,L
65
e
00A7H
LD (HL),D
72
r
00A8H
LD (HL),E
73
s
00A9H
LD L,C
69
i
00AAH
LD L,A
6F
o
00ABH
LD L,(HL)
6E
n
00ACH
JR NZ,75
20 49
I
00AEH
LD (HL),E
73
s
00AFH
JR NZ,L00B1H
20 00
 
;Message terminated with zero byte

L00B1H: (CRTCH REGISTER VALUES. NOTE NO ‘0 HORIZONTAL TOTAL’)

00B1H
NOP
00
 
;1 Horizontal Displayed (80 char.)
00B2H
NOP
00
 
;2 H. Sync Position
00B3H
NOP
00
 
;3 H. Sync Width
00B4H
NOP
00
 
;4 Vertical Total (25 lines)
00B5H
NOP
00
 
;5 V. Total Adjust

L00B6H:

00B6H
NOP
00
 
;6 Vertical Displacement
00B7H
NOP
00
 
;7 V.Sync Position

L00B8H:

00B8H
NOP
00
 
;8 Interlace Mode
00B9H
NOP
00
 
;9 Max Scan Line Address
00BAH
NOP
00
 
;a Cursor Start
00BBH
NOP
00
 
;b Cursor End
00BCH
NOP
00
 
;c Start Address (H)
00BDH
NOP
00
 
;d Start Address (L)
00BEH
NOP
00
 
;e Cursor (H)

L00BFH:

00BFH
NOP
00
 
;f Cursor (L)

L00C0H:

00C0H
NOP
00
.

L00C1H:

00C1H
IM 1
ED 56
 
;Z80 was set to IM 0 by RESET
00C3H
LD A,0D0H
3E D0
 
;Terminate command w/o interrupt
00C5H
OUT (0F0H),A
D3 F0
 
;to FDC
00C7H
LD B,00FH
06 0F
 
;Number of CRTC registers to program
00C9H
LD HL,L00BFH
21 BF 00
 
;Point to data for register 15

L00CCH:

00CCH
LD A,(HL)
7E
 
;Get data for CRTC register
00CDH
OUT (C),B
ED 41
 
;Send register number to CRTC addr register
00CFH
OUT (089H),A
D3 89
 
;Send data to CRTC data register
00D1H
DEC HL
2B
 
;Point to next byte of data
00D2H
DJNZ L00CCH
10 F8
 
;Repeat for next register, down to R1
00D4H
LD A,(03820H)
3A 20 38
 
;Keyboard column 5
00D7H
BIT 6,A
CB 77
 
;. pressed?
00D9H
JP NZ,L0CF2H
C2 F2 0C
 
;If yes, then go to RAM test
00DCH
LD A,080H
3E 80
 
;Set second page of video memory…
00DEH
OUT (084H),A
D3 84
 
;
00E0H
CALL SUB_0206H
CD 06 02
 
;and clear it.
00E3H
LD A,000H
3E 00
 
;Back to first page of video memory
00E5H
OUT (084H),A
D3 84
 
;
00E7H
CALL SUB_0206H
CD 06 02
 
;Clear that too
00EAH
LD DE,04015H
11 15 40
 
;Point to destination in RAM for block copy
00EDH
LD HL,L0069H
21 69 00
 
;Point to source, in ROM
00F0H
LD BC,L0033H
01 33 00
 
;Length of block
00F3H
LDIR
ED B0
 
;Copy it into RAM

L00F5H:

00F5H
LD HL,04055H
21 55 40
 
;Point to boot ROM’s data area in RAM…
00F8H
LD (HL),000H
36 00
 
;and clear it.
00FAH
LD D,H
54
 
;
00FBH
LD E,L
5D
 
;

L00FCH:

00FCH
INC DE
13
 
;
00FDH
LD BC,00015H
01 15 00
 
;Number of bytes to clear, minus one
0100H
LDIR
ED B0
 
;
0102H
LD BC,07FFFH
01 FF 7F
 
;Number of times to scan keyboard…
0105H
RST 30H
F7
 
;so scan the keyboard.
0106H
PUSH AF
F5
 
;Save the result
0107H
LD A,001H
3E 01
 
;Floppy disk drive
0109H
LD B,004H
06 04
 
;Restore — drive 0
010BH
RST 8
CF
 
;Do disk I/O
010CH
JR Z,L0115H
28 07
 
;Jump if no errors…
010EH
LD (04067H),A
32 67 40
 
;else store error code.
0111H
CP 006H
FE 06
 
;Was the error “Floppy not available”?
0113H
JR Z,L011AH
28 05
 
;If yes, then skip next three lines

L0115H:

0115H
LD B,032H
06 32
 
;Restore drives 1,2,3 (if possible)
0117H
LD A,001H
3E 01
 
;Floppy disk drive
0119H
RST 8
CF
 
;Do disk I/O

L011AH:

011AH
POP AF
F1
 
;Retrieve result of keyboard scan
011BH
JR Z,L0163H
28 46
 
;If no keys pressed, then try everything
011DH
LD A,(04059H)
3A 59 40
 
;Get value stored by kbd scan
0120H
CP 086H
FE 86
 
;Was it either F1 or 1?
0122H
JR NZ,L0129H
20 05
 
;If not, then jump…
0124H
CALL SUB_01C0H
CD C0 01
 
;else try HD boot — returns only if…
0127H
JR L0130H
18 07
 
;unsuccessful, so jump (error no. in A).

L0129H:

0129H
CP 087H
FE 87
 
;Was either F2 or 2 pressed?
012BH
JR NZ,L0135H
20 08
 
;If not, skip next few lines
012DH
CALL SUB_01CAH
CD CA 01
 
;Try floppy boot (returns only if error)

L0130H:

0130H
OR A
B7
 
;Error in HD or floppy boot
0131H
JR Z,L0137H
28 04
 
;If error 0 (Mod III disk), then jump…
0133H
JR L0151H
18 1C
 
;else display fatal error and halt.

L0135H:

0135H
CP 088H
FE 88
 
;Was either F3 or 3 pressed?

L0137H:

0137H
JR Z,L0175H
28 3C
 
;If yes, then try Model III boot
0139H
CP 080H
FE 80
 
;Was V (display ROM version) pressed?
013BH
JR NZ,L014AH
20 0D
 
;If not, then skip next few lines
013DH
LD DE,L0000H
11 00 00
 
;Display at top of screen
0140H
LD HL,L009CH
21 9C 00
 
;’Boot ROM Version Is ‘
0143H
RST 10H
D7
 
;Display it
0144H
LD HL,L0080H
21 80 00
 
;Point to boot ROM version…
0147H
RST 10H
D7
 
;and display it…
0148H
JR L0160H
18 16
 
;and halt.

L014AH:

014AH
CP 083H
FE 83
 
;Was Right Shift pressed?
014CH
JP Z,L0C1AH
CA 1A 0C
 
;If yes, then jump to RS-232 boot…
014FH
JR L00F5H
18 A4
 
;else clear data, scan kbd, repeat.

L0151H:

0151H
ADD A,A
87
 
;Fatal Error: Multiply error number by 2
0152H
LD HL,L0273H
21 73 02
 
;Start of list for messages
0155H
LD D,000H
16 00
 
;Error number times two into DE
0157H
LD E,A
5F
 
;
0158H
ADD HL,DE
19
 
;Point to appropriate entry in list
0159H
LD A,(HL)
7E
 
;Get start of table for message into HL
015AH
INC HL
23
 
;
015BH
LD H,(HL)
66
 
;
015CH
LD L,A
6F
 
;
015DH
XOR A
AF
 
;Set Z bec. we have starting position for msg
015EH
LD E,A
5F
 
;D is still 0 — 0000H means top of screen
015FH
RST 18H
DF
 
;Display message…

L0160H:

0160H
JP 04027H
C3 27 40
 
;and HALT. End of an unsuccessful boot!

L0163H:

0163H
LD A,055H
3E 55 U
 
;No keys were pressed during keyboard scan:
0165H
LD B,A
47
 
;Take a ‘U’…
0166H
OUT (0B6H),A
D3 B6
 
;send it out, and see if there’s an…
0168H
IN A,(0B6H)
DB B6
 
;Arcnet board to echo it.
016AH
CP B
B8
 
;Is an Arcnet board attached?
016BH
CALL Z,SUB_0C15H
CC 15 0C
 
;If it is, try Arcnet boot
016EH
CALL SUB_01C0H
CD C0 01
 
;Try hard drive boot (no return if success)
0171H
OR A
B7
 
;Ignore error 0 (M3 disk or 512-byte sector)
0172H
CALL NZ,SUB_01CAH
C4 CA 01
 
;If other error, try floppy boot

L0175H:

0175H
LD A,(04066H)
3A 66 40
 
;Model III boot:
0178H
OR A
B7
 
;Was L pressed?
0179H
JR NZ,L0180H
20 05
 
;If it was, skip next two lines
017BH
CALL SUB_01EBH
CD EB 01
 
;Is ROM image already loaded?
017EH
JR Z,L01A2H
28 22
 
;If it is, then skip next section

L0180H:

0180H
LD A,(04067H)
3A 67 40
 
;Error code from restore cmd on floppy 0
0183H
OR A
B7
 
;Was there an error?
0184H
JR NZ,L0151H
20 CB
 
;If so, display error message and halt
0186H
LD A,001H
3E 01
 
;Write-enable 0000H-37FFH
0188H
OUT (084H),A
D3 84
 
;Read boot ROM, but write to RAM
018AH
LD DE,L0000H
11 00 00
 
;Display message at top of screen
018DH
LD HL,L0491H
21 91 04
 
;’Loading ROM Image…’
0190H
RST 18H
DF
 
;Display it
0191H
CALL SUB_0A72H
CD 72 0A
 
;Load ROM image from floppy disk
0194H
PUSH AF
F5
 
;Save registers…
0195H
PUSH HL
E5
 
;
0196H
CALL SUB_0206H
CD 06 02
 
;clear screen (erase ‘Loading…’ msg)…
0199H
POP HL
E1
 
;
019AH
POP AF
F1
 
;restore registers.
019BH
JR NZ,L0151H
20 B4
 
;If error loading image, display msg & halt
019DH
LD A,001H
3E 01
 
;Indicate ROM image was just loaded
019FH
LD (04058H),A
32 58 40
 
;Store it

L01A2H:

01A2H
LD (04024H),HL
22 24 40
 
;Put transfer addr for ROM image…
01A5H
LD A,(04065H)
3A 65 40
 
;into last part of boot routine.
01A8H
OR A
B7
 
;
01A9H
JR Z,L01B6H
28 0B
 
;If P was NOT pressed, skip next few lines
01ABH
LD HL,L0443H
21 43 04
 
;’ROM image loaded — press ENTER or BREAK’
01AEH
RST 18H
DF
 
;Display it

L01AFH:

01AFH
LD A,(03840H)
3A 40 38
 
;Keyboard matrix — column 6
01B2H
AND 005H
E6 05
 
;Loop until ENTER or BREAK
01B4H
JR Z,L01AFH
28 F9
 
;the ROM image will check for BREAK.

L01B6H:

01B6H
XOR A
AF
 
;Set 0000H-37FFH back to read-only…
01B7H
OUT (084H),A
D3 84
 
;still using Model III memory map.
01B9H
LD A,010H
3E 10
 
;2 MHz clock, I/O bus enabled
01BBH
OUT (0ECH),A
D3 EC
 
;
01BDH
JP 04020H
C3 20 40
 
;Jump to last portion of boot code

SUB_01C0H:

01C0H
LD A,002H
3E 02
 
;Hard Drive Boot:
01C2H
LD B,001H
06 01
 
;Initialize & restore
01C4H
RST 8
CF
 
;Do disk I/O
01C5H
RET NZ
C0
 
;Return if any errors…
01C6H
LD A,002H
3E 02
 
;else indicate HD…
01C8H
JR L01D0H
18 06
 
;and attempt to boot.

SUB_01CAH:

01CAH
LD A,(04067H)
3A 67 40
 
;Error code from floppy restore cmd
01CDH
OR A
B7
 
;
01CEH
RET NZ
C0
 
;If there had been any errors, then return…
01CFH
INC A
3C
 
;A=1 indicates floppy I/O

L01D0H:

01D0H
LD BC,L0C01H
01 01 0C
 
;0CH=Read, 01H=sector to read
01D3H
LD (04055H),A
32 55 40
 
;Store boot type (1 for floppy, 2 for HD)
01D6H
LD DE,L0000H
11 00 00
 
;Cylinder to read
01D9H
LD HL,04300H
21 00 43
 
;Address of buffer for sector
01DCH
RST 8
CF
 
;Do disk I/O
01DDH
RET NZ
C0
 
;Return if any errors
01DEH
LD A,E
7B
 
;Length of sector that was read…
01DFH
LD (04056H),A
32 56 40
 
;1 for 256 bytes, 2 for 512 — store it.
01E2H
DEC A
3D
 
;Was it a 256-byte sector?
01E3H
CALL Z,SUB_0215H
CC 15 02
 
;If so, see if it needs ROM image
01E6H
JR Z,L01B6H
28 CE
 
;If ROM image NOT needed, then jump & boot…
01E8H
LD A,000H
3E 00
 
;else ‘ROM Image Not Found’…
01EAH
RET
C9
 
;and return (NZ set).

SUB_01EBH:

01EBH
LD HL,03000H
21 00 30
 
;Check if ROM image is in memory:
01EEH
LD B,00AH
06 0A
 
;Start at 3000H
01F0H
LD A,0C3H
3E C3
 
;Opcode for JP instruction

L01F2H:

01F2H
CP (HL)
BE
 
;Do we have a JP?
01F3H
RET NZ
C0
 
;If not, no ROM image in memory
01F4H
INC HL
23
 
;Point to third byte following…
01F5H
INC HL
23
 
;make sure that the ROM image’s…
01F6H
INC HL
23
 
;jump table is in place.
01F7H
DJNZ L01F2H
10 F9
 
;Check ten times in all
01F9H
CALL 0403EH
CD 3E 40
 
;Code had been copied from 0092H to 403EH…
01FCH
XOR A
AF
 
;it gets the word at 000BH from ROM image.
01FDH
LD DE,0E9E1H
11 E1 E9
 
;Value that ought to be there for ROM image
0200H
SBC HL,DE
ED 52
 
;Set Z if ROM image present, else NZ
0202H
LD HL,03015H
21 15 30
 
;Transfer address if image already loaded
0205H
RET
C9
 
;

SUB_0206H:

0206H
LD A,020H
3E 20
 
;Clear Screen: Put space into A
0208H
LD HL,03C00H
21 00 3C
 
;Start of video memory
020BH
LD BC,L03FFH
01 FF 03
 
;Length of screen, minus one
020EH
LD (HL),A
77
 
;Put space at start of screen
020FH
LD D,H
54
 
;Set DE to…
0210H
LD E,L
5D
 
;
0211H
INC DE
13
 
;HL plus one.
0212H
LDIR
ED B0
 
;Voila!
0214H
RET
C9
 
;The screen has been cleared.

SUB_0215H:

0215H
LD A,(04064H)
3A 64 40
 
;Address for recording N key
0218H
OR A
B7
 
;Was N key pressed?
0219H
JR NZ,L0228H
20 0D
 
;If yes, don’t check if ROM image is needed
021BH
LD HL,04300H
21 00 43
 
;Point to start of the boot sector we read
021EH
LD B,0FEH
06 FE
 
;Number of bytes to check

L0220H:

0220H
LD A,0CDH
3E CD
 
;Opcode for CALL instruction
0222H
CP (HL)
BE
 
;Look in boot sector for a CALL
0223H
JR Z,L023FH
28 1A
 
;Jump if we find one…

L0225H:

0225H
INC HL
23
 
;else point to next byte…
0226H
DJNZ L0220H
10 F8
 
;and keep looking.

L0228H:

0228H
CALL SUB_01EBH
CD EB 01
 
;Is ROM image in memory?
022BH
JR NZ,L023DH
20 10
 
;Jump if not, because we won’t need to…
022DH
LD A,001H
3E 01
 
;destroy the ROM image.
022FH
OUT (084H),A
D3 84
 
;Write-enable that part of RAM
0231H
LD HL,03000H
21 00 30
 
;Starting at 3000H…
0234H
LD D,H
54
 
;
0235H
LD E,L
5D
 
;
0236H
LD (HL),L
75
 
;put zeros into…
0237H
INC DE
13
 
;
0238H
LD BC,L001EH
01 1E 00
 
;1EH consecutive bytes…
023BH
LDIR
ED B0
 
;from 3000H to 301DH.

L023DH:

023DH
XOR A
AF
 
;Set Z flag to indicate that we won’t need…
023EH
RET
C9
 
;to load the ROM image, and RETurn.

L023FH:

023FH
INC HL
23
 
;Point to next byte in boot sector…
0240H
DEC B
05
 
;and decrement byte counter.
0241H
INC HL
23
 
;Point to second byte after “CALL”…
0242H
DEC B
05
 
;which is the MSB of the CALL’s destination.
0243H
LD A,(HL)
7E
 
;

L0244H:

0244H
OR A
B7
 
;Is it a call to page 0? (CALL 00xxH)
0245H
JR NZ,L0225H
20 DE
 
;If not, keep looking through boot sector…
0247H
OR L
B5
 
;else set NZ to indicate we’ll need the…
0248H
RET
C9
 
;ROM image, and RETurn.

L0249H:

0249H
LD A,D
7A
 
;RST 10H — Display String
024AH
OR 03CH
F6 3C
 
;Point DE to video memory
024CH
LD D,A
57
 
;

L024DH:

024DH
LD A,(HL)
7E
 
;Get character to display
024EH
OR A
B7
 
;Is it zero?
024FH
RET Z
C8
 
;If zero, then we’re done displaying it
0250H
LD (DE),A
12
 
;Put character into video memory
0251H
INC HL
23
 
;Next character to display
0252H
INC DE
13
 
;Next byte in video memory
0253H
JR L024DH
18 F8
 
;Repeat for next character, until done

L0255H:

0255H
JR Z,L025BH
28 04
 
;RST 18H — Display Message: If Z, then…

L0257H:

0257H
LD E,(HL)
5E
 
;we already have display position in DE…
0258H
INC HL
23
 
;else HL points to it, and we must…
0259H
LD D,(HL)
56
 
;read it into DE.
025AH
INC HL
23
 
;

L025BH:

025BH
LD B,H
44
 
;Now BC points to the…
025CH
LD C,L
4D
 
;table of strings to display.

L025DH:

025DH
LD A,(BC)
0A
 
;Get first value from table into HL
025EH
INC BC
03
 
;
025FH
LD L,A
6F
 
;
0260H
LD A,(BC)
0A
 
;
0261H
INC BC
03
 
;
0262H
LD H,A
67
 
;
0263H
INC A
3C
 
;Does MSB = 0FFH?
0264H
JR NZ,L0270H
20 0A
 
;Jump if not (display string & loop again)
0266H
LD A,L
7D
 
;
0267H
INC A
3C
 
;Does LSB = 0FFH?
0268H
RET Z
C8
 
;If it does, we’re done
0269H
INC A
3C
 
;Does LSB = 0FEH?
026AH
JR NZ,L0270H
20 04
 
;Jump if not (display string & loop again)
026CH
PUSH BC
C5
 
;Must be 0FFFEH…load pointer to…
026DH
POP HL
E1
 
;table of strings into HL…
026EH
JR L0257H
18 E7
 
;get display position for next part of msg.

L0270H:

0270H
RST 10H
D7
 
;Display string that HL points to…
0271H
JR L025DH
18 EA
 
;and repeat for next value in table.

L0273H:

0273H
ADC A,L
8D
 
;Points to phrases for Error 0 message
0274H
LD (BC),A
02
0275H
OR A
B7
 
;Ditto for Error 1
0276H
LD (BC),A
02
0277H
IN A,(002H)
DB 02
 
;Error 2
0279H
INC BC
03
 
;Error 3
027AH
INC BC
03
027BH
DEC H
25
 
;Error 4
027CH
INC BC
03
027DH
LD C,C
49
 
;Error 5
027EH
INC BC
03
027FH
LD L,A
6F
 
;Error 6
0280H
INC BC
03
0281H
SUB A
97
 
;Error 7
0282H
INC BC
03
0283H
OR C
B1
 
;Error 8
0284H
INC BC
03
0285H
PUSH DE
D5
 
;Error 9
0286H
INC BC
03
0287H
RST 30H
F7
 
;Error 10 (0AH)
0288H
INC BC
03
0289H
SCF
37
 
;Error 11 (0BH)
028AH
INC B
04
028BH
DEC A
3D
 
;Error 12 (0CH)
028CH
INC B
04
028DH
OR A
B7
 
;Error 0 — pointers to phrases: ‘The ‘
028EH
INC B
04
028FH
PUSH BC
C5
 
;’ROM Image ‘
0290H
INC B
04
0291H
RET NC
D0
 
;’Was Not ‘
0292H
INC B
04
0293H
EXX
D9
 
;’Found On Drive ‘
0294H
INC B
04
0295H
JP (HL)
E9
 
;’0′
0296H
INC B
04
0297H
CP 0FFH
FE FF
 
;End of this part of message
0299H
RET NZ
C0
 
;Display next part of msg at row 3, col 0
029AH
NOP
00
029BH
PUSH BC
C5
 
;’ROM Image ‘
029CH
INC B
04
029DH
JP PE,0F105H
EA 05 F1
 
;’Nicht ‘ ;’Gefunden Auf ‘
02A0H
DEC B
05
02A1H
ADD HL,BC
09
 
;’Laufwerk ‘ ;’0’
02A2H
LD B,0E9H
06 E9
02A4H
INC B
04
02A5H
CP 0FFH
FE FF
 
;End of this part of message
02A7H
ADD A,B
80
 
;Display next part at row 6, col 0
02A8H
LD BC,004C9H
01 C9 04
 
;’Image ‘
02ABH
DEFB 0DDH,007H,000H
DD 07 00
 
;’ROM ‘ ;’Absent’
02AEH
RLCA
07
02AFH
RLCA
07
 
;’e Du ‘
02B0H
RLCA
07
02B1H
LD (HL),C
71
 
;’Disque’
02B2H
RLCA
07
02B3H
DEC C
0D
 
;’ Dans l`Unite 0′
02B4H
RLCA
07
02B5H
RST 38H
FF
 
;0FFFFH = End of message
02B6H
RST 38H
FF
02B7H
EX DE,HL
EB
 
;Error 1: ‘Arcnet ‘
02B8H
INC B
04
02B9H
DI
F3
 
;’Boot ‘
02BAH
INC B
04
02BBH
LD SP,HL
F9
 
;’Is Not ‘
02BCH
INC B
04
02BDH
LD BC,0FE05H
01 05 FE
 
;’Available ‘
02C0H
RST 38H
FF
02C1H
RET NZ
C0
02C2H
NOP
00
02C3H
EX DE,HL
EB
 
;’Arcnet ‘
02C4H
INC B
04
02C5H
DI
F3
 
;’Boot ‘
02C6H
INC B
04
02C7H
AND 005H
E6 05
 
;’Ist Nicht ‘
02C9H
RET P
F0
 
;’Im System’
02CAH
LD B,0FEH
06 FE
02CCH
RST 38H
FF
02CDH
ADD A,B
80
02CEH
LD BC,L04F3H
01 F3 04
 
;’Boot ‘
02D1H
EX DE,HL
EB
 
;’Arcnet ‘
02D2H
INC B
04
02D3H
NOP
00
 
;’Absent’
02D4H
RLCA
07
02D5H
EX AF,AF’
08
 
;’ Du ‘
02D6H
RLCA
07
02D7H
DEC E
1D
 
;’Systeme ‘
02D8H
RLCA
07
02D9H
RST 38H
FF
02DAH
RST 38H
FF
02DBH
PUSH BC
C5
 
;Error 2: ‘ROM Image ‘
02DCH
INC B
04
02DDH
INC C
0C
 
;’Can`t Be Loaded – ‘
02DEH
DEC B
05
02DFH
RRA
1F
 
;’Too Many Extents’
02E0H
DEC B
05
02E1H
CP 0FFH
FE FF
02E3H
RET NZ
C0
02E4H
NOP
00
02E5H
PUSH BC
C5
 
;’ROM Image ‘
02E6H
INC B
04
02E7H
INC DE
13
 
;’Kann ‘
02E8H
LD B,0EAH
06 EA
 
;’Nicht ‘
02EAH
DEC B
05
02EBH
DEC E
1D
 
;’Geladen ‘
02ECH
LD B,053H
06 53
 
;’Werden ‘
02EEH
LD B,01CH
06 1C
 
;’- ‘
02F0H
DEC B
05
02F1H
LD E,E
5B
 
;’Zu Viele Bereiche’
02F2H
LD B,0FEH
06 FE
02F4H
RST 38H
FF
02F5H
ADD A,B
80
02F6H
LD BC,004C9H
01 C9 04
 
;’Image ‘
02F9H
DEFB 0DDH,007H,026H
DD 07 26
 
;’ROM ‘ ;’Non Chargeable ‘
02FCH
RLCA
07
02FDH
INC E
1C
 
;’- ‘
02FEH
DEC B
05
02FFH
LD (HL),007H
36 07
 
;’Segments Trop Numbreux’
0301H
RST 38H
FF
0302H
RST 38H
FF
0303H
OR A
B7
 
;Error 3: ‘The ‘
0304H
INC B
04
0305H
JR C,L030CH
38 05
 
;’Hard Disk ‘
0307H
JP PO,0F904H
E2 04 F9
 
;’Drive ‘ ;’Is Not ‘
030AH
INC B
04
030BH
LD D,B
50
 
;’Ready ‘

L030CH:

030CH
DEC B
05
030DH
CP 0FFH
FE FF
030FH
RET NZ
C0
.
0310H
NOP
00
.
0311H
LD B,E
43
C
0312H
LD B,0E6H
06 E6
. .
0314H
DEC B
05
.
0315H
LD L,L
6D
m
0316H
LD B,0FEH
06 FE
. .
0318H
RST 38H
FF
.
0319H
ADD A,B
80
.
031AH
LD BC,L074DH
01 4D 07
. M .
031DH
LD (HL),C
71
q
031EH
RLCA
07
.
031FH
ADD A,C
81
.
0320H
RLCA
07
.
0321H
ADD A,A
87
.
0322H
RLCA
07
.
0323H
RST 38H
FF
.
0324H
RST 38H
FF
.
0325H
OR A
B7
.
0326H
INC B
04
.
0327H
JR NC,L032EH
30 05
0 .
0329H
DEC A
3D
=
032AH
DEC B
05
.
032BH
JP PO,0F904H
E2 04 F9
. . .

L032EH:

032EH
INC B
04
.
032FH
LD D,B
50
P
0330H
DEC B
05
.
0331H
CP 0FFH
FE FF
. .
0333H
RET NZ
C0
.
0334H
NOP
00
.
0335H
RST 38H
FF
.
0336H
DEC B
05
.
0337H
JP PE,06D05H
EA 05 6D
. . m
033AH
LD B,0FEH
06 FE
. .
033CH
RST 38H
FF
.
033DH
ADD A,B
80
.
033EH
LD BC,L074DH
01 4D 07
. M .
0341H
LD (HL),C
71
q
0342H
RLCA
07
.
0343H
LD A,B
78
x
0344H
RLCA
07
.
0345H
ADD A,A
87
.
0346H
RLCA
07
.
0347H
RST 38H
FF
.
0348H
RST 38H
FF
.
0349H
OR A
B7
.
034AH
INC B
04
.
034BH
JR C,7
38 05
8 .
034DH
JP PO,0F904H
E2 04 F9
. . .
0350H
INC B
04
.
0351H
LD BC,0FE05H
01 05 FE
. . .
0354H
RST 38H
FF
.
0355H
RET NZ
C0
.
0356H
NOP
00
.
0357H
LD B,E
43
C
0358H
LD B,0E6H
06 E6
. .
035AH
DEC B
05
.
035BH
RET P
F0
.
035CH
LD B,0FEH
06 FE
. .
035EH
RST 38H
FF
.
035FH
ADD A,B
80
.
0360H
LD BC,L074DH
01 4D 07
. M .
0363H
LD (HL),C
71
q
0364H
RLCA
07
.
0365H
ADD A,C
81
.
0366H
RLCA
07
.
0367H
NOP
00
.
0368H
RLCA
07
.
0369H
EX AF,AF’
08
.
036AH
RLCA
07
.
036BH
DEC E
1D
.
036CH
RLCA
07
.
036DH
RST 38H
FF
.
036EH
RST 38H
FF
.
036FH
OR A
B7
.
0370H
INC B
04
.
0371H
JR NC,L0378H
30 05
0 .
0373H
DEC A
3D
=
0374H
DEC B
05
.
0375H
JP PO,0F904H
E2 04 F9
. . .

L0378H:

0378H
INC B
04
.
0379H
LD BC,0FE05H
01 05 FE
. . .
037CH
RST 38H
FF
.
037DH
RET NZ
C0
.
037EH
NOP
00
.
037FH
RST 38H
FF
.
0380H
DEC B
05
.
0381H
AND 005H
E6 05
. .
0383H
RET P
F0
.
0384H
LD B,0FEH
06 FE
. .
0386H
RST 38H
FF
.
0387H
ADD A,B
80
.
0388H
LD BC,L074DH
01 4D 07
. M .
038BH
LD (HL),C
71
q
038CH
RLCA
07
.
038DH
LD A,B
78
x
038EH
RLCA
07
.
038FH
NOP
00
.
0390H
RLCA
07
.
0391H
EX AF,AF’
08
.
0392H
RLCA
07
.
0393H
DEC E
1D
.
0394H
RLCA
07
.
0395H
RST 38H
FF
.
0396H
RST 38H
FF
.
0397H
LD D,A
57
W
0398H
DEC B
05
.
0399H
OR A
B7
.
039AH
INC B
04
.
039BH
JR NC,7
30 05
0 .
039DH
JP PO,05E04H
E2 04 5E
. . ^
03A0H
DEC B
05
.
03A1H
CP 0FFH
FE FF
. .
03A3H
RET NZ
C0
.
03A4H
NOP
00
.
03A5H
RST 38H
FF
.
03A6H
DEC B
05
.
03A7H
LD (HL),L
75
u
03A8H
LD B,0FEH
06 FE
. .
03AAH
RST 38H
FF
.
03ABH
ADD A,B
80
.
03ACH
LD BC,L0792H
01 92 07
. . .
03AFH
RST 38H
FF
.
03B0H
RST 38H
FF
.
03B1H
LD A,L
7D
}
03B2H
DEC B
05
.
03B3H
ADD A,A
87
.
03B4H
DEC B
05
.
03B5H
ADC A,L
8D
.
03B6H
DEC B
05
.
03B7H
LD H,A
67
g
03B8H
DEC B
05
.
03B9H
SUB B
90
.
03BAH
DEC B
05
.
03BBH
DEC A
3D
=
03BCH
DEC B
05
.
03BDH
CP 0FFH
FE FF
.
03BFH
RET NZ
C0
.
03C0H
NOP
00
.
03C1H
LD A,L
7D
}
03C2H
DEC B
05
.
03C3H
SBC A,B
98
.
03C4H
LD B,0A1H
06 A1
. .
03C6H
LD B,0FEH
06 FE
. .
03C8H
RST 38H
FF
.
03C9H
ADD A,B
80
.
03CAH
LD BC,L07BBH
01 BB 07
. . .
03CDH
OR L
B5
.
03CEH
RLCA
07
.
03CFH
XOR D
AA
.
03D0H
RLCA
07
.
03D1H
LD E,E
5B
[
03D2H
RLCA
07
.
03D3H
RST 38H
FF
.
03D4H
RST 38H
FF
.
03D5H
ADD A,D
82
.
03D6H
DEC B
05
.
03D7H
ADC A,L
8D
.
03D8H
DEC B
05
.
03D9H
LD H,A
67
g
03DAH
DEC B
05
.
03DBH
SUB B
90
.
03DCH
DEC B
05
.
03DDH
DEC A
3D
=
03DEH
DEC B
05
.
03DFH
CP 0FFH
FE FF
. .
03E1H
RET NZ
C0
.
03E2H
NOP
00
.
03E3H
JP M,09806H
FA 06 98
. . .
03E6H
LD B,0A1H
06 A1
. .
03E8H
LD B,0FEH
06 FE
. .
03EAH
RST 38H
FF
.
03EBH
ADD A,B
80
.
03ECH
LD BC,L07BBH
01 BB 07
. . .
03EFH
JP 0AA07H
C3 07 AA
. . .
03F2H
RLCA
07
.
03F3H
LD E,E
5B
[

L03F4H:

03F4H
RLCA
07
.
03F5H
RST 38H
FF
.
03F6H
RST 38H
FF
.
03F7H
OR A
B7
.
03F8H
INC B
04
.
03F9H
PUSH BC
C5
.
03FAH
INC B
04
.
03FBH
INC C
0C
.
03FCH
DEC B
05
.
03FDH
JR NC,L0404H
30 05
0 .

L03FFH:

03FFH
DEC A
3D
=
0400H
DEC B
05
.
0401H
JP PO,0F904H
E2 04 F9
. . .

L0404H:

0404H
INC B
04
.
0405H
LD D,B
50
P
0406H
DEC B
05
.
0407H
CP 0FFH
FE FF
. .
0409H
RET NZ
C0
.
040AH
NOP
00
.
040BH
PUSH BC
C5
.
040CH
INC B
04
.
040DH
INC DE
13
.
040EH
LD B,0EAH
06 EA
. .
0410H
DEC B
05
.
0411H
DEC E
1D
.
0412H
LD B,053H
06 53
. S
0414H
LD B,01CH
06 1C
. .
0416H
DEC B
05
.
0417H
RST 38H
FF
.
0418H
DEC B
05
.
0419H
CP 0FFH
FE FF
. .
041BH
NOP
00
.
041CH
LD BC,L05E6H
01 E6 05
. . .
041FH
LD L,L
6D
m
0420H
LD B,0FEH
06 FE
. .
0422H
RST 38H
FF
.
0423H
ADD A,B
80
.
0424H
LD BC,004C9H
01 C9 04
. . .
;illegal sequence
0427H
DEFB 0DDH,007H,026H
DD 07 26
. . &
042AH
RLCA
07
.
042BH
INC E
1C
.
042CH
DEC B
05
.
042DH
LD C,L
4D
M
042EH
RLCA
07
.
042FH
LD (HL),C
71
q

L0430H:

0430H
RLCA
07
.
0431H
LD A,B
78
x
0432H
RLCA
07
.
0433H
ADD A,A
87
.
0434H
RLCA
07
.
0435H
RST 38H
FF
.
0436H
RST 38H
FF
.
0437H
LD (HL),D
72
r
0438H
DEC B
05
.
0439H
ADD A,A
87
.
043AH
DEC B
05
.
043BH
RST 38H
FF
.
043CH
RST 38H
FF
.
043DH
JP PO,08705H
E2 05 87
. . .
0440H
DEC B
05
.
0441H
RST 38H
FF
.
0442H
RST 38H
FF
.

L0443H:

0443H
NOP
00
.
0444H
NOP
00
.
0445H
OR A
B7
.
0446H
INC B
04
.
0447H
PUSH BC
C5
.
0448H
INC B
04
.
0449H
AND B
A0
.
044AH
DEC B
05
.
044BH
INC D
14
.
044CH
DEC B
05
.
044DH
XOR C
A9
.
044EH
DEC B
05
.
044FH
CP 0FFH
FE FF
. .
0451H
LD B,B
40
@
0452H
NOP
00
.
0453H
RST 0
C7
.
0454H
DEC B
05
.
0455H
SUB 005H
D6 05
. .
0457H
LD B,E
43
C
0458H
DEC B
05
.
0459H
CP 0FFH
FE FF
. .
045BH
RET NZ
C0
.
045CH
NOP
00
.
045DH
PUSH BC
C5
.
045EH
INC B
04
.
045FH
ADD HL,DE
19
.
0460H
LD B,01CH
06 1C
. .
0462H
DEC B
05
.
0463H
LD H,006H
26 06
& .
0465H
CALL 0FE05H
CD 05 FE
. . .
0468H
RST 38H
FF
.
0469H
NOP
00
.
046AH
LD BC,L06D7H
01 D7 06
. . .
046DH
EXX
D9
.
046EH
DEC B
05
.
046FH
ADC A,006H
CE 06
. .
0471H
CP 0FFH
FE FF
. .
0473H
ADD A,B
80
.
0474H
LD BC,L07D1H
01 D1 07
. . .
0477H
JP C,0E207H
DA 07 E2
. . .
047AH
RLCA
07
.
047BH
INC E
1C
.
047CH
DEC B
05
.
047DH
EX DE,HL
EB
.
047EH
RLCA
07
.
047FH
LD (HL),C
71
q
0480H
RLCA
07
.
0481H
RST 30H
F7
.
0482H
RLCA
07
.
0483H
CP 0FFH
FE FF
. .
0485H
RET NZ
C0
.
0486H
LD BC,005CDH
01 CD 05
. . .
0489H
EX AF,AF’
08
.
048AH
EX AF,AF’
08
.
048BH
EXX
D9
.
048CH
DEC B
05
.
048DH
INC C
0C
.
048EH
EX AF,AF’
08
.
048FH
RST 38H
FF
.
0490H
RST 38H
FF
.

L0491H:

0491H
CP H
BC
.
0492H
INC B
04
.
0493H
PUSH BC
C5
.
0494H
INC B
04
.
0495H
INC E
1C
.
0496H
DEC B
05
.
0497H
CP E
BB
.
0498H
DEC B
05
.
0499H
CP 0FFH
FE FF
. .
049BH
RET NZ
C0
.
049CH
NOP
00
.
049DH
PUSH BC
C5
.
049EH
INC B
04
.
;illegal sequence
049FH
DEFB 0DDH,006H,01DH
DD 06 1D
. . .
04A2H
LD B,01CH
06 1C
. .
04A4H
DEC B
05
.
04A5H
EX (SP),HL
E3
.
04A6H
LD B,0FEH
06 FE
. .
04A8H
RST 38H
FF
.
04A9H
ADD A,B
80
.
04AAH
LD BC,L081BH
01 1B 08
. . .
04ADH
POP DE
D1
.
04AEH
RLCA
07
.
ILLEHGAL SEQUENCE
DEFB 0DDH,007H,01CH
;04AF
dd 07 1c
. . .
04B2H
DEC B
05
.
04B3H
LD HL,(0FF08H)
2A 08 FF
* . .
04B6H
RST 38H
FF
.
04B7H
LD D,H
54
T
04B8H
LD L,B
68
h
04B9H
LD H,L
65
e
04BAH
JR NZ,L04BCH
20 00
  .

L04BCH:

04BCH
LD C,H
4C
L
04BDH
LD L,A
6F
o
04BEH
LD H,C
61
a
04BFH
LD H,H
64
d
04C0H
LD L,C
69
i
04C1H
LD L,(HL)
6E
n
04C2H
LD H,A
67
g
04C3H
JR NZ,L04C5H
20 00
  .

L04C5H:

04C5H
LD D,D
52
R
04C6H
LD C,A
4F
O
04C7H
LD C,L
4D
M
04C8H
JR NZ,L0513H
20 49
  I
04CAH
LD L,L
6D
m
04CBH
LD H,C
61
a
04CCH
LD H,A
67
g
04CDH
LD H,L
65
e
04CEH
JR NZ,L04D0H
20 00
  .

L04D0H:

04D0H
LD D,A
57
W
04D1H
LD H,C
61
a
04D2H
LD (HL),E
73
s
04D3H
JR NZ,80
20 4E
  N
04D5H
LD L,A
6F
o
04D6H
LD (HL),H
74
t
04D7H
JR NZ,L04D9H
20 00
  .

L04D9H:

04D9H
LD B,(HL)
46
F
04DAH
LD L,A
6F
o
04DBH
LD (HL),L
75
u
04DCH
LD L,(HL)
6E
n
04DDH
LD H,H
64
d
04DEH
JR NZ,L052FH
20 4F
  O
04E0H
LD L,(HL)
6E
n
04E1H
JR NZ,L0527H
20 44
  D
04E3H
LD (HL),D
72
r
04E4H
LD L,C
69
i
04E5H
HALT
76
v
04E6H
LD H,L
65
e
04E7H
JR NZ,L04E9H
20 00
  .

L04E9H:

04E9H
JR NC,L04EBH
30 00
0 .

L04EBH:

04EBH
LD B,C
41
A
04ECH
LD (HL),D
72
r
04EDH
LD H,E
63
c
04EEH
LD L,(HL)
6E
n
04EFH
LD H,L
65
e
04F0H
LD (HL),H
74
t
04F1H
JR NZ,L04F3H
20 00
  .

L04F3H:

04F3H
LD B,D
42
B
04F4H
LD L,A
6F
o
04F5H
LD L,A
6F
o
04F6H
LD (HL),H
74
t
04F7H
JR NZ,L04F9H
20 00
  .

L04F9H:

04F9H
LD C,C
49
I
04FAH
LD (HL),E
73
s
04FBH
JR NZ,L054BH
20 4E
  N
04FDH
LD L,A
6F
o
04FEH
LD (HL),H
74
t
04FFH
JR NZ,L0501H
20 00
  .

L0501H:

0501H
LD B,C
41
A
0502H
HALT
76
v
0503H
LD H,C
61
a
0504H
LD L,C
69
i
0505H
LD L,H
6C
l
0506H
LD H,C
61
a
0507H
LD H,D
62
b
0508H
LD L,H
6C
l
0509H
LD H,L
65
e
050AH
JR NZ,L050CH
20 00
  .

L050CH:

050CH
LD B,E
43
C
050DH
LD H,C
61
a
050EH
LD L,(HL)
6E
n
050FH
DAA
27
0510H
LD (HL),H
74
t
0511H
JR NZ,L0555H
20 42
  B

L0513H:

0513H
LD H,L
65
e
0514H
JR NZ,L0562H
20 4C
  L
0516H
LD L,A
6F
o
0517H
LD H,C
61
a
0518H
LD H,H
64
d
0519H
LD H,L
65
e
051AH
LD H,H
64
d
051BH
JR NZ,L054AH
20 2D
  –
051DH
JR NZ,L051FH
20 00
  .

L051FH:

051FH
LD D,H
54
T
0520H
LD L,A
6F
o
0521H
LD L,A
6F
o
0522H
JR NZ,79
20 4D
  M
0524H
LD H,C
61
a
0525H
LD L,(HL)
6E
n
0526H
LD A,C
79
y

L0527H:

0527H
JR NZ,L056EH
20 45
  E
0529H
LD A,B
78
x
052AH
LD (HL),H
74
t
052BH
LD H,L
65
e
052CH
LD L,(HL)
6E
n
052DH
LD (HL),H
74
t
052EH
LD (HL),E
73
s

L052FH:

052FH
NOP
00
.
0530H
LD B,(HL)
46
F
0531H
LD L,H
6C
l
0532H
LD L,A
6F
o
0533H
LD (HL),B
70
p
0534H
LD (HL),B
70
p
0535H
LD A,C
79
y
0536H
JR NZ,L0538H
20 00
  .

L0538H:

0538H
LD C,B
48
H
0539H
LD H,C
61
a
053AH
LD (HL),D
72
r
053BH
LD H,H
64
d
053CH
JR NZ,L0582H
20 44
  D
053EH
LD L,C
69
i
053FH
LD (HL),E
73
s
0540H
LD L,E
6B
k
0541H
JR NZ,L0543H
20 00
  .
0543Hh:
0543H
ld d,a
57
W
0544H
LD L,B
68
h
0545H
LD H,L
65
e
0546H
LD L,(HL)
6E
n
0547H
JR NZ,L05A2H
20 59
  Y
0549H
LD L,A
6F
o

L054AH:

054AH
LD (HL),L
75
u

L054BH:

054BH
JR NZ,L058EH
20 41
  A
054DH
LD (HL),D
72
r
054EH
LD H,L
65
e
054FH
JR NZ,L05A3H
20 52
  R
0551H
LD H,L
65
e
0552H
LD H,C
61
a
0553H
LD H,H
64
d
0554H
LD A,C
79
y

L0555H:

0555H
JR NZ,L0557H
20 00
  .

L0557H:

0557H
LD B,E
43
C
0558H
LD L,H
6C
l
0559H
LD L,A
6F
o
055AH
LD (HL),E
73
s
055BH
LD H,L
65
e
055CH
JR NZ,L055EH
20 00
  .

L055EH:

055EH
LD B,H
44
D
055FH
LD L,A
6F
o
0560H
LD L,A
6F
o
0561H
LD (HL),D
72
r

L0562H:

0562H
JR NZ,L05A5H
20 41
  A
0564H
LD L,(HL)
6E
n
0565H
LD H,H
64
d
0566H
JR NZ,L05BCH
20 54
  T
0568H
LD (HL),D
72
r
0569H
LD A,C
79
y
056AH
JR NZ,L05ADH
20 41
  A
056CH
LD H,A
67
g
056DH
LD H,C
61
a

L056EH:

056EH
LD L,C
69
i
056FH
LD L,(HL)
6E
n
0570H
JR NZ,L0572H
20 00
  .

L0572H:

0572H
LD C,H
4C
L
0573H
LD L,A
6F
o
0574H
LD (HL),E
73
s
0575H
LD (HL),H
74
t
0576H
JR NZ,L05BCH
20 44
  D
0578H
LD H,C
61
a
0579H
LD (HL),H
74
t
057AH
LD H,C
61
a
057BH
JR NZ,L057DH
20 00
  .

L057DH:

057DH
LD B,E
43
C
057EH
LD D,D
52
R
057FH
LD B,E
43
C
0580H
JR NZ,L0582H
20 00
  .

L0582H:

0582H
LD D,E
53
S
0583H
LD H,L
65
e
0584H
LD H,L
65
e
0585H
LD L,E
6B
k
0586H
JR NZ,71
20 45
  E
0588H
LD (HL),D
72
r
0589H
LD (HL),D
72
r
058AH
LD L,A
6F
o
058BH
LD (HL),D
72
r
058CH
NOP
00
.
058DH
INC L
2C
,

L058EH:

058EH
JR NZ,L0590H
20 00
  .

L0590H:

0590H
LD C,A
4F
O
0591H
LD (HL),D
72
r
0592H
JR NZ,L05E9H
20 55
  U
0594H
LD (HL),E
73
s
0595H
LD H,L
65
e
0596H
JR NZ,67
20 41
  A
0598H
LD L,(HL)
6E
n
0599H
LD L,A
6F
o
059AH
LD (HL),H
74
t
059BH
LD L,B
68
h
059CH
LD H,L
65
e
059DH
LD (HL),D
72
r
059EH
JR NZ,L05A0H
20 00
  .

L05A0H:

05A0H
LD C,B
48
H
05A1H
LD H,C
61
a

L05A2H:

05A2H
LD (HL),E
73
s

L05A3H:

05A3H
JR NZ,L05E7H
20 42
  B

L05A5H:

05A5H
LD H,L
65
e
05A6H
LD H,L
65
e
05A7H
LD L,(HL)
6E
n
05A8H
NOP
00
.
05A9H
LD D,E
53
S
05AAH
LD (HL),A
77
w
05ABH
LD L,C
69
i
05ACH
LD (HL),H
74
t

L05ADH:

05ADH
LD H,E
63
c
05AEH
LD L,B
68
h
05AFH
JR NZ,L05F5H
20 44
  D
05B1H
LD L,C
69
i
05B2H
LD (HL),E
73
s
05B3H
LD L,E
6B
k
05B4H
LD (HL),E
73
s
05B5H
JR NZ,L05F8H
20 41
  A
05B7H
LD L,(HL)
6E
n
05B8H
LD H,H
64
d
05B9H
JR NZ,L05BBH
20 00
  .

L05BBH:

05BBH
LD D,B
50
P

L05BCH:

05BCH
LD L,H
6C
l
05BDH
LD H,L
65
e
05BEH
LD H,C
61
a
05BFH
LD (HL),E
73
s
05C0H
LD H,L
65
e
05C1H
JR NZ,L061AH
20 57
  W
05C3H
LD H,C
61
a
05C4H
LD L,C
69
i
05C5H
LD (HL),H
74
t
05C6H
NOP
00
.
05C7H
LD D,B
50
P
05C8H
LD (HL),D
72
r
05C9H
LD H,L
65
e
05CAH
LD (HL),E
73
s
05CBH
LD (HL),E
73
s
05CCH
JR NZ,L060AH
20 3C
 <
05CEH
LD B,L
45
E
05CFH
LD L,(HL)
6E
n
05D0H
LD (HL),H
74
t
05D1H
LD H,L
65
e
05D2H
LD (HL),D
72
r
05D3H
LD A,020H
3E 20
>
05D5H
NOP
00
.
05D6H
LD C,A
4F
O
05D7H
LD (HL),D
72
r
05D8H
JR NZ,L0616H
20 3C
 <
05DAH
LD B,D
42
B
05DBH
LD (HL),D
72
r
05DCH
LD H,L
65
e
05DDH
LD H,C
61
a
05DEH
LD L,E
6B
k
05DFH
LD A,020H
3E 20
>
05E1H
NOP
00
.
05E2H
LD C,C
49
I
05E3H
LD B,H
44
D
05E4H
JR NZ,L05E6H
20 00
  .

L05E6H:

05E6H
LD C,C
49
I

L05E7H:

05E7H
LD (HL),E
73
s
05E8H
LD (HL),H
74
t

L05E9H:

05E9H
JR NZ,80
20 4E
  N
05EBH
LD L,C
69
i
05ECH
LD H,E
63
c
05EDH
LD L,B
68
h
05EEH
LD (HL),H
74
t
05EFH
JR NZ,L05F1H
20 00
  .

L05F1H:

05F1H
LD B,A
47
G
05F2H
LD H,L
65
e
05F3H
LD H,(HL)
66
f
05F4H
LD (HL),L
75
u

L05F5H:

05F5H
LD L,(HL)
6E
n
05F6H
LD H,H
64
d
05F7H
LD H,L
65
e

L05F8H:

05F8H
LD L,(HL)
6E
n
05F9H
JR NZ,L063CH
20 41
  A
05FBH
LD (HL),L
75
u
05FCH
LD H,(HL)
66
f
05FDH
JR NZ,L05FFH
20 00
  .

L05FFH:

05FFH
LD B,H
44
D
0600H
LD L,C
69
i
0601H
LD (HL),E
73
s
0602H
LD L,E
6B
k
0603H
LD H,L
65
e
0604H
LD (HL),H
74
t
0605H
LD (HL),H
74
t
0606H
LD H,L
65
e
0607H
LD L,(HL)
6E
n
0608H
DEC L
2D
0609H
LD C,H
4C
L

L060AH:

060AH
LD H,C
61
a
060BH
LD (HL),L
75
u
060CH
LD H,(HL)
66
f
060DH
LD (HL),A
77
w
060EH
LD H,L
65
e
060FH
LD (HL),D
72
r
0610H
LD L,E
6B
k
0611H
JR NZ,L0613H
20 00
  .

L0613H:

0613H
LD C,E
4B
K
0614H
LD H,C
61
a
0615H
LD L,(HL)
6E
n

L0616H:

0616H
LD L,(HL)
6E
n
0617H
JR NZ,L0619H
20 00
  .

L0619H:

0619H
LD C,C
49
I

L061AH:

061AH
LD (HL),E
73
s
061BH
LD (HL),H
74
t
061CH
JR NZ,L0665H
20 47
G
061EH
LD H,L
65
e
061FH
LD L,H
6C
l
0620H
LD H,C
61
a
0621H
LD H,H
64
d
0622H
LD H,L
65
e
0623H
LD L,(HL)
6E
n
0624H
JR NZ,L0626H
20 00
.

L0626H:

0626H
LD B,H
44
D
0627H
LD L,C
69
i
0628H
LD (HL),E
73
s
0629H
LD L,E
6B
k
062AH
LD H,L
65
e
062BH
LD (HL),H
74
t
062CH
LD (HL),H
74
t
062DH
LD H,L
65
e
062EH
LD L,(HL)
6E
n
062FH
JR NZ,L0688H
20 57
  W
0631H
LD H,L
65
e
0632H
LD H,E
63
c
0633H
LD L,B
68
h
0634H
LD (HL),E
73
s
0635H
LD H,L
65
e
0636H
LD L,H
6C
l
0637H
LD L,(HL)
6E
n
0638H
JR NZ,L068FH
20 55
  U
063AH
LD L,(HL)
6E
n
063BH
LD H,H
64
d

L063CH:

063CH
JR NZ,L0682H
20 44
  D
063EH
LD H,C
61
a
063FH
LD L,(HL)
6E
n
0640H
LD L,(HL)
6E
n
0641H
JR NZ,L0643H
20 00
  .

L0643H:

0643H
LD B,H
44
D
0644H
LD L,C
69
i
0645H
LD H,L
65
e
0646H
JR NZ,L068EH
20 46
  F
0648H
LD H,L
65
e
0649H
LD (HL),E
73
s
064AH
LD (HL),H
74
t
064BH
LD (HL),B
70
p
064CH
LD L,H
6C
l
064DH
LD H,C
61
a
064EH
LD (HL),H
74
t
064FH
LD (HL),H
74
t
0650H
LD H,L
65
e
0651H
JR NZ,L0653H
20 00
  .

L0653H:

0653H
LD D,A
57
W
0654H
LD H,L
65
e
0655H
LD (HL),D
72
r
0656H
LD H,H
64
d
0657H
LD H,L
65
e
0658H
LD L,(HL)
6E
n
0659H
JR NZ,L065BH
20 00
  .

L065BH:

065BH
LD E,D
5A
Z
065CH
LD (HL),L
75
u
065DH
JR NZ,L06B5H
20 56
  V
065FH
LD L,C
69
i
0660H
LD H,L
65
e
0661H
LD L,H
6C
l
0662H
LD H,L
65
e
0663H
JR NZ,L06A7H
20 42
  B

L0665H:

0665H
LD H,L
65
e
0666H
LD (HL),D
72
r
0667H
LD H,L
65
e
0668H
LD L,C
69
i
0669H
LD H,E
63
c
066AH
LD L,B
68
h
066BH
LD H,L
65
e
066CH
NOP
00
.
066DH
LD B,D
42
B
066EH
LD H,L
65
e
066FH
LD (HL),D
72
r
0670H
LD H,L
65
e
0671H
LD L,C
69
i
0672H
LD (HL),H
74
t
0673H
JR NZ,L0675H
20 00
  .

L0675H:

0675H
LD D,E
53
S
0676H
LD H,E
63
c
0677H
LD L,B
68
h
0678H
LD L,H
6C
l
0679H
LD L,C
69
i
067AH
LD H,L
65
e
067BH
INC B
04
.
067CH
LD H,L
65
e
067DH
LD L,(HL)
6E
n
067EH
JR NZ,L06D5H
20 55
  U
0680H
LD L,(HL)
6E
n
0681H
LD H,H
64
d

L0682H:

0682H
JR NZ,L06C9H
20 45
  E
0684H
LD (HL),D
72
r
0685H
LD L,(HL)
6E
n
0686H
LD H,L
65
e
0687H
LD (HL),L
75
u

L0688H:

0688H
LD (HL),H
74
t
0689H
JR NZ,L06DEH
20 53
  S
068BH
LD (HL),H
74
t
068CH
LD H,C
61
a
068DH
LD (HL),D
72
r

L068EH:

068EH
LD (HL),H
74
t

L068FH:

068FH
LD H,L
65
e
0690H
LD L,(HL)
6E
n
0691H
NOP
00
.
0692H
LD B,H
44
D
0693H
LD (HL),L
75
u
0694H
LD (HL),D
72
r
0695H
LD H,H
64
d
0696H
LD H,C
61
a
0697H
NOP
00
.
0698H
LD B,(HL)
46
F
0699H
LD H,L
65
e
069AH
LD L,B
68
h
069BH
LD L,H
6C
l
069CH
LD H,L
65
e
069DH
LD (HL),D
72
r
069EH
INC L
2C
,
069FH
JR NZ,L06A1H
20 00
  .

L06A1H:

06A1H
LD C,(HL)
4E
N
06A2H
LD H,L
65
e
06A3H
LD (HL),L
75
u
06A4H
JR NZ,L06F9H
20 53
  S
06A6H
LD (HL),H
74
t

L06A7H:

06A7H
LD H,C
61
a
06A8H
LD (HL),D
72
r
06A9H
LD (HL),H
74
t
06AAH
LD H,L
65
e
06ABH
LD L,(HL)
6E
n
06ACH
JR NZ,L06FDH
20 4F
  O
06AEH
LD H,H
64
d
06AFH
LD H,L
65
e
06B0H
LD (HL),D
72
r
06B1H
JR NZ,L06F8H
20 45
  E
06B3H
LD L,C
69
i
06B4H
LD L,(HL)
6E
n

L06B5H:

06B5H
LD H,L
65
e
06B6H
JR NZ,L06F9H
20 41
  A
06B8H
LD L,(HL)
6E
n
06B9H
LD H,H
64
d
06BAH
LD H,L
65
e
06BBH
LD (HL),D
72
r
06BCH
LD H,L
65
e
06BDH
JR NZ,L070FH
20 50
  P
06BFH
LD L,H
6C
l
06C0H
LD H,C
61
a
06C1H
LD (HL),H
74
t
06C2H
LD (HL),H
74
t
06C3H
LD H,L
65
e
06C4H
JR NZ,L0708H
20 42
  B
06C6H
LD H,L
65
e
06C7H
LD L,(HL)
6E
n
06C8H
LD (HL),L
75
u

L06C9H:

06C9H
LD (HL),H
74
t
06CAH
LD A,D
7A
z
06CBH
LD H,L
65
e
06CCH
LD L,(HL)
6E
n
06CDH
NOP
00
.
06CEH
LD B,H
44
D
06CFH
LD (HL),D
72
r
06D0H
LD A,(BC)
0A
.
06D1H
LD H,E
63
c
06D2H
LD L,E
6B
k
06D3H
LD H,L
65
e
06D4H
LD L,(HL)
6E
n

L06D5H:

06D5H
JR NZ,L06D7H
20 00
  .

L06D7H:

06D7H
LD C,A
4F
O
06D8H
LD H,H
64
d
06D9H
LD H,L
65
e
06DAH
LD (HL),D
72
r
06DBH
JR NZ,L06DDH
20 00
  .

L06DDH:

06DDH
LD D,A
57
W

L06DEH:

06DEH
LD L,C
69
i
06DFH
LD (HL),D
72
r
06E0H
LD H,H
64
d
06E1H
JR NZ,L06E3H
20 00
  .

L06E3H:

06E3H
LD B,D
42
B
06E4H
LD L,C
69
i
06E5H
LD (HL),H
74
t
06E6H
LD (HL),H
74
t
06E7H
LD H,L
65
e
06E8H
JR NZ,L0741H
20 57
  W
06EAH
LD H,C
61
a
06EBH
LD (HL),D
72
r
06ECH
LD (HL),H
74
t
06EDH
LD H,L
65
e
06EEH
LD L,(HL)
6E
n
06EFH
NOP
00
.
06F0H
LD C,C
49
I
06F1H
LD L,L
6D
m
06F2H
JR NZ,L0747H
20 53
S
06F4H
LD A,C
79
y
06F5H
LD (HL),E
73
s
06F6H
LD (HL),H
74
t
06F7H
LD H,L
65
e

L06F8H:

06F8H
LD L,L
6D
m

L06F9H:

06F9H
NOP
00
.
06FAH
LD D,E
53
S
06FBH
LD (HL),L
75
u
06FCH
LD H,E
63
c

L06FDH:

06FDH
LD L,B
68
h
06FEH
JR NZ,L0700H
20 00
.

L0700H:

0700H
LD B,C
41
A
0701H
LD H,D
62
b
0702H
LD (HL),E
73
s
0703H
LD H,L
65
e
0704H
LD L,(HL)
6E
n
0705H
LD (HL),H
74
t
0706H
NOP
00
.
0707H
LD H,L
65
e

L0708H:

0708H
JR NZ,L074EH
20 44
D
070AH
LD (HL),L
75
u
070BH
JR NZ,L070DH
20 00
.

L070DH:

070DH
JR NZ,70
20 44
D

L070FH:

070FH
LD H,C
61
a
0710H
LD L,(HL)
6E
n
0711H
LD (HL),E
73
s
0712H
JR NZ,110
20 6C
  l
0714H
DAA
27
0715H
LD D,L
55
U
0716H
LD L,(HL)
6E
n
0717H
LD L,C
69
i
0718H
LD (HL),H
74
t
0719H
INC BC
03
.
071AH
JR NZ,L074CH
20 30
  0
071CH
NOP
00
.
071DH
LD D,E
53
S
071EH
LD A,C
79
y
071FH
LD (HL),E
73
s
0720H
LD (HL),H
74
t
0721H
INC C
0C
.
0722H
LD L,L
6D
m
0723H
LD H,L
65
e
0724H
JR NZ,L0726H
20 00
  .

L0726H:

0726H
LD C,(HL)
4E
N
0727H
LD L,A
6F
o
0728H
LD L,(HL)
6E
n
0729H
JR NZ,L076EH
20 43
  C
072BH
LD L,B
68
h
072CH
LD H,C
61
a
072DH
LD (HL),D
72
r
072EH
LD H,A
67
g
072FH
LD H,L
65
e
0730H
LD H,C
61
a
0731H
LD H,D
62
b
0732H
LD L,H
6C
l
0733H
LD H,L
65
e
0734H
JR NZ,L0736H
20 00
  .

L0736H:

0736H
LD D,E
53
S
0737H
LD H,L
65
e
0738H
LD H,A
67
g
0739H
LD L,L
6D
m
073AH
LD H,L
65
e
073BH
LD L,(HL)
6E
n
073CH
LD (HL),H
74
t
073DH
LD (HL),E
73
s
073EH
JR NZ,L0794H
20 54
  T
0740H
LD (HL),D
72
r

L0741H:

0741H
LD L,A
6F
o
0742H
LD (HL),B
70
p
0743H
JR NZ,L0793H
20 4E
  N
0745H
LD (HL),L
75
u
0746H
LD L,L
6D
m

L0747H:

0747H
LD H,D
62
b
0748H
LD (HL),D
72
r
0749H
LD H,L
65
e
074AH
LD (HL),L
75
u
074BH
LD A,B
78
x

L074CH:

074CH
NOP
00
.

L074DH:

074DH
LD D,L
55
U

L074EH:

074EH
LD L,(HL)
6E
n
074FH
LD L,C
69
i
0750H
LD (HL),H
74
t
0751H
INC BC
03
.
0752H
JR NZ,L0754H
20 00
  .

L0754H:

0754H
LD B,(HL)
46
F
0755H
LD (HL),D
72
r
0756H
LD H,C
61
a
0757H
LD L,(HL)
6E
n
0758H
LD L,E
6B
k
0759H
JR NZ,L075BH
20 00
  .

L075BH:

075BH
LD C,A
4F
O
075CH
LD (HL),L
75
u
075DH
JR NZ,87
20 55
  U
075FH
LD (HL),H
74
t
0760H
LD L,C
69
i
0761H
LD L,H
6C
l
0762H
LD L,C
69
i
0763H
LD (HL),E
73
s
0764H
LD H,L
65
e
0765H
LD A,D
7A
z
0766H
JR NZ,L07BDH
20 55
  U
0768H
LD L,(HL)
6E
n
0769H
LD H,L
65
e
076AH
JR NZ,L07ADH
20 41
  A
076CH
LD (HL),L
75
u
076DH
LD (HL),H
74
t

L076EH:

076EH
LD (HL),D
72
r
076FH
LD H,L
65
e
0770H
JR NZ,L07B6H
20 44
  D
0772H
LD L,C
69
i
0773H
LD (HL),E
73
s
0774H
LD (HL),C
71
q
0775H
LD (HL),L
75
u
0776H
LD H,L
65
e
0777H
NOP
00
.
0778H
DEC L
2D
0779H
LD D,E
53
S
077AH
LD L,A
6F
o
077BH
LD (HL),L
75
u
077CH
LD (HL),B
70
p
077DH
LD L,H
6C
l
077EH
LD H,L
65
e
077FH
JR NZ,L0781H
20 00
  .

L0781H:

0781H
DEC L
2D
0782H
LD B,H
44
D
0783H
LD (HL),L
75
u
0784H
LD (HL),D
72
r
0785H
JR NZ,L0787H
20 00
  .

L0787H:

0787H
LD C,(HL)
4E
N
0788H
LD L,A
6F
o
0789H
LD L,(HL)
6E
n
078AH
JR NZ,L07DCH
20 50
  P
078CH
LD (HL),D
72
r
078DH
LD (DE),A
12
.
078EH
LD (HL),H
74
t
078FH
LD H,L
65
e
0790H
JR NZ,L0792H
20 00
  .

L0792H:

0792H
LD B,(HL)
46
F

L0793H:

0793H
LD H,L
65
e

L0794H:

0794H
LD (HL),D
72
r
0795H
LD L,L
6D
m
0796H
LD H,L
65
e
0797H
LD A,D
7A
z
0798H
JR NZ,82
20 50
  P
079AH
LD L,A
6F
o
079BH
LD (HL),D
72
r
079CH
LD (HL),H
74
t
079DH
LD H,L
65
e
079EH
JR NZ,L0804H
20 64
  d
07A0H
DAA
27
07A1H
LD D,L
55
U
07A2H
LD L,(HL)
6E
n
07A3H
LD L,C
69
i
07A4H
LD (HL),H
74
t
07A5H
INC BC
03
.
07A6H
JR NZ,L07EDH
20 45
  E
07A8H
LD (HL),H
74
t
07A9H
JR NZ,L07FDH
20 52
  R
07ABH
INC BC
03
.
07ACH
LD H,L
65
e

L07ADH:

07ADH
LD (HL),E
73
s
07AEH
LD (HL),E
73
s
07AFH
LD H,C
61
a
07B0H
LD A,C
79
y
07B1H
LD H,L
65
e
07B2H
LD A,D
7A
z
07B3H
JR NZ,L07B5H
20 00
  .

L07B5H:

07B5H
LD B,E
43
C

L07B6H:

07B6H
LD D,D
52
R
07B7H
LD B,E
43
C
07B8H
INC L
2C
,
07B9H
JR NZ,L07BBH
20 00
  .

L07BBH:

07BBH
LD B,L
45
E
07BCH
LD (HL),D
72
r

L07BDH:

07BDH
LD (HL),D
72
r
07BEH
LD H,L
65
e
07BFH
LD (HL),L
75
u
07C0H
LD (HL),D
72
r
07C1H
JR NZ,L07C3H
20 00
  .

L07C3H:

07C3H
LD B,H
44
D
07C4H
LD H,L
65
e
07C5H
JR NZ,L080AH
20 43
  C
07C7H
LD L,B
68
h
07C8H
LD H,L
65
e
07C9H
LD (HL),D
72
r
07CAH
LD H,E
63
c
07CBH
LD L,B
68
h
07CCH
LD H,L
65
e
07CDH
LD (HL),D
72
r
07CEH
INC L
2C
,
07CFH
JR NZ,L07D1H
20 00
  .

L07D1H:

07D1H
LD L,H
6C
l
07D2H
DAA
27
07D3H
LD C,C
49
I
07D4H
LD L,L
6D
m
07D5H
LD H,C
61
a
07D6H
LD H,A
67
g
07D7H
LD H,L
65
e
07D8H
JR NZ,L07DAH
20 00
  .

L07DAH:

07DAH
LD B,H
44
D
07DBH
LD (HL),L
75
u

L07DCH:

07DCH
JR NZ,L0830H
20 52
  R
07DEH
LD C,A
4F
O
07DFH
LD C,L
4D
M
07E0H
JR NZ,L07E2H
20 00
  .

L07E2H:

07E2H
LD B,E
43
C
07E3H
LD L,B
68
h
07E4H
LD H,C
61
a
07E5H
LD (HL),D
72
r
07E6H
LD H,A
67
g
07E7H
INC BC
03
.
07E8H
LD H,L
65
e
07E9H
JR NZ,L07EBH
20 00
  .

L07EBH:

07EBH
LD B,E
43
C
07ECH
LD L,B
68
h

L07EDH:

07EDH
LD H,C
61
a
07EEH
LD L,(HL)
6E
n
07EFH
LD H,A
67
g
07F0H
LD H,L
65
e
07F1H
LD A,D
7A
z
07F2H
JR NZ,L0838H
20 44
  D
07F4H
LD H,L
65
e
07F5H
JR NZ,L07F7H
20 00
  .

L07F7H:

07F7H
JR NZ,L083EH
20 45
  E
07F9H
LD (HL),H
74
t
07FAH
JR NZ,67
20 41
  A
07FCH
LD (HL),B
70
p

L07FDH:

07FDH
LD (HL),B
70
p
07FEH
LD (HL),L
75
u
07FFH
LD A,C
79
y
0800H
LD H,L
65
e
0801H
LD A,D
7A
z
0802H
JR NZ,L0857H
20 53
  S

L0804H:

0804H
LD (HL),L
75
u
0805H
LD (HL),D
72
r
0806H
JR NZ,L0808H
20 00
  .

L0808H:

0808H
LD C,A
4F
O
0809H
LD (HL),L
75
u

L080AH:

080AH
JR NZ,L080CH
20 00
  .

L080CH:

080CH
LD D,B
50
P
080DH
LD L,A
6F
o
080EH
LD (HL),L
75
u
080FH
LD (HL),D
72
r
0810H
JR NZ,69
20 43
  C

L0812H:

0812H
LD L,A
6F
o
0813H
LD L,(HL)
6E
n
0814H
LD (HL),H
74
t
0815H
LD L,C
69
i
0816H
LD L,(HL)
6E
n
0817H
LD (HL),L
75
u
0818H
LD H,L
65
e
0819H
LD (HL),D
72
r
081AH
NOP
00
.

L081BH:

081BH
LD B,E
43
C
081CH
LD L,B
68
h
081DH
LD H,C
61
a
081EH
LD (HL),D
72
r
081FH
LD H,A
67
g
0820H
LD H,L
65
e
0821H
LD L,L
6D
m
0822H
LD H,L
65
e
0823H
LD L,(HL)
6E
n
0824H
LD (HL),H
74
t
0825H
JR NZ,70
20 44
  D
0827H
LD H,L
65
e
0828H
JR NZ,L082AH
20 00
  .

L082AH:

082AH
LD D,(HL)
56
V
082BH
LD H,L
65
e
082CH
LD (HL),L
75
u
082DH
LD L,C
69
i
082EH
LD L,H
6C
l
082FH
LD L,H
6C
l

L0830H:

0830H
LD H,L
65
e
0831H
LD A,D
7A
z
0832H
JR NZ,82
20 50
  P
0834H
LD H,C
61
a
0835H
LD (HL),H
74
t
0836H
LD L,C
69
i
0837H
LD H,L
65
e

L0838H:

0838H
LD L,(HL)
6E
n
0839H
LD (HL),H
74
t
083AH
LD H,L
65
e
083BH
LD (HL),D
72
r
083CH
JR NZ,L083EH
20 00
 
;RST 30H — Keyboard scan: Get column 6

L083EH:

083EH
LD A,(03840H)
3A 40 38
 
;Is someone pressing <ENTER>?
0841H
RRCA
0F
 
;Loop until user lets go of <ENTER> key
0842H
JR C,L083EH
38 FA
 
;Get col 0

L0844H:

0844H
LD A,(03801H)
3A 01 38
0847H
AND 0FEH
E6 FE
 
;Any of bits 1-7 pressed? (<A>-<G>)
0849H
JR Z,L0857H
28 0C
 
;Jump if none of those were pressed…
084BH
LD D,0FFH
16 FF
 
;else start with -1…

L084DH:

084DH
INC D
14
 
;and keep adding 1…
084EH
RRCA
0F
 
;until we find which keyboard row…
084FH
JR NC,L084DH
30 FC
 
;was pressed.
0851H
LD A,040H
3E 40
 
;Add 40H to row number to get…
0853H
ADD A,D
82
 
;the ASCII code for that key (<A>-<G>).
0854H
LD (0401DH),A
32 1D 40
 
;Store ASCII code in name of ROM image file

L0857H:

0857H
LD A,(03840H)
3A 40 38
 
;Next, get column 6 of keyboard matrix
085AH
BIT 2,A
CB 57
 
;Was <BREAK> pressed?
085CH
JR Z,L0861H
28 03
 
;If not, skip next instruction…
085EH
LD (0405BH),A
32 5B 40
 
;else put a non-zero value into 405BH.

L0861H:

0861H
BIT 0,A
CB 47
 
;Was <ENTER> pressed?
0863H
JR NZ,L08B0H
20 4B
 
;If yes, then end of keyboard scan
0865H
LD A,(03802H)
3A 02 38
 
;Column 1
0868H
BIT 6,A
CB 77
 
;Was <N> pressed?
086AH
JR Z,L086FH
28 03
 
;Skip next instruction if not…
086CH
LD (04064H),A
32 64 40
 
;else store non-zero value to show it was.

L086FH:

086FH
BIT 4,A
CB 67
 
;What about the <L> key?
0871H
JR Z,L0876H
28 03
 
;
0873H
LD (04066H),A
32 66 40
 
;Store non-zero value if <L> was pressed

L0876H:

0876H
LD D,080H
16 80
 
;80H & greater show type of boot requested
0878H
LD A,(03804H)
3A 04 38
 
;Column 2
087BH
BIT 6,A
CB 77
 
;Was <V> pressed?
087DH
JR NZ,L08A7H
20 28
 
;If yes, can’t use any other options
087FH
BIT 0,A
CB 47
 
;Was <P> pressed?
0881H
JR Z,L0886H
28 03
 
;Skip next instruction if it wasn’t…
0883H
LD (04065H),A
32 65 40
 
;else indicate that it was.

L0886H:

0886H
INC D
14
 
;
0887H
INC D
14
 
;
0888H
LD A,(03880H)
3A 80 38
 
;Column 7: L & R <SHIFT>, <CTRL>,…
088BH
OR A
B7
 
;<CAPS>, <F1>, <F2>, <F3>
088CH
JR Z,L0894H
28 06
 
;Jump if none of those were pressed

L088EH:

088EH
RRCA
0F
 
;Add row number to D…
088FH
JR C,L08A7H
38 16
 
;and jump once that’s been done.
0891H
INC D
14
0892H
JR L088EH
18 FA

L0894H:

0894H
LD A,(03810H)
3A 10 38
0897H
LD D,086H
16 86
0899H
BIT 1,A
CB 4F
 
;Was <1> pressed?
089BH
JR NZ,L08A7H
20 0A
 
;If yes, jump with D=86H
089DH
INC D
14
089EH
BIT 2,A
CB 57
 
;Was <2> pressed?
08A0H
JR NZ,L08A7H
20 05
 
;If yes, jump with D=87H
08A2H
INC D
14
08A3H
BIT 3,A
CB 5F
 
;Was <3> pressed?
08A5H
JR Z,L08ABH
28 04
 
;If not, then jump, else D=88H

L08A7H:

08A7H
LD A,D
7A
 
;The value for boot option selected, 82H-88H
08A8H
LD (04059H),A
32 59 40

L08ABH:

08ABH
DEC BC
0B
 
;Store it
08ACH
LD A,B
78
 
;the number of times to scan the keyboard.
08ADH
OR C
B1
 
;Decrement it and see if it’s down to 0
08AEH
JR NZ,L0844H
20 94
 
;If not, then scan again

L08B0H:

08B0H
LD A,(04059H)
3A 59 40
 
;End of keyboard scan — get boot option…
08B3H
OR A
B7
 
;Set Z if no options were chosen, else NZ…
08B4H
RET
C9
 
;and that’s the end of the keyboard scan.

L08B5H:

08B5H
DEC A
3D
 
;RST 08H — Disk I/O
08B6H
JP Z,L096FH
CA 6F 09
 
;If A was 1, then floppy disk…
08B9H
LD A,B
78
 
;else use hard disk.
08BAH
CP 001H
FE 01
 
;What function was requested?
08BCH
JR NZ,L08C3H
20 05
 
;If not “initialize”, then skip next 2 lines
08BEH
CALL SUB_0956H
CD 56 09
 
;Reset HD controller board
08C1H
LD B,004H
06 04
 
;Change function to “restore”

L08C3H:

08C3H
LD A,C
79
 
;Sector to read
08C4H
OUT (0CBH),A
D3 CB
 
;Out to WDC sector register
08C6H
IN A,(0CBH)
DB CB
 
;See what we get back from there…
08C8H
CP C
B9
 
;If something different, no HD attached
08C9H
LD A,005H
3E 05
 
;’Hard Drive Not Available’
08CBH
JR NZ,L08EEH
20 21
 
;If no HD available, then error
08CDH
XOR A
AF
 
;Drive 1, head 0, sectors 256 bytes
08CEH
OUT (0CEH),A
D3 CE
 
;Out to size/drive/head register
08D0H
LD A,D
7A
 
;Cylinder to read — LSB
08D1H
OUT (0CDH),A
D3 CD
 
;Out to WDC cylinder low register
08D3H
LD A,E
7B
 
;Cylinder to read — MSB
08D4H
OUT (0CCH),A
D3 CC
 
;To WDC cylinder high register
08D6H
PUSH BC
C5
 
;Save function, sector during next loop
08D7H
LD D,008H
16 08
 
;Counter for outer loop

L08D9H:

08D9H
LD BC,L0000H
01 00 00
 
;Counter for inner loop

L08DCH:

08DCH
IN A,(0CFH)
DB CF
 
;Get WDC status register
08DEH
BIT 6,A
CB 77
 
;Is drive ready?
08E0H
JR NZ,L08F0H
20 0E
 
;Jump if it’s ready…
08E2H
DEC BC
0B
 
;else decr counter for inner loop…
08E3H
LD A,B
78
 
;
08E4H
OR C
B1
 
;
08E5H
JR NZ,L08DCH
20 F5
 
;and keep trying.
08E7H
DEC D
15
 
;Decrement counter for outer loop…
08E8H
JR NZ,L08D9H
20 EF
 
;try half a million times (about 6 secs)…
08EAH
POP BC
C1
 
;before concluding that drive isn’t ready.
08EBH
LD D,003H
16 03
 
;’Hard Drive Not Ready’

L08EDH:

08EDH
LD A,D
7A
 
;Error: error code into A…

L08EEH:

08EEH
OR A
B7
 
;set NZ to indicate error…
08EFH
RET
C9
 
;and return from RST 8.

L08F0H:

08F0H
POP BC
C1
 
;Holds function and sector number
08F1H
LD A,B
78
 
;Function into A
08F2H
LD D,016H
16 16
 
;WDC “restore” command
08F4H
CP 004H
FE 04
 
;
08F6H
JR Z,L08FAH
28 02
 
;Jump if function is “restore”…
08F8H
LD D,070H
16 70
 
;else change WDC command to “seek”.

L08FAH:

08FAH
LD A,D
7A
 
;WDC command…
08FBH
OUT (0CFH),A
D3 CF
 
;out to command register.
08FDH
CALL SUB_0962H
CD 62 09
 
;Wait until drive not busy & seek complete
0900H
JR NZ,L0935H
20 33
 
;Jump if any errors
0902H
LD A,B
78
 
;Function into A again…
0903H
CP 00CH
FE 0C
 
;
0905H
JR NZ,L0933H
20 2C
 
;if it wasn’t “read sector”, then we’re done.
0907H
LD A,020H
3E 20
 
;WDC command to read single sector
0909H
LD E,000H
1E 00
 
;E will be counter for sector length
090BH
OUT (0CFH),A
D3 CF
 
;Command out to WDC
090DH
CALL SUB_0962H
CD 62 09
 
;Wait until drive is not busy
0910H
JR Z,L092DH
28 1B
 
;Jump if no errors reading sector
0912H
LD D,C
51
 
;Save sector number
0913H
CALL SUB_094CH
CD 4C 09
 
;Get WDC status
0916H
BIT 4,C
CB 61
 
;If error NOT “ID not found”, then real error
0918H
JR Z,L0938H
28 1E
 
;Otherwise, it may be a 512-byte sector
091AH
LD A,020H
3E 20
 
;Set size/drive/head to 512-byte sectors
091CH
OUT (0CEH),A
D3 CE
 
;
091EH
LD A,D
7A
 
;Sector number was saved in D…
091FH
OUT (0CBH),A
D3 CB
 
;send it to WDC sector register again.
0921H
LD A,020H
3E 20
 
;WDC command: read single sector
0923H
OUT (0CFH),A
D3 CF
 
;
0925H
CALL SUB_0962H
CD 62 09
 
;Wait until drive not busy or seek complete
0928H
JR NZ,L0935H
20 0B
 
;Jump if any errors
092AH
CALL L092DH
CD 2D 09
 
;Get 256 bytes twice (512-byte sector)

L092DH:

092DH
LD BC,000C8H
01 C8 00
 
;B is byte counter, C is port for input
0930H
INIR
ED B2
 
;Get 256 bytes from WDC sector buffer
0932H
INC E
1C
 
;Increment MSB of byte counter

L0933H:

0933H
XOR A
AF
 
;Indicate no errors
0934H
RET
C9
 
;Return from RST 8

L0935H:

0935H
CALL SUB_094CH
CD 4C 09
 
;Get WDC error register

L0938H:

0938H
LD D,008H
16 08
 
;’CRC Error’
093AH
BIT 6,A
CB 77
 
;
093CH
JR NZ,L08EDH
20 AF
 
;Jump if error was CRC data field error
093EH
BIT 5,A
CB 6F
 
;(Documentation says bit 5 is always 0…
0940H
JR NZ,L08EDH
20 AB
 
;if it ever SHOULD be 1, then same error)
0942H
LD D,00CH
16 0C
 
;’ID Error’
0944H
BIT 4,A
CB 67
 
;
0946H
JR NZ,L08EDH
20 A5
 
;Jump if ID not found…
0948H
LD D,009H
16 09
 
;else call it a ‘Seek Error’
094AH
JR L08EDH
18 A1
 
;

SUB_094CH:

094CH
BIT 1,A
CB 4F
 
;Is a command in progress?
094EH
LD B,A
47
 
;
094FH
CALL NZ,SUB_0959H
C4 59 09
 
;If so, reset HD controller board
0952H
IN A,(0C9H)
DB C9
 
;Get WDC error register…
0954H
LD C,A
4F
 
;and save it in C.
0955H
RET
C9
 
;

SUB_0956H:

0956H
XOR A
AF
 
;Hard disk controller board:
0957H
OUT (0C1H),A
D3 C1
 
;reset control register…

SUB_0959H:

0959H
LD A,010H
3E 10
 
;
095BH
OUT (0C1H),A
D3 C1
 
;reset controller board…
095DH
LD A,00CH
3E 0C
 
;
095FH
OUT (0C1H),A
D3 C1
 
;enable controller board…
0961H
RET
C9
 
;and return.

SUB_0962H:

0962H
IN A,(0CFH)
DB CF
 
;Get HD status
0964H
BIT 7,A
CB 7F
 
;
0966H
JR NZ,SUB_0962H
20 FA
 
;If HD is busy, keep looping
0968H
BIT 4,A
CB 67
 
;
096AH
JR Z,SUB_0962H
28 F6
 
;If seek not complete, keep looping
096CH
BIT 0,A
CB 47
 
;Set NZ if error
096EH
RET
C9
 
;

L096FH:

096FH
LD A,0D0H
3E D0
 
;Floppy Disk Driver:
0971H
OUT (0F0H),A
D3 F0
 
;Terminate command without interrupt
0973H
CALL SUB_0A58H
CD 58 0A
 
;Delay
0976H
LD A,081H
3E 81
 
;DDEN, side 0, drive 0
0978H
OUT (0F4H),A
D3 F4
 
;Out to drive select
097AH
LD A,C
79
 
;Sector
097BH
OUT (0F2H),A
D3 F2
 
;Out to FDC Sector Register
097DH
LD A,B
78
 
;Function
097EH
CP 005H
FE 05
 
;
0980H
JR NC,L09A2H
30 20
 
;Jump if function > 4
0982H
LD A,00CH
3E 0C
 
;Restore — verify track, 6 ms step
0984H
OUT (0F0H),A
D3 F0
 
;Out to FDC Command Register
0986H
CALL SUB_0A64H
CD 64 0A
 
;Wait until not busy or not ready, get status
0989H
LD B,A
47
 
;
098AH
AND 0DFH
E6 DF
 
;Ignore bit 5 (“head loaded”)
098CH
CP 081H
FE 81
 
;Unless we have “not ready” and “busy”…
098EH
JR NZ,L09E2H
20 52
 
;then get error code (if any) and return.
0990H
LD A,C
79
 
;FDC status before “not ready”
0991H
AND 09EH
E6 9E
 
;Did we have ready, not tk 0, no index?
0993H
LD D,006H
16 06
 
;Error ‘Floppy Drive Not Available’
0995H
JR Z,L099FH
28 08
 
;If so, floppy drive’s not available.
0997H
LD D,004H
16 04
 
;Error ‘Floppy Drive Not Ready’
0999H
CP 006H
FE 06
 
;Index pulse? (Index because no disk there!)
099BH
JR Z,L099FH
28 02
 
;If so, ‘Not Ready’ (no disk), else..
099DH
LD D,007H
16 07
 
;no index bec. disk not turning: ‘Close Door’

L099FH:

099FH
LD A,D
7A
 
;Put error code into A…
09A0H
OR A
B7
 
;set Z/NZ (NZ indicates error)…
09A1H
RET
C9
 
;and return from RST 8.

L09A2H:

09A2H
CP 032H
FE 32
 
;If function wasn’t “restore all”…
09A4H
JR NZ,L09CDH
20 27
 
;then jump to seek/read code.
09A6H
LD B,003H
06 03
 
;How many drives to restore
09A8H
LD D,002H
16 02
 
;Drive select for :1

L09AAH:

09AAH
LD A,0D0H
3E D0
 
;Terminate command without interrupt…
09ACH
OUT (0F0H),A
D3 F0
 
;out to FDC.
09AEH
CALL SUB_0A58H
CD 58 0A
 
;Delay after issuing FDC command
09B1H
LD A,D
7A
 
;
09B2H
OUT (0F4H),A
D3 F4
 
;Send out drive select value
09B4H
RLCA
07
 
;Rotate one bit left, to select next drive
09B5H
LD D,A
57
 
;
09B6H
IN A,(0F0H)
DB F0
 
;Get FDC status
09B8H
AND 020H
E6 20
 
;Is head loaded on drive we selected?
09BAH
JR Z,L09CAH
28 0E
 
;If it isn’t, skip to next drive
09BCH
XOR A
AF
 
;Restore, no verify, 6 ms step
09BDH
OUT (0F0H),A
D3 F0
 
;Command out to FDC
09BFH
CALL SUB_0A5DH
CD 5D 0A
 
;Delay after issuing FDC command

L09C2H:

09C2H
IN A,(0F0H)
DB F0
 
;Get FDC status
09C4H
XOR 001H
EE 01
 
;Invert “busy” bit
09C6H
AND 005H
E6 05
 
;If not track 0 and command in progress…
09C8H
JR Z,L09C2H
28 F8
 
;then keep checking until it’s done.

L09CAH:

09CAH
DJNZ L09AAH
10 DE
 
;Loop again for drives :2 and :3…
09CCH
RET
C9
 
;then return from RST 8.

L09CDH:

09CDH
LD A,E
7B
 
;Cylinder to read
09CEH
OUT (0F3H),A
D3 F3
 
;Out to FDC data reg (destination of seek)
09D0H
LD A,01CH
3E 1C
 
;Seek — verify, 6 ms step
09D2H
OUT (0F0H),A
D3 F0
 
;Out to FDC command reg
09D4H
CALL SUB_0A64H
CD 64 0A
 
;Delay, get FDC status
09D7H
LD D,A
57
 
;Status into D
09D8H
AND 098H
E6 98
 
;Get not ready, seek error, CRC error bits
09DAH
JR NZ,L09E1H
20 05
 
;If any of these, don’t try to read sector
09DCH
LD A,B
78
 
;Function
09DDH
CP 00CH
FE 0C
 
;
09DFH
JR Z,L0A00H
28 1F
 
;Jump if it’s “read sector”

L09E1H:

09E1H
LD B,D
42
 
;FDC status into B

L09E2H:

09E2H
LD D,009H
16 09
 
;Code for ‘Seek Error’
09E4H
JR L09EEH
18 08
 
;Continue with error routine

L09E6H:

09E6H
LD D,00BH
16 0B
 
;’Lost Data’
09E8H
BIT 2,B
CB 50
 
;Did we lose any data?
09EAH
JR NZ,L099FH
20 B3
 
;Jump if yes (error into A, set NZ, RET)
09ECH
LD D,00CH
16 0C
 
;’ID Error’

L09EEH:

09EEH
BIT 4,B
CB 60
 
;Record not found?
09F0H
JR NZ,L099FH
20 AD
 
;Jump if so (Seek:’Seek Err’, Read:’ID Err’)
09F2H
LD D,008H
16 08
 
;’CRC Error’
09F4H
BIT 3,B
CB 58
 
;
09F6H
JR NZ,L099FH
20 A7
 
;Jump if that’s the case
09F8H
LD D,004H
16 04
 
;’Floppy Drive Not Ready’
09FAH
BIT 7,B
CB 78
 
;
09FCH
JR NZ,L099FH
20 A1
 
;Jump if drive wasn’t ready
09FEH
XOR A
AF
 
;Else no errors
09FFH
RET
C9
 
;

L0A00H:

0A00H
LD A,(0405CH)
3A 5C 40
 
;Lowest sector number, 0 or 1
0A03H
LD B,A
47
 
;
0A04H
LD D,081H
16 81
 
;Drive 0, side 0, DDEN
0A06H
LD C,086H
0E 86
 
;Read sector, compare for side 0
0A08H
IN A,(0F2H)
DB F2
 
;FDC sector register — sector to read
0A0AH
CP 012H
FE 12
 
;Is sector number less than 18?
0A0CH
JR C,L0A14H
38 06
 
;Jump if it is — must be SS disk…
0A0EH
SUB 012H
D6 12
 
;else it’s DS — subtract 18 from sector no.
0A10H
SET 4,D
CB E2
 
;Set drive select for side 1
0A12H
SET 3,C
CB D9
 
;Set FDC cmd to compare for side 1

L0A14H:

0A14H
ADD A,B
80
 
;Add 1 if it’s a TRSDOS 1.3 disk
0A15H
OUT (0F2H),A
D3 F2
 
;Sector number to FDC sector register
0A17H
LD A,D
7A
 
;Drive select value…
0A18H
OUT (0F4H),A
D3 F4
 
;out to drive select latch.
0A1AH
LD B,000H
06 00
 
;B will be number of bytes read — LSB
0A1CH
LD E,B
58
 
;E will be MSB — set both to 0
0A1DH
LD A,C
79
 
;FDC command into A
0A1EH
LD C,0F3H
0E F3
 
;C points to FDC data register (for INI)
0A20H
OUT (0F0H),A
D3 F0
 
;Send out FDC command
0A22H
LD A,080H
3E 80
 
;Allow NMI on FDC interrupt request
0A24H
OUT (0E4H),A
D3 E4
 
;Out to NMI mask
0A26H
CALL SUB_0A5DH
CD 5D 0A
 
;Delay after issuing command to FDC
0A29H
LD A,D
7A
 
;
0A2AH
OUT (0F4H),A
D3 F4
 
;Send drive select value out again

L0A2CH:

0A2CH
IN A,(0F0H)
DB F0
 
;FDC status
0A2EH
BIT 1,A
CB 4F
 
;Does FDC have any data for us?
0A30H
JP NZ,L0A39H
C2 39 0A
 
;Jump if it does
0A33H
RLCA
07
 
;Test bit 7 of FDC status
0A34H
JP NC,L0A2CH
D2 2C 0A
 
;If drive is ready, keep waiting for DRQ…
0A37H
JR L0A4DH
18 14
 
;otherwise it’s an error — clean up & return

L0A39H:

0A39H
INI
ED A2
 
;FDC has data…get the first byte
0A3BH
LD A,D
7A
 
;Drive select value
0A3CH
OR 040H
F6 40
 
;Set “wait”

L0A3EH:

0A3EH
OUT (0F4H),A
D3 F4
 
;Out to drive select
0A40H
INI
ED A2
 
;Get byte from FDC (decr B & set Z/NZ)
0A42H
JR NZ,L0A3EH
20 FA
 
;If not 256 bytes yet, get next one…
0A44H
INC E
1C
 
;else incr MSB of byte counter…
0A45H
JP L0A3EH
C3 3E 0A
 
;and loop until NMI occurs.

L0A48H:

0A48H
POP IY
FD E1
 
;NMI: Discard ret addr (it pts to loop above)
0A4AH
XOR A
AF
 
;
0A4BH
OUT (0E4H),A
D3 E4
 
;Don’t allow any NMIs

L0A4DH:

0A4DH
IN A,(0F0H)
DB F0
 
;Get FDC status…
0A4FH
LD B,A
47
 
;into B and C.
0A50H
LD C,B
48
 
;
0A51H
CALL SUB_0A56H
CD 56 0A
 
;Call a RETN and return to next line
0A54H
JR L09E6H
18 90
 
;Set error code, if any, & return from RST 8

SUB_0A56H:

0A56H
RETN
ED 45
 
;Reset interrupt flip-flops

SUB_0A58H:

0A58H
PUSH BC
C5
 
;Delay loop
0A59H
LD B,000H
06 00
 
;The long delay is about 800 usec.
0A5BH
JR L0A60H
18 03
 
;

SUB_0A5DH:

0A5DH
PUSH BC
C5
 
;Another delay loop
0A5EH
LD B,012H
06 12
 
;This one is about 60 usec.

L0A60H:

0A60H
DJNZ L0A60H
10 FE
 
;Repeat this instruction until B is 0…
0A62H
POP BC
C1
 
;then restore BC and return from delay.
0A63H
RET
C9
 
;

SUB_0A64H:

0A64H
CALL SUB_0A5DH
CD 5D 0A
 
;Call short delay

L0A67H:

0A67H
IN A,(0F0H)
DB F0
 
;Get FDC status
0A69H
BIT 0,A
CB 47
 
;
0A6BH
RET Z
C8
 
;Return if not busy (done with command)
0A6CH
BIT 7,A
CB 7F
 
;
0A6EH
RET NZ
C0
 
;Return if not ready
0A6FH
LD C,A
4F
 
;Otherwise save FDC status…
0A70H
JR L0A67H
18 F5
 
;and loop until not busy or not ready.

SUB_0A72H:

0A72H
LD A,(04067H)
3A 67 40
 
;Load MODEL%/III file: get disk error…
0A75H
OR A
B7
 
;from floppy drive restore command.
0A76H
JR NZ,L0AD8H
20 60
 
;Jump if there was an error
0A78H
LD A,001H
3E 01
 
;Sector 1…
0A7AH
LD E,000H
1E 00
 
;cylinder 0…
0A7CH
CALL SUB_0C0BH
CD 0B 0C
 
;read it into sector buffer at 4300H.
0A7FH
JR NZ,L0AD8H
20 57
 
;Jump if any errors
0A81H
LD A,E
7B
 
;Length of sector we just read
0A82H
CP 001H
FE 01
 
;1 = 256 bytes, 2 = 512 bytes
0A84H
JR NZ,L0A8EH
20 08
 
;If not 256 then jump (‘Not Found’ error)
0A86H
LD A,(04300H)
3A 00 43
 
;Get first byte of sector
0A89H
OR A
B7
 
;Zero on 5.x/6.x disks
0A8AH
JR Z,L0A91H
28 05
 
;If zero, then jump, ’cause 5.x/6.x is OK
0A8CH
CP 0FEH
FE FE
 
;Is it 0FEH? (found on TRSDOS 1.3 disks)

L0A8EH:

0A8EH
LD A,000H
3E 00
 
;’ROM Image Not Found’ — If not T1.3…
0A90H
RET NZ
C0
 
;then return w/error (strange disk)

L0A91H:

0A91H
LD A,C
79
 
;FDC status from Read Sector call
0A92H
AND 020H
E6 20
 
;Get record type (Data Address Mark)
0A94H
LD C,001H
0E 01
 
;Assume TRSDOS 1.3 — first sector is 1
0A96H
LD B,003H
06 03
 
;Three sectors per granule
0A98H
LD HL,(04301H)
2A 01 43
 
;Get bytes 01, 02 from boot sector
0A9BH
LD A,L
7D
 
;Dir cyl is byte 01 of boot sector
0A9CH
JR NZ,L0AA2H
20 04
 
;Jump if “deleted” DAM (T1.3 disk) or…
0A9EH
LD A,H
7C
 
;adjust for 5.x/6.x — dir cyl is byte 02
0A9FH
DEC C
0D
 
;Lowest sector number is 0
0AA0H
LD B,006H
06 06
 
;Six sectors per granule

L0AA2H:

0AA2H
LD (0405DH),A
32 5D 40
 
;Store directory cylinder
0AA5H
LD E,A
5F
 
;Directory cylinder value into E
0AA6H
LD A,B
78
 
;Sectors per granule
0AA7H
LD (04063H),A
32 63 40
 
;Store it
0AAAH
LD A,C
79
 
;Lowest sector number
0AABH
LD (0405CH),A
32 5C 40
 
;Store it
0AAEH
LD A,(0405CH)
3A 5C 40
 
;Get it again
0AB1H
OR A
B7
 
;
0AB2H
JR NZ,L0AC4H
20 10
 
;Jump if TRSDOS 1.3 disk (always SS)…
0AB4H
XOR A
AF
 
;otherwise it’s a 5.x/6.x disk.
0AB5H
CALL SUB_0C0BH
CD 0B 0C
 
;Read sector 0 of dir cyl (GAT)
0AB8H
JR NZ,L0AD8H
20 1E
 
;Jump if any errors
0ABAH
LD A,(043CDH)
3A CD 43
 
;Get configuration byte (GAT+x’CD’)
0ABDH
AND 020H
E6 20
 
;Number of sides
0ABFH
LD A,001H
3E 01
 
;Indicate single-sided
0AC1H
JR Z,L0AC4H
28 01
 
;Jump if that’s the case…
0AC3H
INC A
3C
 
;else there are two sides.

L0AC4H:

0AC4H
LD (0405FH),A
32 5F 40
 
;Whatever it is, store number of sides
0AC7H
LD A,002H
3E 02
 
;Sector 2 (of directory)
0AC9H
LD (0405EH),A
32 5E 40
 
;Store as next sector to read

L0ACCH:

0ACCH
LD HL,(0405DH)
2A 5D 40
 
;Dir cyl, sector number
0ACFH
LD E,L
5D
 
;Cylinder into E
0AD0H
LD A,H
7C
 
;Sector into A
0AD1H
CALL SUB_0C0BH
CD 0B 0C
 
;Read it
0AD4H
LD A,000H
3E 00
 
;’ROM Image Not Found’
0AD6H
JR Z,L0AE0H
28 08
 
;Jump if no errors

L0AD8H:

0AD8H
CP 004H
FE 04
 
;Errors while loading ROM image:
0ADAH
JR NZ,L0ADFH
20 03
 
;If not ‘Floppy Drive Not Ready’ then jump
0ADCH
LD A,00AH
3E 0A
 
;Else chg to ‘Can`t Load Image – Not Ready’
0ADEH
OR A
B7
 
;Set NZ (unless error 0, ‘Image Not Found’)

L0ADFH:

0ADFH
RET
C9
 
;

L0AE0H:

0AE0H
LD IX,04300H
DD 21 00 43
 
;Point to first directory entry in sector

L0AE4H:

0AE4H
LD A,(IX+000H)
DD 7E 00
 
;Get first byte of entry
0AE7H
BIT 7,A
CB 7F
 
;Is it an extended dir record?
0AE9H
JR NZ,L0B11H
20 26
 
;If so, skip it
0AEBH
BIT 4,A
CB 67
 
;Is this record in use?
0AEDH
JR Z,L0B11H
28 22
 
;If not, skip it
0AEFH
PUSH IX
DD E5
 
;
0AF1H
POP HL
E1
 
;
0AF2H
LD DE,L0005H
11 05 00
 
;
0AF5H
ADD HL,DE
19
 
;HL points to (DIR+5) — file name
0AF6H
LD DE,04018H
11 18 40
 
;Point to ‘MODEL% ‘ (or MODELA – MODELG)
0AF9H
LD B,008H
06 08
 
;Compare eight bytes of our filename…
0AFBH
CALL SUB_0BF6H
CD F6 0B
 
;with filename in directory entry.
0AFEH
JR NZ,L0B11H
20 11
 
;If no match, then skip to next entry
0B00H
PUSH IX
DD E5
 
;Still points to start of entry
0B02H
POP HL
E1
 
;
0B03H
LD DE,L000BH+2
11 0D 00
 
;
0B06H
ADD HL,DE
19
 
;HL points to (DIR+13) — file extension
0B07H
LD B,003H
06 03
 
;Number of bytes to compare
0B09H
LD DE,L0063H
11 63 00
 
;Point to ‘III’
0B0CH
CALL SUB_0BF6H
CD F6 0B
 
;Compare them
0B0FH
JR Z,L0B36H
28 25
 
;If they match, we’ve found it…

L0B11H:

0B11H
PUSH IX
DD E5
 
;otherwise try next directory entry.
0B13H
POP HL
E1
 
;
0B14H
LD DE,L0020H
11 20 00
 
;
0B17H
ADD HL,DE
19
 
;HL points to 20H bytes past first entry
0B18H
LD A,(0405CH)
3A 5C 40
 
;Get disk type
0B1BH
OR A
B7
 
;
0B1CH
JR Z,L0B22H
28 04
 
;Jump if it’s 5.x/6.x…
0B1EH
LD DE,L0010H
11 10 00
 
;else move pointer 10H bytes more because…
0B21H
ADD HL,DE
19
 
;T1.3 has 30H bytes between dir entries.

L0B22H:

0B22H
PUSH HL
E5
 
;
0B23H
POP IX
DD E1
 
;Points to next dir entry
0B25H
LD A,L
7D
 
;
0B26H
OR A
B7
 
;Is pointer at next page of memory?
0B27H
JR Z,L0B2DH
28 04
 
;Jump if it is
0B29H
CP 0F0H
FE F0
 
;Is it at byte 0F0H (past last T1.3 entry)?
0B2BH
JR NZ,L0AE4H
20 B7
 
;Jump if not…

L0B2DH:

0B2DH
LD A,(0405EH)
3A 5E 40
 
;else we’ve seen all entries in sector.
0B30H
INC A
3C
 
;Incr sector counter and store it, then…
0B31H
LD (0405EH),A
32 5E 40
 
;try next dir sector. (If past end of dir…
0B34H
JR L0ACCH
18 96
 
;sect not found, get ‘Image Not Found’ error)

L0B36H:

0B36H
LD DE,040A2H
11 A2 40
 
;We found ROM image dir entry — point to…
0B39H
PUSH IX
DD E5
 
;our buffer for the directory record.
0B3BH
POP HL
E1
 
;HL now points to the directory entry
0B3CH
LD BC,L0030H
01 30 00
 
;Number of bytes to copy
0B3FH
LDIR
ED B0
 
;Copy directory record into our buffer
0B41H
LD A,0FEH
3E FE
 
;Put 0FEH after directory record, so we…
0B43H
LD (DE),A
12
 
;stop there if we’re still reading the file.
0B44H
LD IX,040B6H
DD 21 B6 40
 
;Point to first extent field and continue

L0B48H:

0B48H
LD E,000H
1E 00
 
;RST 28H — Load Object Code: E = byte offset

L0B4AH:

0B4AH
RST 20H
E7
 
;Get byte from file
0B4BH
RET NZ
C0
 
;Return if we can’t get a byte
0B4CH
DEC A
3D
 
;What did we get?
0B4DH
JR Z,L0B5AH
28 0B
 
;Jump if it was 01H (load block)
0B4FH
DEC A
3D
 
;
0B50H
JR Z,L0B6BH
28 19
 
;Jump if it was 02H (transfer address)
0B52H
RST 20H
E7
 
;Else get another byte — length of block
0B53H
LD B,A
47
 
;Use it as a counter for comment block

L0B54H:

0B54H
RST 20H
E7
 
;Get byte and discard it
0B55H
RET NZ
C0
 
;Return if error getting byte
0B56H
DJNZ L0B54H
10 FC
 
;Loop until we’ve gotten all of block…
0B58H
JR L0B4AH
18 F0
 
;then get next block in file.

L0B5AH:

0B5AH
RST 20H
E7
 
;Load block — get block length
0B5BH
RET NZ
C0
 
;Return if error
0B5CH
DEC A
3D
 
;Decrement by two to allow for load address
0B5DH
DEC A
3D
 
;
0B5EH
LD B,A
47
 
;Store number of bytes to load
0B5FH
CALL SUB_0B6DH
CD 6D 0B
 
;Get address for loading into HL
0B62H
RET NZ
C0
 
;Return if error

L0B63H:

0B63H
RST 20H
E7
 
;Get byte to load
0B64H
RET NZ
C0
 
;Return if error…
0B65H
LD (HL),A
77
 
;else load into memory…
0B66H
INC HL
23
 
;point to next byte in memory…
0B67H
DJNZ L0B63H
10 FA
 
;and loop until end of block.
0B69H
JR L0B4AH
18 DF
 
;Get next block in file

L0B6BH:

0B6BH
RST 20H
E7
 
;Transfer addr — get block length & discard
0B6CH
RET NZ
C0
 
;Return if error

SUB_0B6DH:

0B6DH
RST 20H
E7
 
;Get LSB of address
0B6EH
RET NZ
C0
 
;
0B6FH
LD L,A
6F
 
;Put it in L
0B70H
RST 20H
E7
 
;Get MSB of address
0B71H
RET NZ
C0
 
;
0B72H
LD H,A
67
 
;Put it in H
0B73H
RET
C9
 
;End of RST 28H — transfer address is in HL

L0B74H:

0B74H
PUSH BC
C5
 
;RST 20H (initially) — Get Byte from File
0B75H
PUSH HL
E5
 
;Save BC, HL — used by RST 28H
0B76H
LD A,E
7B
 
;Byte offset in current sector
0B77H
OR A
B7
 
;
0B78H
JR NZ,L0B82H
20 08
 
;If not zero, we don’t need to read a sector
0B7AH
CALL Z,SUB_0B88H
CC 88 0B
 
;If it IS zero, read the next sector of file
0B7DH
JR NZ,L0B85H
20 06
 
;Jump if error reading sector…
0B7FH
LD DE,04300H
11 00 43
 
;else point to start of sector we just read.

L0B82H:

0B82H
XOR A
AF
 
;Set Z to indicate success
0B83H
LD A,(DE)
1A
 
;Get byte from sector buffer
0B84H
INC DE
13
 
;Point to next byte in sector buffer

L0B85H:

0B85H
POP HL
E1
 
;Restore registers, and return
0B86H
POP BC
C1
 
;
0B87H
RET
C9
 
;

SUB_0B88H:

0B88H
LD HL,04060H
21 60 40
 
;Point to number of sectors remaining…
0B8BH
LD A,(HL)
7E
 
;in current extent, and get value in A.
0B8CH
OR A
B7
 
;
0B8DH
JR NZ,L0B93H
20 04
 
;Jump if add’l sectors in current extent…
0B8FH
CALL SUB_0BB7H
CD B7 0B
 
;else calculate next extent…
0B92H
RET NZ
C0
 
;and return if there’s a problem.

L0B93H:

0B93H
DEC (HL)
35
 
;Okay…one less unread sector in extent
0B94H
LD B,012H
06 12
 
;One more than highest sector number
0B96H
LD A,(0405FH)
3A 5F 40
 
;Get number of sides on disk
0B99H
DEC A
3D
 
;
0B9AH
JR Z,L0B9EH
28 02
 
;Jump if SS disk…
0B9CH
LD B,024H
06 24
 
;else new limit for sector number.

L0B9EH:

0B9EH
LD A,(0405EH)
3A 5E 40
 
;Number of last sector we read
0BA1H
CP B
B8
 
;Had we reached end of cylinder?
0BA2H
JR NZ,L0BACH
20 08
 
;If not, skip next four lines…
0BA4H
LD A,(04062H)
3A 62 40
 
;else get cylinder number…
0BA7H
INC A
3C
 
;point to next cylinder…
0BA8H
LD (04062H),A
32 62 40
 
;and store new cylinder number.
0BABH
XOR A
AF
 
;Next sector read is on new cylinder

L0BACH:

0BACH
LD C,A
4F
 
;Last sector number we read
0BADH
INC A
3C
 
;Point to next sector…
0BAEH
LD (0405EH),A
32 5E 40
 
;and store it.
0BB1H
LD A,(04062H)
3A 62 40
 
;Get cylinder number…
0BB4H
LD E,A
5F
 
;and put it in E.
0BB5H
JR L0C0CH
18 55
 
;Jump — read sector and return from call

SUB_0BB7H:

0BB7H
INC IX
DD 23
 
;Find next extent of file — point to…
0BB9H
INC IX
DD 23
 
;next extent of directory info.
0BBBH
LD A,(IX+000H)
DD 7E 00
 
;Get first byte of extent field
0BBEH
LD B,A
47
 
;
0BBFH
AND 0FEH
E6 FE
 
;Drop bit 0
0BC1H
CP 0FEH
FE FE
 
;Is it 0FEH or 0FFH?
0BC3H
JR NZ,L0BC9H
20 04
 
;Jump if it isn’t…
0BC5H
LD A,002H
3E 02
 
;else it’s ‘Too Many Extents’ error.
0BC7H
OR A
B7
 
;Set NZ to indicate error, and return
0BC8H
RET
C9
 
;

L0BC9H:

0BC9H
LD A,B
78
 
;First byte of extent field is starting…
0BCAH
LD (04062H),A
32 62 40
 
;cyl of extent — store as current cyl.
0BCDH
LD A,(IX+001H)
DD 7E 01
 
;Second byte of extent field
0BD0H
LD E,A
5F
 
;Store in E
0BD1H
AND 0E0H
E6 E0
 
;Bits 5,6,7 only — relative gran in cyl
0BD3H
RLCA
07
 
;Get value in lowest three bits…
0BD4H
RLCA
07
 
;
0BD5H
RLCA
07
 
;
0BD6H
LD B,A
47
 
;and store it in B.
0BD7H
LD A,(04063H)
3A 63 40
 
;Get sectors/gran value…
0BDAH
CALL SUB_0C02H
CD 02 0C
 
;and multiply to get starting sector.
0BDDH
LD (0405EH),A
32 5E 40
 
;Store as last sector we read
0BE0H
LD A,E
7B
 
;Second byte of extent field
0BE1H
AND 01FH
E6 1F
 
;Get bits 0-4, number of grans in extent
0BE3H
LD B,A
47
 
;Store in B
0BE4H
LD A,(0405CH)
3A 5C 40
 
;Get flag for disk type
0BE7H
XOR 001H
EE 01
 
;Change to 0 for DOS 1.x, 1 for 5.x/6.x
0BE9H
ADD A,B
80
 
;Add to # grans in extent, because…
0BEAH
LD B,A
47
 
;5.x/6.x uses 0 to indicate 1 gran.
0BEBH
LD A,(04063H)
3A 63 40
 
;Get sectors/gran value…
0BEEH
CALL SUB_0C02H
CD 02 0C
 
;and multiply by # grans in extent…
0BF1H
LD (04060H),A
32 60 40
 
;to get # sectors in extent, which we store.
0BF4H
XOR A
AF
 
;Set Z for success (we found next granule)…
0BF5H
RET
C9
 
;and return.

SUB_0BF6H:

0BF6H
LD A,(DE)
1A
 
;Get character from our filename
0BF7H
CP 025H
FE 25
 
;Is it ‘%’ (wildcard)?
0BF9H
JR Z,L0BFDH
28 02
 
;If yes, then anything matches…
0BFBH
CP (HL)
BE
 
;otherwise compare with char in dir entry.
0BFCH
RET NZ
C0
 
;Return if they don’t match…

L0BFDH:

0BFDH
INC DE
13
 
;else point to next character of both…
0BFEH
INC HL
23
 
;
0BFFH
DJNZ SUB_0BF6H
10 F5
 
;and continue comparing.

L0C01H:

0C01H
RET
C9
 
;Returns with Z set if they match

SUB_0C02H:

0C02H
LD C,A
4F
 
;Multiply — arguments in A & B, result in A
0C03H
LD A,B
78
 
;
0C04H
OR A
B7
 
;Multiplying by zero?
0C05H
RET Z
C8
 
;If so, we already have the answer
0C06H
XOR A
AF
 
;Start with zero

L0C07H:

0C07H
ADD A,C
81
 
;Add original A to it…
0C08H
DJNZ L0C07H
10 FD
 
;B times.
0C0AH
RET
C9
 
;

SUB_0C0BH:

0C0BH
LD C,A
4F
 
;Sector number into C

L0C0CH:

0C0CH
LD HL,04300H
21 00 43
 
;Address of sector buffer in HL
0C0FH
LD B,00CH
06 0C
 
;Function — read sector
0C11H
LD A,001H
3E 01
 
;Floppy disk
0C13H
RST 8
CF
 
;Do disk I/O…
0C14H
RET
C9
 
;and return.

SUB_0C15H:

0C15H
LD A,001H
3E 01
 
;Arcnet boot: This isn’t Arcnet boot ROM…
0C17H
JP L0151H
C3 51 01
 
;so it’s Error 1 (and halt).

L0C1AH:

0C1AH
LD A,004H
3E 04
 
;RS-232 boot (Network 3) starts here
0C1CH
LD (04055H),A
32 55 40
 
;Use 4 to indicate RS-232 boot

L0C1FH:

0C1FH
LD A,064H
3E 64
 
;Set 8/N/1, assert DTR & RTS
0C21H
OUT (0EAH),A
D3 EA
 
;Out to UART & modem control register
0C23H
OR A
B7
 
;Set NZ to get screen address for message
0C24H
LD HL,00CD4H
21 D4 0C
 
;Point to phrases for ‘Not Ready ‘
0C27H
RST 18H
DF
 
;Display it

L0C28H:

0C28H
IN A,(0E8H)
DB E8
 
;Get modem status
0C2AH
AND 020H
E6 20
 
;Bit 5 — Carrier Detect
0C2CH
JR NZ,L0C28H
20 FA
 
;Loop until we have a carrier
0C2EH
LD DE,L0000H
11 00 00
 
;Top left corner of screen
0C31H
LD HL,L0CDCH
21 DC 0C
 
;Three spaces, to cover up ‘Not’
0C34H
RST 10H
D7
 
;Display them, so screen says ‘ Ready ‘
0C35H
LD HL,L0CA4H
21 A4 0C
 
;Point to “Get byte from RS-232” routine
0C38H
LD (0400AH),HL
22 0A 40
 
;Make this address our RST 20H vector
0C3BH
LD HL,04057H
21 57 40
 
;Point to baud rate storage

L0C3EH:

0C3EH
LD A,0FFH
3E FF
 
;Start at 19.2K bits per second

L0C40H:

0C40H
LD (HL),A
&NBSP;
 
;Store baud rate
0C41H
OUT (0E9H),A
D3 E9
 
;Output to baud rate generator
0C43H
OUT (0E8H),A
D3 E8
 
;Reset UART
0C45H
LD B,00AH
06 0A
 
;Number of tries to receive a byte

L0C47H:

0C47H
RST 20H
E7
 
;Try to receive a byte
0C48H
JR NZ,L0C4EH
20 04
 
;If unsuccessful, then retry or give up
0C4AH
CP 055H
FE 55
 
;Did we get a ‘U’?
0C4CH
JR Z,L0C57H
28 09
 
;If yes, then continue…

L0C4EH:

0C4EH
DJNZ L0C47H
10 F7
 
;else retry up to our limit…
0C50H
LD A,(HL)
7E
 
;then get baud rate…
0C51H
SUB 011H
D6 11
 
;and drop down to next lower rate.
0C53H
JR NC,L0C40H
30 EB
 
;If not below slowest rate, then try it…
0C55H
JR L0C3EH
18 E7
 
;else start again at 19.2K bps.

L0C57H:

0C57H
LD B,00AH
06 0A
 
;Number of bytes to receive

L0C59H:

0C59H
RST 20H
E7
 
;Get a byte from RS-232
0C5AH
JR NZ,L0C3EH
20 E2
 
;If error, start again
0C5CH
CP 055H
FE 55
 
;Did we get a ‘U’?
0C5EH
JR NZ,L0C3EH
20 DE
 
;If not, start again…
0C60H
DJNZ L0C59H
10 F7
 
;else get another byte.
0C62H
LD A,(HL)
7E
 
;Okay, we got ten ‘U’s…now get the…
0C63H
AND 00FH
E6 0F
 
;baud rate we used…
0C65H
CALL SUB_0CBEH
CD BE 0C
 
;convert to ASCII & store. (This sets NZ)
0C68H
LD HL,L0CE0H
21 E0 0C
 
;’Found Baud Rate ‘ + character
0C6BH
RST 18H
DF
 
;Display it
0C6CH
LD HL,L0CC4H
21 C4 0C
 
;’Found Baud Rate ‘
0C6FH
CALL SUB_0CB0H
CD B0 0C
 
;Transmit message via RS-232
0C72H
IN A,(0EBH)
DB EB
 
;Clear transmit holding register

L0C74H:

0C74H
RST 20H
E7
 
;Receive a byte
0C75H
JR NZ,L0C8BH
20 14
 
;If error, go to RS-232 error routine
0C77H
CP 0FFH
FE FF
 
;Did we receive 0FFH?
0C79H
JR NZ,L0C74H
20 F9
 
;If not, keep trying until we do.
0C7BH
LD DE,L0244H
11 44 02
 
;Display at row 9, col 0
0C7EH
LD HL,L04BCH
21 BC 04
 
;’Loading ‘ (v1(15): ‘Loading ROM Image’)
0C81H
PUSH HL
E5
 
;Save pointer to this message
0C82H
RST 10H
D7
 
;Display it on our screen
0C83H
POP HL
E1
 
;Still points to ‘Loading ‘
0C84H
CALL SUB_0CB0H
CD B0 0C
 
;Send it out RS-232
0C87H
RST 28H
EF
 
;Receive file from RS-232, load into memory
0C88H
JR NZ,L0C8BH
20 01
 
;If error, go to RS-232 error routine…
0C8AH
JP (HL)
E9
 
;else start executing the file we received.

L0C8BH:

0C8BH
RRCA
0F
 
;RS-232 error: Rotate UART status 3 bits…
0C8CH
RRCA
0F
 
;to the right — bit 0 will then indicate…
0C8DH
RRCA
0F
 
;overrun, bit 1 framing, bit 2 parity.
0C8EH
CALL SUB_0CBEH
CD BE 0C
 
;Convert to ASCII (‘A’-‘H’) & store (sets NZ)
0C91H
CALL SUB_0206H
CD 06 02
 
;Clear the screen (sets BC to 0)
0C94H
PUSH BC
C5
 
;
0C95H
LD HL,L0CE8H
21 E8 0C
 
;’Error ‘ + character for error encountered
0C98H
RST 18H
DF
 
;Display it
0C99H
LD HL,00587H
21 87 05
 
;’Error’
0C9CH
CALL SUB_0CB0H
CD B0 0C
 
;Transmit it
0C9FH
POP BC
C1
 
;Still 0, so scan the keyboard 65536 times…
0CA0H
RST 30H
F7
 
;to let the other system time out and…
0CA1H
JP L0C1FH
C3 1F 0C
 
;re-sync, then we try the RS-232 boot again.

L0CA4H:

0CA4H
IN A,(0EAH)
DB EA
 
;UART & modem control register
0CA6H
BIT 7,A
CB 7F
 
;Character received?
0CA8H
JR Z,L0CA4H
28 FA
 
;If not, loop until we receive one.
0CAAH
AND 038H
E6 38
 
;Test for overrun, framing, parity errors
0CACH
RET NZ
C0
 
;Return if any errors…
0CADH
IN A,(0EBH)
DB EB
 
;else get character from UART…
0CAFH
RET
C9
 
;and return with Z set to indicate success.

SUB_0CB0H:

0CB0H
IN A,(0EAH)
DB EA
 
;UART & modem control register
0CB2H
AND 040H
E6 40
 
;Transmit register empty?
0CB4H
JR Z,SUB_0CB0H
28 FA
 
;If not, loop until it is.
0CB6H
LD A,(HL)
7E
 
;Get character to transmit
0CB7H
OR A
B7
 
;Is it zero?
0CB8H
RET Z
C8
 
;If zero, we’re done transmitting…
0CB9H
OUT (0EBH),A
D3 EB
 
;else send character to UART xmit register…
0CBBH
INC HL
23
 
;point to next character…
0CBCH
JR SUB_0CB0H
18 F2
 
;and repeat.

SUB_0CBEH:

0CBEH
ADD A,041H
C6 41
 
;Convert value 0-15 to ASCII…
0CC0H
LD (04068H),A
32 68 40
 
;store it…
0CC3H
RET
C9
 
;and return.

L0CC4H:

0CC4H
LD B,(HL)
46
F
0CC5H
LD L,A
6F
o
0CC6H
LD (HL),L
75
u
0CC7H
LD L,(HL)
6E
n
0CC8H
LD H,H
64
d
0CC9H
JR NZ,68
20 42
  B
0CCBH
LD H,C
61
a
0CCCH
LD (HL),L
75
u
0CCDH
LD H,H
64
d
0CCEH
JR NZ,84
20 52
  R
0CD0H
LD H,C
61
a
0CD1H
LD (HL),H
74
t
0CD2H
LD H,L
65
e
0CD3H
JR NZ,L0CD5H
20 00
  .

L0CD5H:

0CD5H
NOP
00
0CD6H
CALL NC,05004H
D4 04 50
0CD9H
DEC B
05
0CDAH
RST 38H
FF
0CDBH
RST 38H
FF

L0CDCH:

0CDCH
JR NZ,L0CFEH
20 20
0CDEH
JR NZ,L0CE0H
20 00

L0CE0H:

0CE0H
ADD A,H
84
0CE1H
LD BC,L0CC4H
01 C4 0C
0CE4H
LD L,B
68
0CE5H
LD B,B
40
0CE6H
RST 38H
FF
0CE7H
RST 38H
FF

L0CE8H:

0CE8H
CALL NZ,08703H
C4 03 87
0CEBH
DEC B
05
0CECH
ADC A,L
8D
0CEDH
DEC B
05
0CEEH
LD L,B
68
0CEFH
LD B,B
40
0CF0H
RST 38H
FF
0CF1H
RST 38H
FF

L0CF2H:

0CF2H
LD SP,03FFEH
31 FE 3F
 
;RAM Test: Put stack in video memory
0CF5H
LD IY,03C80H
FD 21 80 3C
 
;Point to row 2, col 0 of screen
0CF9H
LD A,008H
3E 08
 
;2 MHz clock, disable I/O bus,…
0CFBH
OUT (0ECH),A
D3 EC
 
;enable alt char set.
0CFDH
XOR A
AF
 
;Set 0000H-37FFH as read-only,…

L0CFEH:

0CFEH
OUT (084H),A
D3 84
 
;Model III memory map.
0D00H
LD IX,L0D14H
DD 21 14 0D
 
;Address to go to after clearing screen.

L0D04H:

0D04H
LD A,020H
3E 20
 
;The routine starting here…
0D06H
LD DE,03C00H
11 00 3C
 
;is called from…
0D09H
LD (DE),A
12
 
;several locations…
0D0AH
LD H,D
62
 
;in the RAM test.
0D0BH
LD L,E
6B
 
;It clears the screen…
0D0CH
LD BC,L03FFH
01 FF 03
 
;and then…
0D0FH
INC DE
13
 
;jumps to the…
0D10H
LDIR
ED B0
 
;address contained in…
0D12H
JP (IX)
DD E9
 
;the IX register.

L0D14H:

0D14H
LD HL,L0ED2H
21 D2 0E
 
;’Dynamic RAM Test’
0D17H
LD DE,03C00H
11 00 3C
 
;Top of screen
0D1AH
CALL L0249H
CD 49 02
 
;Display it
0D1DH
LD HL,L0EE3H
21 E3 0E
 
;’Press To Begin…’
0D20H
LD DE,03C40H
11 40 3C
 
;Next row on screen
0D23H
CALL L0249H
CD 49 02
 
;Display it
0D26H
LD HL,L0F0CH
21 0C 0F
 
;’Errors will be displayed’
0D29H
LD DE,L00C0H
11 C0 00
 
;Next row on screen
0D2CH
CALL L0249H
CD 49 02
 
;Display it

L0D2FH:

0D2FH
LD A,(03840H)
3A 40 38
 
;Column 6 of keyboard matrix
0D32H
CP 001H
FE 01
 
;Is <ENTER> pressed?
0D34H
JR NZ,L0D2FH
20 F9
 
;Loop until it is.
0D36H
LD IX,L0D3DH
DD 21 3D 0D
 
;Address of next part of test
0D3AH
JP L0D04H
C3 04 0D
 
;Clear screen, then continue.

L0D3DH:

0D3DH
LD HL,L0F32H
21 32 0F
 
;Column headings for display
0D40H
LD DE,03C80H
11 80 3C
 
;Row 2, col 0 of screen
0D43H
CALL L0249H
CD 49 02
 
;Display it
0D46H
LD HL,L0F92H
21 92 0F
 
;’Stack’
0D49H
LD DE,L03F4H
11 F4 03
 
;Row 15, col 52 of screen
0D4CH
CALL L0249H
CD 49 02
 
;Display it

L0D4FH:

0D4FH
LD HL,L0F56H
21 56 0F
 
;’Test Pattern is 55h’
0D52H
LD DE,03C40H
11 40 3C
 
;Row 1, col 0 of screen
0D55H
CALL L0249H
CD 49 02
 
;Display it
0D58H
LD HL,04000H
21 00 40
 
;Fill memory from 4000H…
0D5BH
LD D,H
54
 
;to 0FFFFH…
0D5CH
LD E,L
5D
 
;with 55H (01010101 binary).
0D5DH
LD BC,0BFFFH
01 FF BF
 
;
0D60H
LD A,055H
3E 55
 
;
0D62H
LD (DE),A
12
 
;
0D63H
INC DE
13
 
;
0D64H
LDIR
ED B0
 
;
0D66H
LD HL,04000H
21 00 40
 
;Start checking memory at 4000H
0D69H
LD BC,0BFFFH
01 FF BF
 
;Number of bytes to check

L0D6CH:

0D6CH
LD A,055H
3E 55
 
;Compare 55H…
0D6EH
LD E,(HL)
5E
 
;with the value we find in memory.
0D6FH
CP E
BB
 
;If different, something’s wrong with memory.
0D70H
LD IX,L0D77H
DD 21 77 0D
 
;Where to resume if we jump
0D74H
JP NZ,L0E0AH
C2 0A 0E
 
;If memory error, then display it

L0D77H:

0D77H
DEC BC
0B
 
;One less byte left to check
0D78H
INC HL
23
 
;Point to next byte to check
0D79H
LD A,C
79
 
;Have we checked all the bytes?
0D7AH
OR B
B0
 
;
0D7BH
JR NZ,L0D6CH
20 EF
 
;If not, then check the next one
0D7DH
LD HL,L0F6AH
21 6A 0F
 
;Else point to ‘AAh’
0D80H
LD DE,03C50H
11 50 3C
 
;Row 1, col 16 of screen
0D83H
CALL L0249H
CD 49 02
 
;Display it, so we see ‘Test Pattern is AAh’
0D86H
LD HL,04000H
21 00 40
 
;The same test again, except…
0D89H
LD D,H
54
 
;this time…
0D8AH
LD E,L
5D
 
;we fill…
0D8BH
LD BC,0BFFFH
01 FF BF
 
;4000H to 0FFFFH…
0D8EH
LD A,0AAH
3E AA
 
;with 0AAH (10101010 binary).
0D90H
LD (DE),A
12
 
;
0D91H
INC DE
13
 
;
0D92H
LDIR
ED B0
 
;
0D94H
LD HL,04000H
21 00 40
 
;
0D97H
LD BC,0BFFFH
01 FF BF
 
;Compare contents of memory…

L0D9AH:

0D9AH
LD A,0AAH
3E AA
 
;with 0AAH this time.
0D9CH
LD E,(HL)
5E
 
;
0D9DH
CP E
BB
 
;
0D9EH
LD IX,L0DA5H
DD 21 A5 0D
 
;
0DA2H
JP NZ,L0E0AH
C2 0A 0E
 
;Jump if memory error, resume at next line

L0DA5H:

0DA5H
DEC BC
0B
 
;
0DA6H
INC HL
23
 
;
0DA7H
LD A,C
79
 
;
0DA8H
OR B
B0
 
;
0DA9H
JP NZ,L0D9AH
C2 9A 0D
 
;Loop until we’ve tested all the bytes.
0DACH
LD D,000H
16 00
 
;Mask for testing each byte

L0DAEH:

0DAEH
LD B,D
42
 
;Save mask in B for a moment
0DAFH
LD HL,L0F6EH
21 6E 0F
 
;’Modified Address Test ld (hl),mask’
0DB2H
LD DE,03C40H
11 40 3C
 
;Second line of screen
0DB5H
CALL L0249H
CD 49 02
 
;Display it (overwrite ‘Test Pattern…’)
0DB8H
LD H,D
62
 
;Address of last character displayed…
0DB9H
LD L,E
6B
 
;into HL.
0DBAH
LD D,B
50
 
;Mask back into D
0DBBH
INC HL
23
 
;Point to next space on screen.
0DBCH
RRA
1F
 
;There should be a LD A,D before this…
0DBDH
RRA
1F
 
;to get the mask value into A. See text.
0DBEH
RRA
1F
 
;Anyway, move the upper nybble of the…
0DBFH
RRA
1F
 
;”mask” value into the lower nybble.
0DC0H
AND 00FH
E6 0F
 
;Get lower (formerly upper) 4 bits only
0DC2H
ADD A,090H
C6 90
 
;Convert to one ASCII character…
0DC4H
DAA
27
 
;using the usual algorithm…
0DC5H
ADC A,040H
CE 40
 
;so we can display the top half…
0DC7H
DAA
27
 
;of the “mask” value.
0DC8H
LD (HL),A
77
 
;Put character on screen.
0DC9H
INC HL
23
 
;Point to next space on screen.
0DCAH
LD A,D
7A
 
;Get mask value
0DCBH
AND 00FH
E6 0F
 
;Lower nybble only
0DCDH
ADD A,090H
C6 90
 
;Convert to one ASCII character again
0DCFH
DAA
27
 
;
0DD0H
ADC A,040H
CE 40
 
;
0DD2H
DAA
27
 
;
0DD3H
LD (HL),A
77
 
;Display 2nd char of mask value
0DD4H
LD HL,04000H
21 00 40
 
;Start testing at 4000H
0DD7H
LD BC,0BFFFH
01 FF BF
 
;Number of bytes to test

L0DDAH:

0DDAH
LD A,D
7A
 
;Get mask value…
0DDBH
XOR L
AD
 
;XOR with LSB of address…
0DDCH
XOR H
AC
 
;and with MSB of address…
0DDDH
LD (HL),A
77
 
;and put it into memory.
0DDEH
INC HL
23
 
;Loop until…
0DDFH
DEC BC
0B
 
;
0DE0H
LD A,C
79
 
;
0DE1H
OR B
B0
 
;
0DE2H
JR NZ,L0DDAH
20 F6
 
;we’ve tested all the bytes.
0DE4H
LD A,D
7A
 
;Mask value
0DE5H
AND 003H
E6 03
 
;Is mask divisible by four?
0DE7H
JR NZ,L0DEDH
20 04
 
;If not, skip next two lines…
0DE9H
LD A,040H
3E 40
 
;else run the drive motors a bit to put…
0DEBH
OUT (0F4H),A
D3 F4
 
;add’l load on power supply, I suppose.

L0DEDH:

0DEDH
LD HL,04000H
21 00 40
 
;Start testing at 4000H again
0DF0H
LD BC,0BFFFH
01 FF BF
 
;number of bytes to test

L0DF3H:

0DF3H
LD A,D
7A
 
;Mask…
0DF4H
XOR L
AD
 
;XOR lsb of address…
0DF5H
XOR H
AC
 
;and msb of address…
0DF6H
LD E,(HL)
5E
 
;should match what we put there…
0DF7H
CP E
BB
 
;a moment ago.
0DF8H
LD IX,L0DFEH
DD 21 FE 0D
 
;Where to resume if error
0DFCH
JR NZ,L0E0AH
20 0C
 
;If memory error, display it & resume

L0DFEH:

0DFEH
INC HL
23
 
;Loop until we’ve…
0DFFH
DEC BC
0B
 
;
0E00H
LD A,C
79
 
;
0E01H
OR B
B0
 
;
0E02H
JR NZ,L0DF3H
20 EF
 
;tested all the bytes…
0E04H
INC D
14
 
;then increment mask…
0E05H
JR NZ,L0DAEH
20 A7
 
;and test again, unless mask was up to 0FFH.
0E07H
JP L0D4FH
C3 4F 0D
 
;If it was, repeat entire test, endlessly.

L0E0AH:

0E0AH
EX AF,AF’
08
 
;Memory Error display routine:
0E0BH
EXX
D9
 
;Use alternate AF, BC, DE, HL
0E0CH
LD BC,00040H
01 40 00
 
;Number of characters on one line of screen
0E0FH
ADD IY,BC
FD 09
 
;Point to next line on screen
0E11H
LD BC,0C040H
01 40 C0
 
;(0C040H = negative 3FC0H)
0E14H
ADD IY,BC
FD 09
 
;Did IY point to the last line…
0E16H
JR NC,L0E1CH
30 04 0
 
;of the screen? Jump if it didn’t…
0E18H
LD IY,L0000H
FD 21 00 00
 
;else keep it at the bottom line.

L0E1CH:

0E1CH
LD BC,03FC0H
01 C0 3F
 
;Cancels out addition of 0C040H
0E1FH
ADD IY,BC
FD 09
 
;
0E21H
EXX
D9
 
;Restore original BC,DE,HL
0E22H
LD A,H
7C
 
;High byte of address of defective byte
0E23H
RRA
1F
 
;Move upper four bits down
0E24H
RRA
1F
.
0E25H
RRA
1F
.
0E26H
RRA
1F
.
0E27H
AND 00FH
E6 0F
 
;Use upper (now lower) 4 bits only
0E29H
ADD A,090H
C6 90
 
;Convert to one ASCII character
0E2BH
DAA
27
0E2CH
ADC A,040H
CE 40
. @
0E2EH
DAA
27
 
;Display character under ‘Address’ heading…
0E2FH
LD (IY+001H),A
FD 77 01
 
;at col 1 of current row.
0E32H
LD A,H
7C
 
;Repeat for high byte of address…
0E33H
AND 00FH
E6 0F
 
;lower 4 bits this time.
0E35H
ADD A,090H
C6 90
 
;Convert to ASCII
0E37H
DAA
27
0E38H
ADC A,040H
CE 40
. @
0E3AH
DAA
27
0E3BH
LD (IY+002H),A
FD 77 02
 
;Display at col 2 of current line
0E3EH
LD A,L
7D
 
;Repeat for low byte of address
0E3FH
RRA
1F
.
0E40H
RRA
1F
.
0E41H
RRA
1F
.
0E42H
RRA
1F
.
0E43H
AND 00FH
E6 0F
. .
0E45H
ADD A,090H
C6 90
. .
0E47H
DAA
27
0E48H
ADC A,040H
CE 40
. @
0E4AH
DAA
27
0E4BH
LD (IY+003H),A
FD 77 03
. w .
0E4EH
LD A,L
7D
}
0E4FH
AND 00FH
E6 0F
. .
0E51H
ADD A,090H
C6 90
. .
0E53H
DAA
27
0E54H
ADC A,040H
CE 40
. @
0E56H
DAA
27
0E57H
LD (IY+004H),A
FD 77 04
 
;Display in cols 3 & 4 of current line
0E5AH
LD A,(HL)
7E
 
;Read contents of problem address again
0E5BH
LD I,A
ED 47
 
;Use I register as temporary storage
0E5DH
RRA
1F
 
;Convert it to ASCII
0E5EH
RRA
1F
.
0E5FH
RRA
1F
.
0E60H
RRA
1F
.
0E61H
AND 00FH
E6 0F
. .
0E63H
ADD A,090H
C6 90
. .
0E65H
DAA
27
0E66H
ADC A,040H
CE 40
. @
0E68H
DAA
27
0E69H
LD (IY+00AH),A
FD 77 0A
. w .
0E6CH
LD A,I
ED 57
. W
0E6EH
AND 00FH
E6 0F
. .
0E70H
ADD A,090H
C6 90
. .
0E72H
DAA
27
0E73H
ADC A,040H
CE 40
. @
0E75H
DAA
27
 
;Display under ‘Retry’ heading…
0E76H
LD (IY+00BH),A
FD 77 0B
 
;in cols 10,11 of current line.
0E79H
LD A,E
7B
 
;Value originally read from problem address
0E7AH
RRA
1F
 
;Convert to ASCII, etc.
0E7BH
RRA
1F
0E7CH
RRA
1F
0E7DH
RRA
1F
0E7EH
AND 00FH
E6 0F
. .
0E80H
ADD A,090H
C6 90
. .
0E82H
DAA
27
0E83H
ADC A,040H
CE 40
. @
0E85H
DAA
27
0E86H
LD (IY+011H),A
FD 77 11
. w .
0E89H
LD A,E
7B
{
0E8AH
AND 00FH
E6 0F
. .
0E8CH
ADD A,090H
C6 90
. .
0E8EH
DAA
27
0E8FH
ADC A,040H
CE 40
. @
0E91H
DAA
27
0E92H
LD (IY+012H),A
FD 77 12
 
;Display under ‘Read’ heading, cols 17,18
0E95H
EX AF,AF’
08
 
;Restore original AF register…
0E96H
LD I,A
ED 47
 
;save it in I for a moment…
0E98H
RRA
1F
 
;this is the value we expected to find…
0E99H
RRA
1F
 
;at the problem address, and didn’t.
0E9AH
RRA
1F
 
;Convert to ASCII, etc.
0E9BH
RRA
1F
.
0E9CH
AND 00FH
E6 0F
. .
0E9EH
ADD A,090H
C6 90
. .
0EA0H
DAA
27
0EA1H
ADC A,040H
CE 40
. @
0EA3H
DAA
27
0EA4H
LD (IY+017H),A
FD 77 17
. w .
0EA7H
LD A,I
ED 57
. W
0EA9H
AND 00FH
E6 0F
. .
0EABH
ADD A,090H
C6 90
. .
0EADH
DAA
27
0EAEH
ADC A,040H
CE 40
. @
0EB0H
DAA
27
0EB1H
LD (IY+018H),A
FD 77 18
. w .
0EB4H
LD A,D
7A
z
0EB5H
RRA
1F
.
0EB6H
RRA
1F
.
0EB7H
RRA
1F
.
0EB8H
RRA
1F
.
0EB9H
AND 00FH
E6 0F
. .
0EBBH
ADD A,090H
C6 90
. .
0EBDH
DAA
27
0EBEH
ADC A,040H
CE 40
. @
0EC0H
DAA
27
0EC1H
LD (IY+020H),A
FD 77 20
. w
0EC4H
LD A,D
7A
z
0EC5H
AND 00FH
E6 0F
. .
0EC7H
ADD A,090H
C6 90
. .
0EC9H
DAA
27
0ECAH
ADC A,040H
CE 40
. @
0ECCH
DAA
27
0ECDH
LD (IY+021H),A
FD 77 21
 
;Display under ‘Mask’ heading, cols 32,33
0ED0H
JP (IX)
DD E9
 
;Resume test at address in IX

L0ED2H:

0ED2H
LD B,H
44
D
0ED3H
LD A,C
79
y
0ED4H
LD L,(HL)
6E
n
0ED5H
LD H,C
61
a
0ED6H
LD L,L
6D
m
0ED7H
LD L,C
69
i
0ED8H
LD H,E
63
c
0ED9H
JR NZ,L0F2DH
20 52
  R
0EDBH
LD B,C
41
A
0EDCH
LD C,L
4D
M
0EDDH
JR NZ,L0F33H
20 54
  T
0EDFH
LD H,L
65
e
0EE0H
LD (HL),E
73
s
0EE1H
LD (HL),H
74
t
0EE2H
NOP
00
 
;Zero byte indicates end of message

L0EE3H:

0EE3H
LD D,B
50
P
0EE4H
LD (HL),D
72
r
0EE5H
LD H,L
65
e
0EE6H
LD (HL),E
73
s
0EE7H
LD (HL),E
73
s
0EE8H
JR NZ,L0F26H
20 3C
 <
0EEAH
LD B,L
45
E
0EEBH
LD L,(HL)
6E
n
0EECH
LD (HL),H
74
t
0EEDH
LD H,L
65
e
0EEEH
LD (HL),D
72
r
0EEFH
LD A,020H
3E 20
>
0EF1H
LD D,H
54
T
0EF2H
LD L,A
6F
o
0EF3H
JR NZ,L0F37H
20 42
  B
0EF5H
LD H,L
65
e
0EF6H
LD H,A
67
g
0EF7H
LD L,C
69
i
0EF8H
LD L,(HL)
6E
n
0EF9H
JR NZ,L0F3CH
20 41
  A
0EFBH
LD L,(HL)
6E
n
0EFCH
LD H,H
64
d
0EFDH
JR NZ,L0F51H
20 52
  R
0EFFH
LD B,L
45
E
0F00H
LD D,E
53
S
0F01H
LD B,L
45
E
0F02H
LD D,H
54
T
0F03H
JR NZ,L0F59H
20 54
  T
0F05H
LD L,A
6F
o
0F06H
JR NZ,L0F4DH
20 45
  E
0F08H
LD A,B
78
x
0F09H
LD L,C
69
i
0F0AH
LD (HL),H
74
t
0F0BH
NOP
00
.

L0F0CH:

0F0CH
LD B,C
41
A
0F0DH
LD L,(HL)
6E
n
0F0EH
LD A,C
79
y
0F0FH
JR NZ,L0F56H
20 45
  E
0F11H
LD (HL),D
72
r
0F12H
LD (HL),D
72
r
0F13H
LD L,A
6F
o
0F14H
LD (HL),D
72
r
0F15H
LD (HL),E
73
s
0F16H
JR NZ,L0F5CH
20 44
  D
0F18H
LD H,L
65
e
0F19H
LD (HL),H
74
t
0F1AH
LD H,L
65
e
0F1BH
LD H,E
63
c
0F1CH
LD (HL),H
74
t
0F1DH
LD H,L
65
e
0F1EH
LD H,H
64
d
0F1FH
JR NZ,L0F78H
20 57
  W
0F21H
LD L,C
69
i
0F22H
LD L,H
6C
l
0F23H
LD L,H
6C
l
0F24H
JR NZ,L0F68H
20 42
  B

L0F26H:

0F26H
LD H,L
65
e
0F27H
JR NZ,L0F6DH
20 44
  D
0F29H
LD L,C
69
i
0F2AH
LD (HL),E
73
s
0F2BH
LD (HL),B
70
p
0F2CH
LD L,H
6C
l

L0F2DH:

0F2DH
LD H,C
61
a
0F2EH
LD A,C
79
y
0F2FH
LD H,L
65
e
0F30H
LD H,H
64
d
0F31H
NOP
00
.

L0F32H:

0F32H
LD B,C
41
A

L0F33H:

0F33H
LD H,H
64
d
0F34H
LD H,H
64
d
0F35H
LD (HL),D
72
r
0F36H
LD H,L
65
e

L0F37H:

0F37H
LD (HL),E
73
s
0F38H
LD (HL),E
73
s
0F39H
JR NZ,34
20 20
0F3BH
LD D,D
52
R

L0F3CH:

0F3CH
LD H,L
65
e
0F3DH
LD (HL),H
74
t
0F3EH
LD (HL),D
72
r
0F3FH
LD A,C
79
y
0F40H
JR NZ,L0F62H
20 20
0F42H
LD D,D
52
R
0F43H
LD H,L
65
e
0F44H
LD H,C
61
a
0F45H
LD H,H
64
d
0F46H
JR NZ,L0F68H
20 20
0F48H
LD D,A
57
W
0F49H
LD (HL),D
72
r
0F4AH
LD L,C
69
i
0F4BH
LD (HL),H
74
t
0F4CH
LD (HL),H
74
t
0F4DHh:
0F4DH
ld h,l
65
e
0F4EH
LD L,(HL)
6E
n
0F4FH
JR NZ,L0F71H
20 20
0F51Hh:
0F51H
ld c,l
4d
M
0F52H
LD H,C
61
a
0F53H
LD (HL),E
73
s
0F54H
LD L,E
6B
k
0F55H
NOP
00
.
0F56Hh:
0F56H
ld d,h
54
T
0F57H
LD H,L
65
e
0F58H
LD (HL),E
73
s
0F59Hh:
0F59H
ld (hl),h
74
t
0F5AH
JR NZ,L0FACH
20 50
  P
0F5CHh:
0F5CH
ld h,c
61
a
0F5DH
LD (HL),H
74
t
0F5EH
LD (HL),H
74
t
0F5FH
LD H,L
65
e
0F60H
LD (HL),D
72
r
0F61H
LD L,(HL)
6E
n

L0F62H:

0F62H
JR NZ,L0FADH
20 49
  I
0F64H
LD (HL),E
73
s
0F65H
JR NZ,L0F9CH
20 35
  5
0F67H
DEC (HL)
35
5

L0F68H:

0F68H
LD L,B
68
h
0F69H
NOP
00
.

L0F6AH:

0F6AH
LD B,C
41
A
0F6BH
LD B,C
41
A
0F6CH
LD L,B
68
h

L0F6DH:

0F6DH
NOP
00
.

L0F6EH:

0F6EH
LD C,L
4D
M
0F6FH
LD L,A
6F
o
0F70H
LD H,H
64
d

L0F71H:

0F71H
LD L,C
69
i
0F72H
LD H,(HL)
66
f
0F73H
LD L,C
69
i
0F74H
LD H,L
65
e
0F75H
LD H,H
64
d
0F76H
JR NZ,L0FB9H
20 41
  A

L0F78H:

0F78H
LD H,H
64
d
0F79H
LD H,H
64
d
0F7AH
LD (HL),D
72
r
0F7BH
LD H,L
65
e
0F7CH
LD (HL),E
73
s
0F7DH
LD (HL),E
73
s
0F7EH
JR NZ,L0FD4H
20 54
  T
0F80H
LD H,L
65
e
0F81H
LD (HL),E
73
s
0F82H
LD (HL),H
74
t
0F83H
JR NZ,L0FA5H
20 20
0F85H
LD L,H
6C
l
0F86H
LD H,H
64
d
0F87H
JR NZ,L0FB1H
20 28
  (
0F89H
LD L,B
68
h
0F8AH
LD L,H
6C
l
0F8BH
ADD HL,HL
29
)
0F8CH
INC L
2C
,
0F8DH
LD L,L
6D
m
0F8EH
LD H,C
61
a
0F8FH
LD (HL),E
73
s
0F90H
LD L,E
6B
k
0F91H
NOP
00
.

L0F92H:

0F92H
LD D,E
53
S
0F93H
LD (HL),H
74
t
0F94H
LD H,C
61
a
0F95H
LD H,E
63
c
0F96H
LD L,E
6B
k
0F97H
NOP
00
.
0F98H
NOP
00
.
0F99H
NOP
00
.
0F9AH
NOP
00
.
0F9BH
NOP
00
.

L0F9CH:

0F9CH
NOP
00
.
0F9DH
NOP
00
.
0F9EH
NOP
00
.
0F9FH
NOP
00
.
0FA0H
NOP
00
.
0FA1H
NOP
00
.
0FA2H
NOP
00
.
0FA3H
NOP
00
.
0FA4H
NOP
00
.

L0FA5H:

0FA5H
NOP
00
.
0FA6H
NOP
00
.
0FA7H
NOP
00
.
0FA8H
NOP
00
.
0FA9H
NOP
00
.
0FAAH
NOP
00
.
0FABH
NOP
00
.

L0FACH:

0FACH
NOP
00
.

L0FADH:

0FADH
NOP
00
.
0FAEH
NOP
00
.
0FAFH
NOP
00
.
0FB0H
NOP
00
.

L0FB1H:

0FB1H
NOP
00
.
0FB2H
NOP
00
.
0FB3H
NOP
00
.
0FB4H
NOP
00
.
0FB5H
NOP
00
.
0FB6H
NOP
00
.
0FB7H
NOP
00
.
0FB8H
NOP
00
.

L0FB9H:

0FB9H
NOP
00
.
0FBAH
NOP
00
.
0FBBH
NOP
00
.
0FBCH
NOP
00
.
0FBDH
NOP
00
.
0FBEH
NOP
00
.
0FBFH
NOP
00
.
0FC0H
NOP
00
.
0FC1H
NOP
00
.
0FC2H
NOP
00
.
0FC3H
NOP
00
.
0FC4H
NOP
00
.
0FC5H
NOP
00
.
0FC6H
NOP
00
.
0FC7H
NOP
00
.
0FC8H
NOP
00
.
0FC9H
NOP
00
.
0FCAH
NOP
00
.
0FCBH
NOP
00
.
0FCCH
NOP
00
.
0FCDH
NOP
00
.
0FCEH
NOP
00
.
0FCFH
NOP
00
.
0FD0H
NOP
00
.
0FD1H
NOP
00
.
0FD2H
NOP
00
.
0FD3H
NOP
00
.

L0FD4H:

0FD4H
NOP
00
.
0FD5H
NOP
00
.
0FD6H
NOP
00
.
0FD7H
NOP
00
.
0FD8H
NOP
00
.
0FD9H
NOP
00
.
0FDAH
NOP
00
.
0FDBH
NOP
00
.
0FDCH
NOP
00
.
0FDDH
NOP
00
.
0FDEH
NOP
00
.
0FDFH
NOP
00
.
0FE0H
NOP
00
.
0FE1H
NOP
00
.
0FE2H
NOP
00
.
0FE3H
NOP
00
.
0FE4H
NOP
00
.
0FE5H
NOP
00
.
0FE6H
NOP
00
.
0FE7H
NOP
00
.
0FE8H
NOP
00
.
0FE9H
NOP
00
.
0FEAH
NOP
00
.
0FEBH
JR Z,101
28 63
( c
0FEDH
ADD HL,HL
29
)
0FEEH
JR NZ,51
20 31
  1
0FF0H
ADD HL,SP
39
9
0FF1H
JR C,53
38 33
8 3
0FF3H
INC L
2C
,
0FF4H
JR NZ,86
20 54
  T
0FF6H
LD H,C
61
a
0FF7H
LD L,(HL)
6E
n
0FF8H
LD H,H
64
d
0FF9H
LD A,C
79
y
0FFAH
JR NZ,69
20 43
  C
0FFCH
LD L,A
6F
o
0FFDH
LD (HL),D
72
r
0FFEH
LD (HL),B
70
p
0FFFH
DEFB 02EH
2E
.
END