Listing: 01-reset-entry.asm · 00-jump-table.asm
Related: Self-test
suite · Data tables · Memory map
Entry: 0000h →
JP 0036h
Menu: 014Fh
Auto-boot: 012Bh
Flowchart
RESET 0000
│
▼
JP 0036 cold boot
│
├─ I/O init table (07FD) — 14 port/value pairs
├─ Memory mapper probe (port 16h, RAM @ 2000h)
├─ SP := 6000h
├─ Video port 04h + CRTC 0E/0F
├─ Clear console (0521); fill banks D0–DE @ 7000h
├─ Banner + revision
├─ Main RAM test @ 2200h → fail: print + HALT
│
├─ Phase (5FD8): "01"→menu / "02"→auto / else test 01D2
│
├─ 012B auto-boot if (09AA)≠0 → LOADING → disk → CALL 2400
│
└─ 014F menu
print W/F/T (gated by 09AA / 09AD)
wait key → @07F4 → handler (return 014F pushed)
Jump table
@ 0000–0035
| Offset | Instruction | Role |
|---|---|---|
0000 |
JP 0036 |
Cold reset |
0003 |
JP 014F |
Main menu |
0006 |
JP 03D5 |
Kbd status IN A,(01) & 02h |
0009 |
JP 03DA |
Kbd data IN A,(00) |
000C |
JP 0443 |
Putchar |
000F |
JP 1000 |
Floppy (key F) |
0012 |
JP 1066 |
Winchester (key W) |
0015 |
RET |
|
0018 |
JP 1434 |
Geometry + restore |
001B |
JP 14A8 |
Read sector(s) |
001E |
JP 03C0 |
Config copy |
0021 |
JP 0420 |
Bank helper |
0024 |
JP 12B1 |
Config @6600 |
0027 |
JP 12FB |
Config @6660 |
002A |
JP 13A9 |
Type21 handoff |
002D |
JP 155D |
HW errors |
0030 |
JP 11C0 |
Sys errors |
0033 |
JP 012B |
Auto-boot |
Cold start @ 0036
A. I/O init
(0036–0044)
DI
HL=07FD, B=0E
loop: C=(HL++), A=(HL++), OUT (C),A
Ports: 9D,98,9B×4,91×2,70,9A,1A/1B — see Data tables.
B. Mapper probe
(0046–0078)
OUT (16h),80h; complement test at2000h- Programs 9 mapper windows; saves
(5FDDh)←E(0 = small RAM) SP←6000h
C. Video
(007E–009B)
OUTI×24 → port04hfrom@0827(delay: doubleEX (SP),IX)- CRTC ports
0Eh/0Fh, 14 registers from@0819
D. Console
(009D–00C7)
| Step | Role |
|---|---|
CALL 0521 |
Fill ~5800–5F7F spaces; cursor vars |
Loop D=D0…DE |
CALL 0436 + fill 7000–77FF
with 0Fh |
OUTI×6 port 1 |
Extra video setup |
OUT (00h),08h |
Console control |
E. Banner
(00CD–00E2)
03E4HL=0585— title
- delay via putchar
A=05
03E4HL=05A8—EXECUTIVE - REVISION 2.00 (AC)
Main RAM gate @ 00EB
HL=2200; write; CP FFh
JR NZ, continue
print "MAIN MEMORY NOT INSTALLED - HALTING"
CALL 03DD / HALT
Open bus / missing RAM reads FFh → fatal.
Phase / self-test @ 00FF
(5FD8) |
Action |
|---|---|
"01" |
→ menu 014F |
"02" |
→ auto-boot 012B |
| other | store "01", print PERFORMING SYSTEM
TEST, CALL 01D2 |
CF → menu; else store "02", fall into auto-boot |
Full suite: Self-test
suite · 07-system-test.asm
(PROM / keyboard / disk / memory-screen; continuous mode is menu
[T] @01B2.)
Auto-boot @ 012B
SP=2200
if (09AA)==0 → menu
print "LOADING - PLEASE WAIT"
CALL 15AA / CALL 1072
success: putchar 18h; CALL 2400h
fail → menu
This dump: 09AA=C8h (enabled),
09AD=07h (floppy in menu).
Main menu @ 014F
SP=2200 / CALL 15AA / putchar 18h
if (09AA)≠0: print [W] @05D2
if (09AD)≠0: print [F] @05FA
print [T] @0667 + lead-in @05CE
Key loop @ 0184
wait: CALL 03D5 / JR Z,wait
CALL 03DA
uppercase if ≥'a'
scan 3 entries @07F4
PUSH 014F / JP (HL)
| Key | Handler |
|---|---|
F |
1000 floppy |
T |
01B2 continuous test |
W |
1066 Winchester |
T (01B2): cycle counter
@5FDC, CALL 01D2, loop until fail (return to
menu).
Helpers (first use)
| Addr | Role | Listing |
|---|---|---|
03D5 |
Kbd ready | 04-helpers-console.asm |
03DA |
Kbd data | |
03DD |
OUT (00),02 |
|
03E4 |
Print bit-7 string | |
0436 |
Map bank OUT (16),~D |
|
0443 |
Putchar | |
0521 |
Clear console |
String printer 03E4
LD A,(HL)
BIT 7,A / RES 7,A
JP NZ, putchar ; final char
CALL putchar / INC HL / JR 03E4