This is a disassembly of TRSDOS v2.3’s BOOT/SYS file. The sole purpose of this 256 byte “program” is to check for SYS0/SYS and if its directory entry is found on Drive :0, Track 11, Directory Entry 4, it uses the information from this entry to load SYS1/SYS into memory at 4D00H and then jump to it. If SYS0/SYS is not present, it displays a NO SYSTEM message and halts.
4200H-4226H – Clear the screen and look to see if directory entry 4 on track 11H (decimal 17) on drive 0 (which would be SYS0/SYS) has the “occupied” flag set. If no, jump to “NO SYSTEM” routine.
Check to see if SYS0/SYS is on the diskette.
To test to see if SYS0/SYS is there, we check the first byte of the SYS0/SYS directory entry for the “entry occupied” flag.
AND 00010000
422AH – Get the next byte from the sector buffer (at 4275H). Register pair DE holds the track and sector number for the next sector to be read. BC contains the buffer address, and is set to 4DFFH to signal that the sector buffer is empty.
AND 00000111
423EH – This is the main loop. First SYS0/SYS directory entry is read to verify disk and get sector info. Then SYS1/SYS file contents are loaded (from the sectors pointed to by SYS0/SYS metadata). Finally, the code jumps to SYS1/SYS transfer address.
4275H – This is the routine to read a byte from the diskette and put it into Register A. BC must point to the buffer holding the disk sector.
4290H – Display the “DISK ERROR” message and Lock the System.
429AH – Display the message pointed to by Register Pair HL. Message must end with an 0DH or 03H delimeter.
42AAH – Read a sector from the disk. D must hold the track, E must hold the sector, and BC must point to the start of the memory buffer to hold the sector data.
In this BOOT routine, this gets the SYS0/SYS dir entry. On entry, D has the directory track 11H (decimal 17), E has the sector (04H).
There is a disk error.
42B1
LD C,L
LD (HL),00011011
LD (HL),10001000
42CDH – This routine does not appear to be called in BOOT/SYS.
42DAH – Jumped here if the operation is done and the controller status is NOT busy.
AND 01011100
42E2H – Message Storage Location
Character codes to CLS
“NO SYSTEM” error message.
“DISK ERROR” error message.