DOSPLUS 3.5 for the Model III - SYS16/SYS Disassembled

Page Customization

Introduction/Summary

DOSPLUS 3.5 SYS16/SYS Disassembly - The Library Commands CONFIG and SYSTEM (Model III)

SYS16/SYS is the last of the high overlays: it loads at 5200H and holds two library commands, routines 3 and 4 of its table at 5200H with the request codes F3H and F4H: CONFIG and SYSTEM. CMNDI@ takes the codes from SYS1/SYS's table of the library commands and passes them to the overlay request handler, which loads SYS16/SYS and calls the routine with Register Pair HL at the rest of the command line. No file of the diskette requests routine 2 (F2H). The file is a load module of 7 blocks, 1703 bytes, from 5200H to 58A6H, with the transfer address 5200H and no gaps; the work area after the file starts at 58A7H. Both commands take their field and parameters by EVAL@, each with its own evaluation block whose three field blocks are all 58A7H.

The Parts of SYS16/SYS

AddressContents
5200H-5207HThe routine table (routines 2-4) and routine 2 (5200H, 5206H).
5208H-536BHCONFIG, the list of the drives and the description of a drive (5208H, 5242H, 527FH).
536CH-54FFHThe change of a drive, CONFIG's texts, evaluation block and parameter table (536CH, 5431H, 5493H).
5500H-5653HSYSTEM: the memory pointers and the options (5500H, 5563H).
5654H-577AHThe configuration file, its byte output and its loader (5654H, 570FH, 571BH).
577BH-58A6HThe table of the system areas, SYSTEM's texts, evaluation block and parameter table, the number output, the error exits (577BH, 5799H, 57B1H, 581EH, 5876H, 5897H).

CONFIG

CONFIG (5208H) without a drive lists the eight entries of DCTTBL (44E8H): each line is $ with the drive number in two digits, :name, and the description of its drive control table (527FH): NIL for a drive with the NIL bit; Hard,Fix or Hard,Rem for a rigid drive, Floppy,Sden or Floppy,Dden for a floppy drive; then ,Size=5 or 8, ,Sides=, ,Step= and ,PD=; a rigid drive adds ,CO= (the cylinder offset), ,HO= (the head offset), ,TS= (the sectors per track) and ,WP, a floppy drive ,WP, ,MD, ,HL and ,Skip for the bits set. With a drive (else error 2BH; a NIL drive is error 29H) the parameters change its table (536CH): SIDES (+0CH, not 0), SIZE (5 or 8, bit 7 of +03H), STEP (+04H), PDRIVE (+0AH), WPROT (bit 6), COFFST (+06H-+07H), HOFFST (+05H), TSIZE (+0DH), MDELAY (bit 4), HLOAD (bit 3) and SKIP (bit 2 of +03H); bit 0 of +03H is set, so the diskette is logged again at its next use. Nothing else is checked: any step rate, physical drive or sector count is taken, and only the low byte of a number is used. Nothing is written to a diskette: the change lasts until the system is booted again, or is kept in a configuration file.

SYSTEM

SYSTEM (5500H) alone shows the memory pointers LOW$ (42A7H), HIGH$ (4411H) and TOP$ (42A5H) in hexadecimal. With parameters (5563H): TIME, DATE and LOGO set bits 3, 2 and 1 of the boot flags (+10H of the boot sector, sector 2 of cylinder 0 of drive 0), and STEP, PORT and MODE its +16H, +17H and +18H (the default step rate, and a port and a value to output at boot). When any of these or SAVE is given, the boot sector is read into 4300H and written back. BLINK (its complement) goes to 401CH, CAPS to 4019H, CURSOR (when not 0) to 4023H, and HIGH$ (when 0100H or more) to HIGH$ itself, which must be above 5BFFH (else error 2DH; it is not checked against TOP$); these take effect at once, and SAVE copies the first three to +13H-+15H of the boot sector. HIGH$ is never saved.

With a field SYSTEM writes a configuration file (5654H): a name (else error 2CH) with the default extension CFG, opened by INIT@. The image is built at 5A00H: the 126 bytes of the loader (571BH), the system areas of the table at 577BH, and the memory from HIGH$ + 1 to TOP$, where the drivers and filters are. It is written as a load module whose blocks load 0800H lower than the image (5A00H becomes 5200H), with the transfer address 5200H. Run as a program, the file's loader copies each area back to its place and the high memory above the restored HIGH$, sets the log bit of every drive with a driver, sets up the RS-232 interface by the ROM's 005AH, keeps the cursor position and the resident overlay bytes of the moment, and RETurns to DOSPLUS.

Differences from the Manual

CONFIG's parameter names in the bytes are SIDES, SIZE, STEP, PDRIVE, COFFST, HOFFST, TSIZE, WPROT, MDELAY, HLOAD and SKIP: the manual's PD, CO, HO, TS, WP, MD and HL are abbreviations of them. EVAL@ takes the first entry that starts with what is typed, so S is SIDES, not STEP as the manual says. CONFIG checks only SIDES (not 0) and SIZE (5 or 8). SYSTEM's HIGH is the name HIGH$; CURSOR=0 is ignored, and BLINK, CAPS and CURSOR are kept in the boot sector only with SAVE.

Differences from the Model I

The Model III code is the Model I code with the Model III addresses of SYS0/SYS (DCTTBL 44E8H, the wrapper 4485H, LOCDCT% 44A3H, DISKIO% 4488H, FEXT@ 444BH, LOW$ 42A7H, HIGH$ 4411H, TOP$ 42A5H, the resident overlay bytes 429DH, the boot sector buffer 4300H) and three changes: SYSTEM reads the boot sector without first clearing the double density bit of drive 0 and setting its log bit (11 bytes less, 559DH on); the loader of a configuration file sets up the RS-232 interface by the ROM's 005AH instead of sending ports E8H-EAH (10 bytes less); and the table of the system areas saves 400CH-404BH, 41E5H-4215H, 428DH-42BAH, 42BEH-42CDH, 4400H-4466H, 4467H-44A5H and 44A6H-455AH (seven entries, 4 bytes less). Everything after a change is lower by the bytes left out.

Variables

Self-Modified Operands

Address
Size
Contents
538AH-538BH
2 bytes
SIDES
The value of SIDES: the operand of LD DE at 5389H.
5397H-5398H
2 bytes
SIZE
The value of SIZE: the operand of LD DE at 5396H.
53B1H-53B2H
2 bytes
STEP (CONFIG)
The value of STEP (CONFIG): the operand of LD DE at 53B0H.
53BBH-53BCH
2 bytes
PDRIVE
The value of PDRIVE: the operand of LD DE at 53BAH.
53C5H-53C6H
2 bytes
WPROT
The value of WPROT: the operand of LD DE at 53C4H.
53D8H-53D9H
2 bytes
COFFST
The value of COFFST: the operand of LD DE at 53D7H.
53E6H-53E7H
2 bytes
HOFFST
The value of HOFFST: the operand of LD DE at 53E5H.
53F0H-53F1H
2 bytes
TSIZE
The value of TSIZE: the operand of LD DE at 53EFH.
53FAH-53FBH
2 bytes
MDELAY
The value of MDELAY: the operand of LD DE at 53F9H.
540DH-540EH
2 bytes
HLOAD
The value of HLOAD: the operand of LD DE at 540CH.
5420H-5421H
2 bytes
SKIP
The value of SKIP: the operand of LD DE at 541FH.
55A8H-55A9H
2 bytes
LOGO
The value of LOGO: the operand of LD DE at 55A7H.
55B7H-55B8H
2 bytes
DATE
The value of DATE: the operand of LD DE at 55B6H.
55C6H-55C7H
2 bytes
TIME
The value of TIME: the operand of LD DE at 55C5H.
55D5H-55D6H
2 bytes
STEP (SYSTEM)
The value of STEP (SYSTEM): the operand of LD DE at 55D4H.
55DFH-55E0H
2 bytes
PORT
The value of PORT: the operand of LD DE at 55DEH.
55E9H-55EAH
2 bytes
MODE
The value of MODE: the operand of LD DE at 55E8H.
55F3H-55F4H
2 bytes
BLINK
The value of BLINK: the operand of LD DE at 55F2H.
55FFH-5600H
2 bytes
CAPS
The value of CAPS: the operand of LD DE at 55FEH.
560AH-560BH
2 bytes
CURSOR
The value of CURSOR: the operand of LD DE at 5609H.
5614H-5615H
2 bytes
HIGH$
The value of HIGH$: the operand of LD DE at 5613H.
5627H-5628H
2 bytes
SAVE
The value of SAVE: the operand of LD DE at 5626H.
5640H
1 byte
Write Flag
The operand of LD A,00H at 563FH: FFH when the boot sector is to be written back.

Work Areas

Address
Size
Contents
58A7H-58C7H
33 bytes
Field Block
The flag byte and file control block of EVAL@'s field; also the BCD number and digits of 581EH.
5900H-59FFH
256 bytes
File Buffer
The buffer of the configuration file.
5A00H on
as needed
Image
The image of a configuration file.

Outside Routines

AddressContents
4479HSYS0/SYS: EVAL@.
444BHSYS0/SYS: FEXT@.
4420HSYS0/SYS: INIT@.
4428HSYS0/SYS: CLOSE@.
44A3HSYS0/SYS: LOCDCT%.
4488HSYS0/SYS: DISKIO%, functions 3 DREAD and 5 DWRITE.
4485HSYS0/SYS: run a routine with the registers saved.
4467HSYS0/SYS: DSPLY@.
4409HSYS0/SYS: ERROR@.
001BHROM: put a byte to a file.
0033HROM: show the character in Register A on the display.
005AHROM: set up the RS-232 interface.

Disassembly

5200H - The Routine Table

Data: SYS16/SYS's table of routines 2-4, one word each, used by SYS0/SYS's overlay request handler (its 49D3H-49E6H) for the request codes F2H-F4H. CMNDI@ takes the codes of the library commands from SYS1/SYS's table: CONFIG F3H (51C1H), SYSTEM F4H (51DAH). No file of the diskette requests F2H.

5200-5201
DEFW 5206H 06 52
Routine 2: 5206H, XOR A and RET, which SYS0/SYS's record locator requests when it loads SYS16/SYS back (its 4D5FH-4D6CH).
5202-5203
DEFW 5208H 08 52
Routine 3: 5208H, CONFIG (F3H): show the drive control tables, or change one drive's.
5204-5205
DEFW 5500H 00 55
Routine 4: 5500H, SYSTEM (F4H): show the memory pointers, set the system's options, or save the system's state as a configuration file.

5206H - Routine 2

Nothing to do when SYS0/SYS's record locator brings SYS16/SYS back.

5206
XOR A AF
Set Register A to 00H by XORing it with itself, and set the Z FLAG: routine 2 has no work to do.
5207
RET C9
RETurn to SYS0/SYS's overlay request handler (49E7H) with Register A = 00H.

5208H - CONFIG

Routine 3, entered from CMNDI@ through the overlay request handler with Register Pair HL at the rest of the command line. The parameters (table 549CH) go into the operands of the change routine 536CH: the numbers SIDES, SIZE, STEP, PDRIVE, HOFFST and TSIZE start with the low byte FFH and COFFST as FFFFH (not given), the switches WPROT, MDELAY, HLOAD and SKIP as 53H (not given). EVAL@ takes the field with the block at 5493H. With a field the drive is changed (536CH); without one the eight drives of DCTTBL are listed, each as $nn :name and its description (527FH).

5208
LD A,FFH 3E FF
Load Register A with FFH, the mark of a number that was not given.
520A
LD (53D8H),A 32 D8 53
Store Register A (FFH) into 53D8H, the low byte of the operand of LD DE,0000H at 53D7H, the value of COFFST.
520D
LD (53D9H),A 32 D9 53
Store Register A (FFH) into 53D9H, the high byte of the operand of LD DE,0000H at 53D7H: COFFST = FFFFH.
5210
LD (53BBH),A 32 BB 53
Store Register A (FFH) into 53BBH, the operand of LD DE,0000H at 53BAH, the value of PDRIVE.
5213
LD (53E6H),A 32 E6 53
Store Register A (FFH) into 53E6H, the operand of LD DE,0000H at 53E5H, the value of HOFFST.
5216
LD (53F0H),A 32 F0 53
Store Register A (FFH) into 53F0H, the operand of LD DE,0000H at 53EFH, the value of TSIZE.
5219
LD (53B1H),A 32 B1 53
Store Register A (FFH) into 53B1H, the operand of LD DE,0000H at 53B0H, the value of STEP.
521C
LD (538AH),A 32 8A 53
Store Register A (FFH) into 538AH, the operand of LD DE,0000H at 5389H, the value of SIDES.
521F
LD (5397H),A 32 97 53
Store Register A (FFH) into 5397H, the operand of LD DE,0000H at 5396H, the value of SIZE.
5222
LD A,53H 3E 53
Load Register A with 53H, the mark of a switch that was not given.
5224
LD (53C5H),A 32 C5 53
Store Register A (53H) into 53C5H, the operand of LD DE,0000H at 53C4H, the value of WPROT.
5227
LD (53FAH),A 32 FA 53
Store Register A (53H) into 53FAH, the operand of LD DE,0000H at 53F9H, the value of MDELAY.
522A
LD (540DH),A 32 0D 54
Store Register A (53H) into 540DH, the operand of LD DE,0000H at 540CH, the value of HLOAD.
522D
LD (5420H),A 32 20 54
Store Register A (53H) into 5420H, the operand of LD DE,0000H at 541FH, the value of SKIP.
5230
LD IX,5493H DD 21 93 54
Point Index Register IX to 5493H, CONFIG's evaluation block: the field block 58A7H and the parameter table 549CH.
5234
GOSUB to 4479H, EVAL@, to take the fields and parameters from the command line at Register Pair HL: the NZ FLAG on an error.
5237
If the NZ FLAG is set (EVAL@ failed), JUMP to 58A2H to post the error in Register A.
523A
LD A,(IX+00H) DD 7E 00
Load Register A with the flags of the evaluation block at Index Register IX+00H: bits 0-2 the fields given.
523D
AND 07H E6 07
AND Register A with 07H, bits 0-2: the Z FLAG when no field was given.
523F
If the NZ FLAG is set (a field), JUMP to 536CH to change that drive.

5242H - The List of the Drives

Without a field CONFIG shows the eight entries of DCTTBL, drives 0-7, one line each: $, the drive number in two digits, a space, a colon, the two characters of the drive's name, a space, and the description of its drive control table (527FH).

5242
LD IY,44E8H FD 21 E8 44
Point Index Register IY to 44E8H, DCTTBL, the table of the eight drives (4 bytes each).
5246
LD C,00H 0E 00
Load Register C with 00H, drive 0, the first drive of the list.
5248
LD A,24H 3E 24
Load Register A with 24H, the character $ that starts the line of a drive.
524A
GOSUB to 0033H, the ROM's routine that shows the character in Register A on the display.
524D
LD E,C 59
Load Register E with Register C, the drive number, the number to show.
524E
LD D,00H 16 00
Load Register D with 00H: Register Pair DE = the drive number.
5250
LD B,03H 06 03
Load Register B with 03H, so that 5822H leaves out at most three of the five digits: two digits are shown.
5252
GOSUB to 5822H to show the number in Register Pair DE in decimal, Register B leading zeros at most left out.
5255
LD A,20H 3E 20
Load Register A with 20H, the space after the drive number.
5257
GOSUB to 0033H, the ROM's routine that shows the character in Register A on the display.
525A
LD A,3AH 3E 3A
Load Register A with 3AH, the colon that starts a drive's name.
525C
GOSUB to 0033H, the ROM's routine that shows the character in Register A on the display.
525F
LD A,(IY+02H) FD 7E 02
Load Register A with the first character of the drive's name, DCTTBL +02H at Index Register IY+02H.
5262
GOSUB to 0033H, the ROM's routine that shows the character in Register A on the display.
5265
LD A,(IY+03H) FD 7E 03
Load Register A with the second character of the drive's name, DCTTBL +03H at Index Register IY+03H.
5268
GOSUB to 0033H, the ROM's routine that shows the character in Register A on the display.
526B
LD A,20H 3E 20
Load Register A with 20H, the space before the description of the drive.
526D
GOSUB to 0033H, the ROM's routine that shows the character in Register A on the display.
5270
GOSUB to 527FH to show the description of the drive control table of the entry at Index Register IY.
5273
LD DE,0004H 11 04 00
Load Register Pair DE with 0004H, the length of an entry of DCTTBL.
5276
ADD IY,DE FD 19
ADD Register Pair DE to Index Register IY, to the entry of the next drive.
5278
LD A,07H 3E 07
Load Register A with 07H, the last drive number.
527A
INC C 0C
INCrement Register C by 1, to the next drive number.
527B
CP C B9
Compare Register A against Register C: the NC FLAG while the drive number is 7 or less.
527C
If the NC FLAG is set (drives left), JUMP back to 5248H for the line of the next drive.
527E
RET C9
RETurn to the overlay request handler: CONFIG has listed the drives.

527FH - The Description of a Drive

Index Register IX is the drive control table of the DCTTBL entry at Index Register IY; the routine runs under 4485H, which keeps the registers. A drive with the NIL bit (bit 3 of DCT+00H) is NIL. Otherwise a rigid drive (bit 5 of DCT+03H) is Hard,Fix or Hard,Rem (bit 1, removable), a floppy drive Floppy,Sden or Floppy,Dden (bit 7 of DCT+0BH); then ,Size=5 or 8 (bit 7 of DCT+03H), ,Sides= (DCT+0CH), ,Step= (DCT+04H), ,PD= (DCT+0AH). A rigid drive goes on with ,CO= (DCT+06H-07H), ,HO= (DCT+05H), ,TS= (DCT+0DH) and ,WP (bit 6); a floppy drive with ,WP (bit 6), ,MD (bit 4), ,HL (bit 3) and ,Skip (bit 2) of DCT+03H. A carriage return ends the line.

527F
GOSUB to 4485H, which runs the rest of this routine with the registers saved and puts them back when it RETurns.
5282
LD E,(IY+00H) FD 5E 00
Load Register E with the low byte of the drive control table's address, DCTTBL +00H at Index Register IY+00H.
5285
LD D,(IY+01H) FD 56 01
Load Register D with the high byte of the address, DCTTBL +01H at Index Register IY+01H.
5288
PUSH DE D5
Save Register Pair DE, the address of the drive control table, to the top of the stack.
5289
POP IX DD E1
Restore Index Register IX from the top of the stack: Index Register IX = the drive control table.
528B
BIT 3,(IX+00H) DD CB 00 5E
Test bit 3 of DCT+00H at Index Register IX+00H, the NIL bit: set for a drive that is not used.
528F
If the Z FLAG is set (not NIL), JUMP to 5298H for the description of the drive.
5291
LD HL,5431H 21 31 54
Point Register Pair HL to 5431H, the text NIL with its carriage return.
5294
GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL.
5297
RET C9
RETurn to the caller through 4485H: the line of a NIL drive is done.
5298
BIT 5,(IX+03H) DD CB 03 6E
Test bit 5 of DCT+03H at Index Register IX+03H: set for a rigid drive.
529C
If the Z FLAG is set (a floppy drive), JUMP to 52B5H.
529E
LD HL,5435H 21 35 54
Point Register Pair HL to 5435H, the text Hard.
52A1
GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL.
52A4
BIT 1,(IX+03H) DD CB 03 4E
Test bit 1 of DCT+03H at Index Register IX+03H: set for a removable rigid drive.
52A8
LD HL,543AH 21 3A 54
Point Register Pair HL to 543AH, the text ,Fix (LD does not change the flags).
52AB
If the Z FLAG is set (fixed), JUMP to 52B0H to show ,Fix.
52AD
LD HL,543FH 21 3F 54
Point Register Pair HL to 543FH, the text ,Rem, for a removable rigid drive.
52B0
GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL.
52B3
JUMP to 52CAH for the size of the drive, which floppy and rigid drives share.
52B5
LD HL,5444H 21 44 54
Point Register Pair HL to 5444H, the text Floppy.
52B8
GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL.
52BB
BIT 7,(IX+0BH) DD CB 0B 7E
Test bit 7 of DCT+0BH at Index Register IX+0BH: set for double density.
52BF
LD HL,544BH 21 4B 54
Point Register Pair HL to 544BH, the text ,Sden (LD does not change the flags).
52C2
If the Z FLAG is set (single density), JUMP to 52C7H to show ,Sden.
52C4
LD HL,5451H 21 51 54
Point Register Pair HL to 5451H, the text ,Dden, for double density.
52C7
GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL.
52CA
LD HL,5457H 21 57 54
Point Register Pair HL to 5457H, the text ,Size=.
52CD
GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL.
52D0
BIT 7,(IX+03H) DD CB 03 7E
Test bit 7 of DCT+03H at Index Register IX+03H: set for an 8 inch drive.
52D4
LD A,35H 3E 35
Load Register A with 35H, the digit 5 of a 5 inch drive (LD does not change the flags).
52D6
If the Z FLAG is set (5 inch), JUMP to 52DAH to show the 5.
52D8
LD A,38H 3E 38
Load Register A with 38H, the digit 8 of an 8 inch drive.
52DA
GOSUB to 0033H, the ROM's routine that shows the character in Register A on the display.
52DD
LD HL,545EH 21 5E 54
Point Register Pair HL to 545EH, the text ,Sides=.
52E0
GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL.
52E3
LD E,(IX+0CH) DD 5E 0C
Load Register E with the number of surfaces, DCT+0CH at Index Register IX+0CH.
52E6
GOSUB to 581EH to show the number in Register E in decimal.
52E9
LD HL,5466H 21 66 54
Point Register Pair HL to 5466H, the text ,Step=.
52EC
GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL.
52EF
LD E,(IX+04H) DD 5E 04
Load Register E with the step rate code, DCT+04H at Index Register IX+04H.
52F2
GOSUB to 581EH to show the number in Register E in decimal.
52F5
LD HL,546DH 21 6D 54
Point Register Pair HL to 546DH, the text ,PD=.
52F8
GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL.
52FB
LD E,(IX+0AH) DD 5E 0A
Load Register E with the physical drive, DCT+0AH at Index Register IX+0AH.
52FE
GOSUB to 581EH to show the number in Register E in decimal.
5301
BIT 5,(IX+03H) DD CB 03 6E
Test bit 5 of DCT+03H at Index Register IX+03H: set for a rigid drive.
5305
If the NZ FLAG is set (rigid), JUMP to 5335H for the values of a rigid drive.
5307
LD HL,5472H 21 72 54
Point Register Pair HL to 5472H, the text ,WP.
530A
BIT 6,(IX+03H) DD CB 03 76
Test bit 6 of DCT+03H at Index Register IX+03H, the software write protect.
530E
If the NZ FLAG is set (write protected), GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL.
5311
LD HL,5476H 21 76 54
Point Register Pair HL to 5476H, the text ,MD.
5314
BIT 4,(IX+03H) DD CB 03 66
Test bit 4 of DCT+03H at Index Register IX+03H, the delay after the motor is turned on.
5318
If the NZ FLAG is set (motor delay), GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL.
531B
LD HL,547AH 21 7A 54
Point Register Pair HL to 547AH, the text ,HL.
531E
BIT 3,(IX+03H) DD CB 03 5E
Test bit 3 of DCT+03H at Index Register IX+03H, the delay after the head is loaded.
5322
If the NZ FLAG is set (head load delay), GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL.
5325
LD HL,547EH 21 7E 54
Point Register Pair HL to 547EH, the text ,Skip.
5328
BIT 2,(IX+03H) DD CB 03 56
Test bit 2 of DCT+03H at Index Register IX+03H, the double step.
532C
If the NZ FLAG is set (double step), GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL.
532F
LD A,0DH 3E 0D
Load Register A with 0DH, the carriage return that ends the line.
5331
GOSUB to 0033H, the ROM's routine that shows the character in Register A on the display.
5334
RET C9
RETurn to the caller through 4485H: the line of a floppy drive is done.
5335
LD HL,5484H 21 84 54
Point Register Pair HL to 5484H, the text ,CO=.
5338
GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL.
533B
LD E,(IX+06H) DD 5E 06
Load Register E with the low byte of the cylinder offset, DCT+06H at Index Register IX+06H.
533E
LD D,(IX+07H) DD 56 07
Load Register D with the high byte of the cylinder offset, DCT+07H at Index Register IX+07H.
5341
GOSUB to 5820H to show the number in Register Pair DE in decimal.
5344
LD HL,5489H 21 89 54
Point Register Pair HL to 5489H, the text ,HO=.
5347
GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL.
534A
LD E,(IX+05H) DD 5E 05
Load Register E with the head offset, DCT+05H at Index Register IX+05H.
534D
GOSUB to 581EH to show the number in Register E in decimal.
5350
LD HL,548EH 21 8E 54
Point Register Pair HL to 548EH, the text ,TS=.
5353
GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL.
5356
LD E,(IX+0DH) DD 5E 0D
Load Register E with the sectors per track, DCT+0DH at Index Register IX+0DH.
5359
GOSUB to 581EH to show the number in Register E in decimal.
535C
LD HL,5472H 21 72 54
Point Register Pair HL to 5472H, the text ,WP.
535F
BIT 6,(IX+03H) DD CB 03 76
Test bit 6 of DCT+03H at Index Register IX+03H, the software write protect.
5363
If the NZ FLAG is set (write protected), GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL.
5366
LD A,0DH 3E 0D
Load Register A with 0DH, the carriage return that ends the line.
5368
GOSUB to 0033H, the ROM's routine that shows the character in Register A on the display.
536B
RET C9
RETurn to the caller through 4485H: the line of a rigid drive is done.

536CH - Change a Drive

The field must be a drive (else error 2BH) whose drive control table is not NIL (else error 29H). Bit 0 of DCT+03H is set, so the diskette is logged again at its next use. Each parameter given changes the table: SIDES the surfaces (DCT+0CH; 0 is error 2DH), SIZE 5 or 8 (bit 7 of DCT+03H; any other is 2DH), STEP the step rate code (DCT+04H), PDRIVE the physical drive (DCT+0AH), WPROT bit 6 of DCT+03H, COFFST the cylinder offset (DCT+06H-07H), HOFFST the head offset (DCT+05H), TSIZE the sectors per track (DCT+0DH), MDELAY bit 4, HLOAD bit 3 and SKIP bit 2 of DCT+03H. Only the low byte of a number is used and nothing else is checked.

536C
LD A,(58A7H) 3A A7 58
Load Register A with the flag byte of the field block at 58A7H.
536F
PUSH AF F5
Save Register Pair AF, the flag byte, to the top of the stack.
5370
AND C8H E6 C8
AND Register A with C8H, bits 7, 6 and 3: device, name and drive.
5372
CP 88H FE 88
Compare Register A against 88H: a drive without a name.
5374
If the NZ FLAG is set (not a drive), JUMP to 589AH to post error 2BH, Illegal devicespec.
5377
POP AF F1
Restore Register Pair AF, the flag byte, from the top of the stack.
5378
AND 07H E6 07
AND Register A with 07H, bits 0-2: the drive number.
537A
LD C,A 4F
Load Register C with Register A, the drive number for LOCDCT%.
537B
GOSUB to 44A3H, LOCDCT%, to point Index Register IY to the drive control table of the drive in Register C.
537E
BIT 3,(IY+00H) FD CB 00 5E
Test bit 3 of DCT+00H at Index Register IY+00H, the NIL bit: set for a drive that is not used.
5382
If the NZ FLAG is set (NIL), JUMP to 58A0H to post error 29H, Device not available.
5385
SET 0,(IY+03H) FD CB 03 C6
Set bit 0 of DCT+03H at Index Register IY+03H, so that the diskette is logged again at its next use.
5389
LD DE,0000H 11 00 00
Load Register Pair DE with the value of SIDES, the operand 538AH-538BH (0000H in the file): FFH in Register E when it is not given.
538C
INC E 1C
INCrement Register E by 1: the Z FLAG when SIDES was not given (FFH).
538D
If the Z FLAG is set (no SIDES), JUMP to 5396H for SIZE.
538F
DEC E 1D
DECrement Register E by 1, back to the value of SIDES: the Z FLAG for 0.
5390
If the Z FLAG is set (no surfaces), JUMP to 5897H to post error 2DH, Invalid data provided.
5393
LD (IY+0CH),E FD 73 0C
Store Register E, the number of surfaces, into DCT+0CH at Index Register IY+0CH.
5396
LD DE,0000H 11 00 00
Load Register Pair DE with the value of SIZE, the operand 5397H-5398H (0000H in the file): FFH in Register E when it is not given.
5399
LD A,E 7B
Load Register A with Register E, the low byte of SIZE.
539A
INC A 3C
INCrement Register A by 1: the Z FLAG when SIZE was not given (FFH), else the size plus 1.
539B
If the Z FLAG is set (no SIZE), JUMP to 53B0H for STEP.
539D
CP 06H FE 06
Compare Register A against 06H, a size of 5 plus 1: a 5 inch drive.
539F
If the Z FLAG is set (SIZE=5), JUMP to 53ACH to clear the 8 inch bit.
53A1
CP 09H FE 09
Compare Register A against 09H, a size of 8 plus 1: an 8 inch drive.
53A3
If the NZ FLAG is set (neither 5 nor 8), JUMP to 5897H to post error 2DH, Invalid data provided.
53A6
SET 7,(IY+03H) FD CB 03 FE
Set bit 7 of DCT+03H at Index Register IY+03H: an 8 inch drive.
53AA
JUMP to 53B0H for STEP, with the 8 inch bit of DCT+03H set.
53AC
RES 7,(IY+03H) FD CB 03 BE
Reset bit 7 of DCT+03H at Index Register IY+03H: a 5 inch drive.
53B0
LD DE,0000H 11 00 00
Load Register Pair DE with the value of STEP, the operand 53B1H-53B2H (0000H in the file): FFH in Register E when it is not given.
53B3
INC E 1C
INCrement Register E by 1: the Z FLAG when STEP was not given (FFH).
53B4
If the Z FLAG is set (no STEP), JUMP to 53BAH for PDRIVE.
53B6
DEC E 1D
DECrement Register E by 1, back to the value of STEP.
53B7
LD (IY+04H),E FD 73 04
Store Register E, the step rate code, into DCT+04H at Index Register IY+04H.
53BA
LD DE,0000H 11 00 00
Load Register Pair DE with the value of PDRIVE, the operand 53BBH-53BCH (0000H in the file): FFH in Register E when it is not given.
53BD
INC E 1C
INCrement Register E by 1: the Z FLAG when PDRIVE was not given (FFH).
53BE
If the Z FLAG is set (no PDRIVE), JUMP to 53C4H for WPROT.
53C0
DEC E 1D
DECrement Register E by 1, back to the value of PDRIVE.
53C1
LD (IY+0AH),E FD 73 0A
Store Register E, the physical drive, into DCT+0AH at Index Register IY+0AH.
53C4
LD DE,0000H 11 00 00
Load Register Pair DE with the value of WPROT, the operand 53C5H-53C6H (0000H in the file): 53H in Register E when it is not given.
53C7
LD A,E 7B
Load Register A with Register E, the low byte of WPROT.
53C8
CP 53H FE 53
Compare Register A against 53H, the mark of a switch that was not given.
53CA
If the Z FLAG is set (no WPROT), JUMP to 53D7H for COFFST.
53CC
OR A B7
OR Register A with itself: the Z FLAG for WPROT=N (00H).
53CD
RES 6,(IY+03H) FD CB 03 B6
Reset bit 6 of DCT+03H at Index Register IY+03H, the software write protect (RES does not change the flags).
53D1
If the Z FLAG is set (WPROT=N), JUMP to 53D7H with the bit cleared.
53D3
SET 6,(IY+03H) FD CB 03 F6
Set bit 6 of DCT+03H at Index Register IY+03H: the drive is write protected by the software.
53D7
LD DE,0000H 11 00 00
Load Register Pair DE with the value of COFFST, the operand 53D8H-53D9H (0000H in the file): FFFFH when it is not given.
53DA
LD A,D 7A
Load Register A with Register D, the high byte of COFFST.
53DB
AND E A3
AND Register A with Register E, the low byte: Register A = FFH only when COFFST is FFFFH.
53DC
INC A 3C
INCrement Register A by 1: the Z FLAG when COFFST was not given.
53DD
If the Z FLAG is set (no COFFST), JUMP to 53E5H for HOFFST.
53DF
LD (IY+06H),E FD 73 06
Store Register E, the low byte of the cylinder offset, into DCT+06H at Index Register IY+06H.
53E2
LD (IY+07H),D FD 72 07
Store Register D, the high byte of the cylinder offset, into DCT+07H at Index Register IY+07H.
53E5
LD DE,0000H 11 00 00
Load Register Pair DE with the value of HOFFST, the operand 53E6H-53E7H (0000H in the file): FFH in Register E when it is not given.
53E8
INC E 1C
INCrement Register E by 1: the Z FLAG when HOFFST was not given (FFH).
53E9
If the Z FLAG is set (no HOFFST), JUMP to 53EFH for TSIZE.
53EB
DEC E 1D
DECrement Register E by 1, back to the value of HOFFST.
53EC
LD (IY+05H),E FD 73 05
Store Register E, the head offset, into DCT+05H at Index Register IY+05H.
53EF
LD DE,0000H 11 00 00
Load Register Pair DE with the value of TSIZE, the operand 53F0H-53F1H (0000H in the file): FFH in Register E when it is not given.
53F2
INC E 1C
INCrement Register E by 1: the Z FLAG when TSIZE was not given (FFH).
53F3
If the Z FLAG is set (no TSIZE), JUMP to 53F9H for MDELAY.
53F5
DEC E 1D
DECrement Register E by 1, back to the value of TSIZE.
53F6
LD (IY+0DH),E FD 73 0D
Store Register E, the sectors per track, into DCT+0DH at Index Register IY+0DH.
53F9
LD DE,0000H 11 00 00
Load Register Pair DE with the value of MDELAY, the operand 53FAH-53FBH (0000H in the file): 53H in Register E when it is not given.
53FC
LD A,E 7B
Load Register A with Register E, the low byte of MDELAY.
53FD
CP 53H FE 53
Compare Register A against 53H, the mark of a switch that was not given.
53FF
If the Z FLAG is set (no MDELAY), JUMP to 540CH for HLOAD.
5401
OR A B7
OR Register A with itself: the Z FLAG for MDELAY=N (00H).
5402
RES 4,(IY+03H) FD CB 03 A6
Reset bit 4 of DCT+03H at Index Register IY+03H, the motor delay (RES does not change the flags).
5406
If the Z FLAG is set (MDELAY=N), JUMP to 540CH with the bit cleared.
5408
SET 4,(IY+03H) FD CB 03 E6
Set bit 4 of DCT+03H at Index Register IY+03H: a delay after the motor is turned on.
540C
LD DE,0000H 11 00 00
Load Register Pair DE with the value of HLOAD, the operand 540DH-540EH (0000H in the file): 53H in Register E when it is not given.
540F
LD A,E 7B
Load Register A with Register E, the low byte of HLOAD.
5410
CP 53H FE 53
Compare Register A against 53H, the mark of a switch that was not given.
5412
If the Z FLAG is set (no HLOAD), JUMP to 541FH for SKIP.
5414
OR A B7
OR Register A with itself: the Z FLAG for HLOAD=N (00H).
5415
RES 3,(IY+03H) FD CB 03 9E
Reset bit 3 of DCT+03H at Index Register IY+03H, the head load delay (RES does not change the flags).
5419
If the Z FLAG is set (HLOAD=N), JUMP to 541FH with the bit cleared.
541B
SET 3,(IY+03H) FD CB 03 DE
Set bit 3 of DCT+03H at Index Register IY+03H: a delay after the head is loaded.
541F
LD DE,0000H 11 00 00
Load Register Pair DE with the value of SKIP, the operand 5420H-5421H (0000H in the file): 53H in Register E when it is not given.
5422
LD A,E 7B
Load Register A with Register E, the low byte of SKIP.
5423
CP 53H FE 53
Compare Register A against 53H, the mark of a switch that was not given.
5425
RET Z C8
If the Z FLAG is set (no SKIP), RETurn to the overlay request handler: CONFIG is done.
5426
OR A B7
OR Register A with itself: the Z FLAG for SKIP=N (00H).
5427
RES 2,(IY+03H) FD CB 03 96
Reset bit 2 of DCT+03H at Index Register IY+03H, the double step (RES does not change the flags).
542B
RET Z C8
If the Z FLAG is set (SKIP=N), RETurn to the overlay request handler with the bit cleared.
542C
SET 2,(IY+03H) FD CB 03 D6
Set bit 2 of DCT+03H at Index Register IY+03H: the drive steps twice for each cylinder.
5430
RET C9
RETurn to the overlay request handler: CONFIG is done.

5431H - CONFIG's Texts

Data: the words of the description of a drive (527FH), each ended by 03H for DSPLY@ (NIL by a carriage return, which ends the line).

5431-5433
DEFM "NIL" 4E 49 4C
The description of a drive with the NIL bit set (5291H).
5434
DEFB 0DH 0D
The carriage return that ends the text NIL and the line of the drive.
5435-5438
DEFM "Hard" 48 61 72 64
The first word for a rigid drive (529EH), when bit 5 of DCT+03H is set.
5439
DEFB 03H 03
The byte that ends the text Hard for DSPLY@, which shows the text up to it.
543A-543D
DEFM ",Fix" 2C 46 69 78
The word for a rigid drive that is not removable (52A8H).
543E
DEFB 03H 03
The byte that ends the text ,Fix for DSPLY@, which shows the text up to it.
543F-5442
DEFM ",Rem" 2C 52 65 6D
The word for a removable rigid drive (52ADH).
5443
DEFB 03H 03
The byte that ends the text ,Rem for DSPLY@, which shows the text up to it.
5444-5449
DEFM "Floppy" 46 6C 6F 70 70 79
The first word for a floppy drive (52B5H), when bit 5 of DCT+03H is clear.
544A
DEFB 03H 03
The byte that ends the text Floppy for DSPLY@, which shows the text up to it.
544B-544F
DEFM ",Sden" 2C 53 64 65 6E
The word for a floppy drive in single density (52BFH).
5450
DEFB 03H 03
The byte that ends the text ,Sden for DSPLY@, which shows the text up to it.
5451-5455
DEFM ",Dden" 2C 44 64 65 6E
The word for a floppy drive in double density (52C4H).
5456
DEFB 03H 03
The byte that ends the text ,Dden for DSPLY@, which shows the text up to it.
5457-545C
DEFM ",Size=" 2C 53 69 7A 65 3D
The word before the size of the drive, 5 or 8 (52CAH).
545D
DEFB 03H 03
The byte that ends the text ,Size= for DSPLY@, which shows the text up to it.
545E-5464
DEFM ",Sides=" 2C 53 69 64 65 73 3D
The word before the number of surfaces (52DDH).
5465
DEFB 03H 03
The byte that ends the text ,Sides= for DSPLY@, which shows the text up to it.
5466-546B
DEFM ",Step=" 2C 53 74 65 70 3D
The word before the step rate code of the drive (52E9H).
546C
DEFB 03H 03
The byte that ends the text ,Step= for DSPLY@, which shows the text up to it.
546D-5470
DEFM ",PD=" 2C 50 44 3D
The word before the physical drive number of the drive (52F5H).
5471
DEFB 03H 03
The byte that ends the text ,PD= for DSPLY@, which shows the text up to it.
5472-5474
DEFM ",WP" 2C 57 50
The word for a drive write protected by the software (5307H, 535CH).
5475
DEFB 03H 03
The byte that ends the text ,WP for DSPLY@, which shows the text up to it.
5476-5478
DEFM ",MD" 2C 4D 44
The word for a floppy drive with the motor delay (5311H).
5479
DEFB 03H 03
The byte that ends the text ,MD for DSPLY@, which shows the text up to it.
547A-547C
DEFM ",HL" 2C 48 4C
The word for a floppy drive with the head load delay (531BH).
547D
DEFB 03H 03
The byte that ends the text ,HL for DSPLY@, which shows the text up to it.
547E-5482
DEFM ",Skip" 2C 53 6B 69 70
The word for a floppy drive that steps twice for each cylinder (5325H).
5483
DEFB 03H 03
The byte that ends the text ,Skip for DSPLY@, which shows the text up to it.
5484-5487
DEFM ",CO=" 2C 43 4F 3D
The word before the cylinder offset of a rigid drive (5335H).
5488
DEFB 03H 03
The byte that ends the text ,CO= for DSPLY@, which shows the text up to it.
5489-548C
DEFM ",HO=" 2C 48 4F 3D
The word before the head offset of a rigid drive (5344H).
548D
DEFB 03H 03
The byte that ends the text ,HO= for DSPLY@, which shows the text up to it.
548E-5491
DEFM ",TS=" 2C 54 53 3D
The word before the sectors per track of a rigid drive (5350H).
5492
DEFB 03H 03
The byte that ends the text ,TS= for DSPLY@, which shows the text up to it.

5493H - CONFIG's Evaluation Block

Data: the block that Index Register IX points to for EVAL@ (5230H): EVAL@'s flags, the three field blocks, all 58A7H, and the parameter table. Each entry is the name (6 characters), the address its value is stored to (the operands of 536CH) and a type byte (20H a switch, 40H a number). EVAL@ takes the first entry whose name starts with what is typed, so S picks SIDES, the first name that starts with S, and not STEP as the manual says.

5493
DEFB 00H 00
The flags of CONFIG's evaluation block, set by EVAL@: bits 0-2 the fields, bit 3 the parameters.
5494-5495
DEFW 58A7H A7 58
The address of the source block, 58A7H: the flag byte, then the drive.
5496-5497
DEFW 58A7H A7 58
The address of the destination block: 58A7H again, so any field goes to the one block.
5498-5499
DEFW 58A7H A7 58
The address of the wildmask block: 58A7H again, so any field goes to the one block.
549A-549B
DEFW 549CH 9C 54
The address of CONFIG's parameter table at 549CH.
549C-54A1
DEFM "SIDES " 53 49 44 45 53 20
The name SIDES: the number of surfaces of the drive, DCT+0CH.
54A2-54A3
DEFW 538AH 8A 53
SIDES's value goes to 538AH-538BH, the operand of LD DE,0000H at 5389H.
54A4
DEFB 40H 40
The type byte of SIDES: 40H, bit 6, a number, the count of surfaces.
54A5-54AA
DEFM "SIZE " 53 49 5A 45 20 20
The name SIZE: 5 or 8, the size of the drive, bit 7 of DCT+03H.
54AB-54AC
DEFW 5397H 97 53
SIZE's value goes to 5397H-5398H, the operand of LD DE,0000H at 5396H.
54AD
DEFB 40H 40
The type byte of SIZE: 40H, bit 6, a number, 5 or 8.
54AE-54B3
DEFM "STEP " 53 54 45 50 20 20
The name STEP: the step rate code of the drive, DCT+04H.
54B4-54B5
DEFW 53B1H B1 53
STEP's value goes to 53B1H-53B2H, the operand of LD DE,0000H at 53B0H.
54B6
DEFB 40H 40
The type byte of STEP: 40H, bit 6, a number, the step rate code.
54B7-54BC
DEFM "PDRIVE" 50 44 52 49 56 45
The name PDRIVE: the physical drive the drive name uses, DCT+0AH.
54BD-54BE
DEFW 53BBH BB 53
PDRIVE's value goes to 53BBH-53BCH, the operand of LD DE,0000H at 53BAH.
54BF
DEFB 40H 40
The type byte of PDRIVE: 40H, bit 6, a number, the physical drive.
54C0-54C5
DEFM "COFFST" 43 4F 46 46 53 54
The name COFFST: the cylinder offset of a rigid drive, DCT+06H-07H.
54C6-54C7
DEFW 53D8H D8 53
COFFST's value goes to 53D8H-53D9H, the operand of LD DE,0000H at 53D7H.
54C8
DEFB 40H 40
The type byte of COFFST: 40H, bit 6, a number, the cylinder offset.
54C9-54CE
DEFM "HOFFST" 48 4F 46 46 53 54
The name HOFFST: the head offset of a rigid drive, DCT+05H.
54CF-54D0
DEFW 53E6H E6 53
HOFFST's value goes to 53E6H-53E7H, the operand of LD DE,0000H at 53E5H.
54D1
DEFB 40H 40
The type byte of HOFFST: 40H, bit 6, a number, the head offset.
54D2-54D7
DEFM "TSIZE " 54 53 49 5A 45 20
The name TSIZE: the sectors per track of the drive, DCT+0DH.
54D8-54D9
DEFW 53F0H F0 53
TSIZE's value goes to 53F0H-53F1H, the operand of LD DE,0000H at 53EFH.
54DA
DEFB 40H 40
The type byte of TSIZE: 40H, bit 6, a number, the sectors per track.
54DB-54E0
DEFM "WPROT " 57 50 52 4F 54 20
The name WPROT: the software write protect, bit 6 of DCT+03H.
54E1-54E2
DEFW 53C5H C5 53
WPROT's value goes to 53C5H-53C6H, the operand of LD DE,0000H at 53C4H.
54E3
DEFB 20H 20
The type byte of WPROT: 20H, bit 5, a switch, so the name alone sets it.
54E4-54E9
DEFM "MDELAY" 4D 44 45 4C 41 59
The name MDELAY: the delay after the motor is turned on, bit 4 of DCT+03H.
54EA-54EB
DEFW 53FAH FA 53
MDELAY's value goes to 53FAH-53FBH, the operand of LD DE,0000H at 53F9H.
54EC
DEFB 20H 20
The type byte of MDELAY: 20H, bit 5, a switch, so the name alone sets it.
54ED-54F2
DEFM "HLOAD " 48 4C 4F 41 44 20
The name HLOAD: the delay after the head is loaded, bit 3 of DCT+03H.
54F3-54F4
DEFW 540DH 0D 54
HLOAD's value goes to 540DH-540EH, the operand of LD DE,0000H at 540CH.
54F5
DEFB 20H 20
The type byte of HLOAD: 20H, bit 5, a switch, so the name alone sets it.
54F6-54FB
DEFM "SKIP " 53 4B 49 50 20 20
The name SKIP: the double step, bit 2 of DCT+03H.
54FC-54FD
DEFW 5420H 20 54
SKIP's value goes to 5420H-5421H, the operand of LD DE,0000H at 541FH.
54FE
DEFB 20H 20
The type byte of SKIP: 20H, bit 5, a switch, so the name alone sets it.
54FF
DEFB 00H 00
The end of CONFIG's parameter table: a 00H in place of the next name.

5500H - SYSTEM

Routine 4, entered from CMNDI@ through the overlay request handler with Register Pair HL at the rest of the command line. The switches TIME, DATE, LOGO, BLINK and CAPS start as 53H (not given), SAVE, the low bytes of CURSOR and HIGH$ and the write flag 5640H as 00H, the high bytes of STEP, PORT and MODE as FFH (table 57BAH). EVAL@ takes the field and the parameters with the block at 57B1H. Without a field and without parameters the memory pointers LOW$, HIGH$ and TOP$ are shown in hexadecimal (5539H). Otherwise the options are set (5563H), and a field names the configuration file to write (5654H).

5500
LD A,53H 3E 53
Load Register A with 53H, the mark of a switch that was not given.
5502
LD (55C6H),A 32 C6 55
Store Register A (53H) into 55C6H, the operand of LD DE,0000H at 55C5H, the value of TIME.
5505
LD (55B7H),A 32 B7 55
Store Register A (53H) into 55B7H, the operand of LD DE,0000H at 55B6H, the value of DATE.
5508
LD (55A8H),A 32 A8 55
Store Register A (53H) into 55A8H, the operand of LD DE,0000H at 55A7H, the value of LOGO.
550B
LD (55F3H),A 32 F3 55
Store Register A (53H) into 55F3H, the operand of LD DE,0000H at 55F2H, the value of BLINK.
550E
LD (55FFH),A 32 FF 55
Store Register A (53H) into 55FFH, the operand of LD DE,0000H at 55FEH, the value of CAPS.
5511
XOR A AF
Set Register A to 00H by XORing it with itself, the value of SAVE, CURSOR and HIGH$ not given.
5512
LD (5627H),A 32 27 56
Store Register A (00H) into 5627H, the operand of LD DE,0000H at 5626H, the value of SAVE.
5515
LD (5640H),A 32 40 56
Store Register A (00H) into 5640H, the operand of LD A,00H at 563FH, the flag that the boot sector is to be written.
5518
LD (560AH),A 32 0A 56
Store Register A (00H) into 560AH, the low byte of the operand of LD DE,FFFFH at 5609H, the value of CURSOR.
551B
LD (5614H),A 32 14 56
Store Register A (00H) into 5614H, the low byte of the operand of LD DE,0000H at 5613H, the value of HIGH$.
551E
DEC A 3D
DECrement Register A by 1: FFH, the high byte that marks STEP, PORT and MODE as not given.
551F
LD (55D6H),A 32 D6 55
Store Register A (FFH) into 55D6H, the high byte of the operand of LD DE,0000H at 55D4H, the value of STEP.
5522
LD (55E0H),A 32 E0 55
Store Register A (FFH) into 55E0H, the high byte of the operand of LD DE,0000H at 55DEH, the value of PORT.
5525
LD (55EAH),A 32 EA 55
Store Register A (FFH) into 55EAH, the high byte of the operand of LD DE,0000H at 55E8H, the value of MODE.
5528
LD IX,57B1H DD 21 B1 57
Point Index Register IX to 57B1H, SYSTEM's evaluation block: the field block 58A7H and the parameter table 57BAH.
552C
GOSUB to 4479H, EVAL@, to take the fields and parameters from the command line at Register Pair HL: the NZ FLAG on an error.
552F
If the NZ FLAG is set (EVAL@ failed), JUMP to 58A2H to post the error in Register A.
5532
LD A,(IX+00H) DD 7E 00
Load Register A with the flags of the evaluation block at Index Register IX+00H: bits 0-2 the fields, bit 3 the parameters.
5535
AND 0FH E6 0F
AND Register A with 0FH, bits 0-3: the Z FLAG when neither a field nor a parameter was given.
5537
If the NZ FLAG is set (something given), JUMP to 5563H to set the options.
5539
LD HL,5799H 21 99 57
Point Register Pair HL to 5799H, the text LOW$=.
553C
GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL.
553F
LD HL,(42A7H) 2A A7 42
Load Register Pair HL with LOW$, the bottom of free memory, from 42A7H-42A8H.
5542
GOSUB to 5876H to show Register Pair HL as four hexadecimal digits and an H.
5545
LD HL,579FH 21 9F 57
Point Register Pair HL to 579FH, the text ,HIGH$=.
5548
GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL.
554B
LD HL,(4411H) 2A 11 44
Load Register Pair HL with HIGH$, the top of memory for programs, from 4411H-4412H.
554E
GOSUB to 5876H to show Register Pair HL as four hexadecimal digits and an H.
5551
LD HL,57A7H 21 A7 57
Point Register Pair HL to 57A7H, the text ,TOP$=.
5554
GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL.
5557
LD HL,(42A5H) 2A A5 42
Load Register Pair HL with TOP$, the top of the memory, from 42A5H-42A6H.
555A
GOSUB to 5876H to show Register Pair HL as four hexadecimal digits and an H.
555D
LD A,0DH 3E 0D
Load Register A with 0DH, the carriage return that ends the line.
555F
GOSUB to 0033H, the ROM's routine that shows the character in Register A on the display.
5562
RET C9
RETurn to the overlay request handler: SYSTEM has shown the memory pointers.

5563H - Setting the Options

When DATE, TIME, LOGO, STEP, PORT, MODE or SAVE is given, sector 2 of cylinder 0 of drive 0, the boot sector with the system's options, is read into 4300H and the flag 5640H is set so that it is written back (563FH). DATE, TIME and LOGO set or clear bits 2, 3 and 1 of its +10H, the boot flags; STEP, PORT and MODE go to its +16H, +17H and +18H. BLINK (the complement of its value) goes to 401CH, CAPS to 4019H, CURSOR (not 0) to 4023H, and HIGH$ (0100H or more) to HIGH$ at 4411H, which must stay above 5BFFH (error 2DH). These four take effect at once; SAVE copies the first three into the boot sector's +13H-+15H. HIGH$ is never saved.

5563
LD A,(55B7H) 3A B7 55
Load Register A with the value of DATE from 55B7H: 53H when it is not given.
5566
CP 53H FE 53
Compare Register A against 53H, the mark of a switch that was not given.
5568
If the NZ FLAG is set (DATE given), JUMP to 5590H to read the boot sector.
556A
LD A,(55C6H) 3A C6 55
Load Register A with the value of TIME from 55C6H: 53H when it is not given.
556D
CP 53H FE 53
Compare Register A against 53H, the mark of a switch that was not given.
556F
If the NZ FLAG is set (TIME given), JUMP to 5590H to read the boot sector.
5571
LD A,(55A8H) 3A A8 55
Load Register A with the value of LOGO from 55A8H: 53H when it is not given.
5574
CP 53H FE 53
Compare Register A against 53H, the mark of a switch that was not given.
5576
If the NZ FLAG is set (LOGO given), JUMP to 5590H to read the boot sector.
5578
LD A,(55D6H) 3A D6 55
Load Register A with the high byte of STEP's value from 55D6H: FFH when it is not given.
557B
INC A 3C
INCrement Register A by 1: the NZ FLAG when STEP was given.
557C
If the NZ FLAG is set (STEP given), JUMP to 5590H to read the boot sector.
557E
LD A,(55E0H) 3A E0 55
Load Register A with the high byte of PORT's value from 55E0H: FFH when it is not given.
5581
INC A 3C
INCrement Register A by 1: the NZ FLAG when PORT was given.
5582
If the NZ FLAG is set (PORT given), JUMP to 5590H to read the boot sector.
5584
LD A,(55EAH) 3A EA 55
Load Register A with the high byte of MODE's value from 55EAH: FFH when it is not given.
5587
INC A 3C
INCrement Register A by 1: the NZ FLAG when MODE was given.
5588
If the NZ FLAG is set (MODE given), JUMP to 5590H to read the boot sector.
558A
LD A,(5627H) 3A 27 56
Load Register A with the value of SAVE from 5627H: 00H when it is not given.
558D
OR A B7
OR Register A with itself: the NZ FLAG when SAVE was given.
558E
If the Z FLAG is set (no option of the boot sector), JUMP to 55DEH, past the boot sector's options, for BLINK, CAPS, CURSOR and HIGH$.
5590
LD A,FFH 3E FF
Load Register A with FFH, the mark that the boot sector is to be written back.
5592
LD (5640H),A 32 40 56
Store Register A (FFH) into 5640H, the operand of LD A,00H at 563FH.
5595
LD DE,0002H 11 02 00
Load Register Pair DE with 0002H: Register D cylinder 0, Register E sector 2, the boot sector with the options.
5598
LD HL,4300H 21 00 43
Point Register Pair HL to 4300H, the buffer for the boot sector.
559B
LD C,00H 0E 00
Load Register C with 00H, drive 0, the system drive.
559D
LD A,03H 3E 03
Load Register A with 03H, the DISKIO% function DREAD, which reads a sector into the buffer.
559F
GOSUB to 4488H, DISKIO%, function 3 DREAD, to read sector Register E of cylinder Register D of drive Register C to 4300H.
55A2
If the NZ FLAG is set (the read failed), JUMP to 58A2H to post the error in Register A.
55A5
LD L,10H 2E 10
Load Register L with 10H: Register Pair HL = 4310H, the boot flags of the boot sector.
55A7
LD DE,0000H 11 00 00
Load Register Pair DE with the value of LOGO, the operand 55A8H-55A9H (0000H in the file): 53H in Register E when it is not given.
55AA
LD A,E 7B
Load Register A with Register E, the low byte of LOGO.
55AB
CP 53H FE 53
Compare Register A against 53H, the mark of a switch that was not given.
55AD
If the Z FLAG is set (no LOGO), JUMP to 55B6H for DATE.
55AF
OR A B7
OR Register A with itself: the Z FLAG for LOGO=N (00H).
55B0
RES 1,(HL) CB 8E
Reset bit 1 of the boot flags at Register Pair HL, the logo (RES does not change the flags).
55B2
If the Z FLAG is set (LOGO=N), JUMP to 55B6H with the bit cleared.
55B4
SET 1,(HL) CB CE
Set bit 1 of the boot flags at Register Pair HL: the logo is shown at boot.
55B6
LD DE,0000H 11 00 00
Load Register Pair DE with the value of DATE, the operand 55B7H-55B8H (0000H in the file): 53H in Register E when it is not given.
55B9
LD A,E 7B
Load Register A with Register E, the low byte of DATE.
55BA
CP 53H FE 53
Compare Register A against 53H, the mark of a switch that was not given.
55BC
If the Z FLAG is set (no DATE), JUMP to 55C5H for TIME.
55BE
OR A B7
OR Register A with itself: the Z FLAG for DATE=N (00H).
55BF
RES 2,(HL) CB 96
Reset bit 2 of the boot flags at Register Pair HL, the date prompt (RES does not change the flags).
55C1
If the Z FLAG is set (DATE=N), JUMP to 55C5H with the bit cleared.
55C3
SET 2,(HL) CB D6
Set bit 2 of the boot flags at Register Pair HL: the date is asked for at boot.
55C5
LD DE,0000H 11 00 00
Load Register Pair DE with the value of TIME, the operand 55C6H-55C7H (0000H in the file): 53H in Register E when it is not given.
55C8
LD A,E 7B
Load Register A with Register E, the low byte of TIME.
55C9
CP 53H FE 53
Compare Register A against 53H, the mark of a switch that was not given.
55CB
If the Z FLAG is set (no TIME), JUMP to 55D4H for STEP.
55CD
OR A B7
OR Register A with itself: the Z FLAG for TIME=N (00H).
55CE
RES 3,(HL) CB 9E
Reset bit 3 of the boot flags at Register Pair HL, the time prompt (RES does not change the flags).
55D0
If the Z FLAG is set (TIME=N), JUMP to 55D4H with the bit cleared.
55D2
SET 3,(HL) CB DE
Set bit 3 of the boot flags at Register Pair HL: the time is asked for at boot.
55D4
LD DE,0000H 11 00 00
Load Register Pair DE with the value of STEP, the operand 55D5H-55D6H (0000H in the file): FFH in Register D when it is not given.
55D7
INC D 14
INCrement Register D by 1: the Z FLAG when STEP was not given.
55D8
If the Z FLAG is set (no STEP), JUMP to 55DEH for PORT.
55DA
LD A,E 7B
Load Register A with Register E, the low byte of STEP, the default step rate.
55DB
LD (4316H),A 32 16 43
Store Register A, the default step rate, into 4316H, +16H of the boot sector.
55DE
LD DE,0000H 11 00 00
Load Register Pair DE with the value of PORT, the operand 55DFH-55E0H (0000H in the file): FFH in Register D when it is not given.
55E1
INC D 14
INCrement Register D by 1: the Z FLAG when PORT was not given.
55E2
If the Z FLAG is set (no PORT), JUMP to 55E8H for MODE.
55E4
LD A,E 7B
Load Register A with Register E, the low byte of PORT, the port to output to at boot.
55E5
LD (4317H),A 32 17 43
Store Register A, the port, into 4317H, +17H of the boot sector.
55E8
LD DE,0000H 11 00 00
Load Register Pair DE with the value of MODE, the operand 55E9H-55EAH (0000H in the file): FFH in Register D when it is not given.
55EB
INC D 14
INCrement Register D by 1: the Z FLAG when MODE was not given.
55EC
If the Z FLAG is set (no MODE), JUMP to 55F2H for BLINK.
55EE
LD A,E 7B
Load Register A with Register E, the low byte of MODE, the value to output at boot.
55EF
LD (4318H),A 32 18 43
Store Register A, the value for the port, into 4318H, +18H of the boot sector.
55F2
LD DE,0000H 11 00 00
Load Register Pair DE with the value of BLINK, the operand 55F3H-55F4H (0000H in the file): 53H in Register E when it is not given.
55F5
LD A,E 7B
Load Register A with Register E, the low byte of BLINK.
55F6
CP 53H FE 53
Compare Register A against 53H, the mark of a switch that was not given.
55F8
If the Z FLAG is set (no BLINK), JUMP to 55FEH for CAPS.
55FA
CPL 2F
Complement Register A: BLINK=Y (FFH) gives 00H, BLINK=N (00H) gives FFH.
55FB
LD (401CH),A 32 1C 40
Store Register A, the complement of BLINK, into 401CH, the cursor blink switch.
55FE
LD DE,0000H 11 00 00
Load Register Pair DE with the value of CAPS, the operand 55FFH-5600H (0000H in the file): 53H in Register E when it is not given.
5601
LD A,E 7B
Load Register A with Register E, the low byte of CAPS.
5602
CP 53H FE 53
Compare Register A against 53H, the mark of a switch that was not given.
5604
If the Z FLAG is set (no CAPS), JUMP to 5609H for CURSOR.
5606
LD (4019H),A 32 19 40
Store Register A, the value of CAPS, into 4019H, the caps switch of the keyboard.
5609
LD DE,FFFFH 11 FF FF
Load Register Pair DE with the value of CURSOR, the operand 560AH-560BH (FFFFH in the file): 00H in Register E when it is not given.
560C
LD A,E 7B
Load Register A with Register E, the low byte of CURSOR, the cursor character.
560D
OR A B7
OR Register A with itself: the Z FLAG for 00H, CURSOR not given (or given as 0).
560E
If the Z FLAG is set (no CURSOR), JUMP to 5613H for HIGH$.
5610
LD (4023H),A 32 23 40
Store Register A, the cursor character, into 4023H.
5613
LD DE,0000H 11 00 00
Load Register Pair DE with the value of HIGH$, the operand 5614H-5615H (0000H in the file): 00H in Register E when it is not given.
5616
LD A,D 7A
Load Register A with Register D, the high byte of HIGH$.
5617
OR A B7
OR Register A with itself, which also clears the C FLAG: the Z FLAG when HIGH$ is below 0100H.
5618
If the Z FLAG is set (no HIGH$), JUMP to 5626H for SAVE.
561A
LD HL,5BFFH 21 FF 5B
Load Register Pair HL with 5BFFH, the highest address HIGH$ may not be.
561D
SBC HL,DE ED 52
Subtract Register Pair DE (HIGH$) from Register Pair HL (5BFFH): the NC FLAG when HIGH$ is 5BFFH or below.
561F
If the NC FLAG is set (HIGH$ too low), JUMP to 5897H to post error 2DH, Invalid data provided.
5622
LD (4411H),DE ED 53 11 44
Store Register Pair DE, the new top of memory, into HIGH$ at 4411H-4412H (it is not checked against TOP$).
5626
LD DE,0000H 11 00 00
Load Register Pair DE with the value of SAVE, the operand 5627H-5628H (0000H in the file): 00H in Register E when it is not given.
5629
INC E 1C
INCrement Register E by 1, so that the DEC E below tests the low byte of SAVE.
562A
DEC E 1D
DECrement Register E by 1: the Z FLAG when SAVE is not given, or N.
562B
If the Z FLAG is set (no SAVE), JUMP to 563FH to write the boot sector if needed.
562D
LD A,(401CH) 3A 1C 40
Load Register A with the cursor blink switch from 401CH.
5630
LD (4313H),A 32 13 43
Store Register A, the cursor blink switch, into 4313H, +13H of the boot sector.
5633
LD A,(4023H) 3A 23 40
Load Register A with the cursor character from 4023H.
5636
LD (4314H),A 32 14 43
Store Register A, the cursor character, into 4314H, +14H of the boot sector.
5639
LD A,(4019H) 3A 19 40
Load Register A with the caps switch from 4019H.
563C
LD (4315H),A 32 15 43
Store Register A, the caps switch, into 4315H, +15H of the boot sector.
563F
LD A,00H 3E 00
Load Register A with the write flag, 00H as assembled, FFH when the boot sector was read (5592H).
5641
OR A B7
OR Register A with itself: the Z FLAG when the boot sector is not to be written.
5642
If the Z FLAG is set (nothing to write), JUMP to 5654H for the field.
5644
LD DE,0002H 11 02 00
Load Register Pair DE with 0002H: Register D cylinder 0, Register E sector 2, the boot sector.
5647
LD HL,4300H 21 00 43
Point Register Pair HL to 4300H, the boot sector with its changed options.
564A
LD C,00H 0E 00
Load Register C with 00H, drive 0, the system drive.
564C
LD A,05H 3E 05
Load Register A with 05H, the DISKIO% function DWRITE, which writes the buffer to a sector.
564E
GOSUB to 4488H, DISKIO%, function 5 DWRITE, to write 4300H to sector Register E of cylinder Register D of drive Register C.
5651
If the NZ FLAG is set (the write failed), JUMP to 58A2H to post the error in Register A.

5654H - The Configuration File

With a field SYSTEM writes a configuration file: the field must have a name (else error 2CH), which gets the default extension CFG, and INIT@ opens it with the buffer 5900H. The image is built from 5A00H: the 126 bytes of the loader (571BH, which runs at 5200H), then the system areas listed at 577BH, then the memory from HIGH$ + 1 to TOP$ (the drivers and filters above HIGH$). The image is written as a load module whose blocks load at their image address less 0800H (5A00H becomes 5200H), up to 254 bytes each, and a transfer record to 5200H ends it; CLOSE@ closes the file. Run as a program, the file restores the system's state as it was when it was saved.

5654
LD A,(IX+00H) DD 7E 00
Load Register A with the flags of the evaluation block at Index Register IX+00H: bits 0-2 the fields given.
5657
AND 07H E6 07
AND Register A with 07H, bits 0-2: the Z FLAG when no field was given.
5659
RET Z C8
If the Z FLAG is set (no field), RETurn to the overlay request handler: SYSTEM is done.
565A
LD A,(58A7H) 3A A7 58
Load Register A with the flag byte of the field block at 58A7H.
565D
BIT 6,A CB 77
Test bit 6 of Register A, the flag byte: set when the field has a name.
565F
If the Z FLAG is set (no name), JUMP to 589DH to post error 2CH, Illegal filespec.
5662
LD HL,57AEH 21 AE 57
Point Register Pair HL to 57AEH, the default extension CFG.
5665
LD DE,58A8H 11 A8 58
Point Register Pair DE to 58A8H, the file control block of the field.
5668
GOSUB to 444BH, FEXT@, to add the extension at Register Pair HL to the specification at Register Pair DE when it has none.
566B
LD B,00H 06 00
Load Register B with 00H, the record length 256 for INIT@.
566D
LD HL,5900H 21 00 59
Point Register Pair HL to 5900H, the buffer of the file's sectors.
5670
GOSUB to 4420H, INIT@, to open the file at Register Pair DE with the buffer at Register Pair HL and the record length in Register B, creating it when needed: the NZ FLAG on an error.
5673
If the NZ FLAG is set (INIT@ failed), JUMP to 58A2H to post the error in Register A.
5676
LD HL,571BH 21 1B 57
Point Register Pair HL to 571BH, the loader of the configuration file.
5679
LD BC,007EH 01 7E 00
Load Register Pair BC with 007EH, the 126 bytes of the loader.
567C
LD DE,5A00H 11 00 5A
Point Register Pair DE to 5A00H, the start of the image of the file.
567F
LDIR ED B0
Copy the loader from Register Pair HL to Register Pair DE (5A00H) by LDIR. Register Pair BC counts down.
5681
LD IX,577BH DD 21 7B 57
Point Index Register IX to 577BH, the table of the system areas to save: an address and a length each.
5685
LD L,(IX+00H) DD 6E 00
Load Register L with the low byte of the area's address at Index Register IX+00H.
5688
LD H,(IX+01H) DD 66 01
Load Register H with the high byte of the area's address at Index Register IX+01H.
568B
INC H 24
INCrement Register H by 1, so that the DEC H below tests the high byte of the address.
568C
DEC H 25
DECrement Register H by 1: the Z FLAG when the high byte is 00H, the end of the table.
568D
If the Z FLAG is set (the end of the table), JUMP to 56A0H for the high memory.
568F
LD C,(IX+02H) DD 4E 02
Load Register C with the low byte of the area's length at Index Register IX+02H.
5692
LD B,(IX+03H) DD 46 03
Load Register B with the high byte of the area's length at Index Register IX+03H.
5695
LDIR ED B0
Copy the area from Register Pair HL to the image at Register Pair DE by LDIR. Register Pair BC counts down.
5697
EX DE,HL EB
EXchange Register Pair DE and Register Pair HL, to keep the image's next address in Register Pair HL.
5698
LD DE,0004H 11 04 00
Load Register Pair DE with 0004H, the length of an entry of the table.
569B
ADD IX,DE DD 19
ADD Register Pair DE to Index Register IX, to the next entry of the table.
569D
EX DE,HL EB
EXchange Register Pair DE and Register Pair HL: Register Pair DE = the image's next address again.
569E
JUMP back to 5685H for the next area of the table.
56A0
PUSH DE D5
Save Register Pair DE, the image's next address, to the top of the stack.
56A1
LD HL,(42A5H) 2A A5 42
Load Register Pair HL with TOP$, the top of the memory, from 42A5H-42A6H.
56A4
LD DE,(4411H) ED 5B 11 44
Load Register Pair DE with HIGH$, the top of memory for programs, from 4411H-4412H.
56A8
SBC HL,DE ED 52
Subtract Register Pair DE (HIGH$) from Register Pair HL (TOP$): the bytes above HIGH$, the Z FLAG when there are none.
56AA
LD B,H 44
Load Register B with Register H, the high byte of the count.
56AB
LD C,L 4D
Load Register C with Register L: Register Pair BC = the bytes above HIGH$.
56AC
EX DE,HL EB
EXchange Register Pair DE and Register Pair HL: Register Pair HL = HIGH$.
56AD
INC HL 23
INCrement Register Pair HL by 1, to the first byte above HIGH$ (INC does not change the flags).
56AE
POP DE D1
Restore Register Pair DE, the image's next address, from the top of the stack.
56AF
If the Z FLAG is set (nothing above HIGH$), JUMP to 56B3H.
56B1
LDIR ED B0
Copy the memory above HIGH$ from Register Pair HL to the image at Register Pair DE by LDIR. Register Pair BC counts down.
56B3
LD HL,5A00H 21 00 5A
Point Register Pair HL to 5A00H, the start of the image to write.
56B6
PUSH HL E5
Save Register Pair HL, the next byte of the image to write, to the top of the stack.
56B7
PUSH DE D5
Save Register Pair DE, the end of the image, to the top of the stack.
56B8
EX DE,HL EB
EXchange Register Pair DE and Register Pair HL: Register Pair HL = the end, Register Pair DE = the next byte.
56B9
OR A B7
OR Register A with itself to clear the C FLAG for the SBC below.
56BA
SBC HL,DE ED 52
Subtract Register Pair DE from Register Pair HL: the bytes of the image still to write, the Z FLAG when none are left.
56BC
POP DE D1
Restore Register Pair DE, the end of the image, from the top of the stack.
56BD
If the Z FLAG is set (the image is written), JUMP to 56F0H for the transfer record.
56BF
LD B,FEH 06 FE
Load Register B with FEH, the 254 bytes of a full load block.
56C1
INC H 24
INCrement Register H by 1, so that the DEC H below tests the high byte of the count.
56C2
DEC H 25
DECrement Register H by 1: the NZ FLAG when 256 bytes or more are left.
56C3
If the NZ FLAG is set (256 or more), JUMP to 56CBH with a full block.
56C5
LD A,L 7D
Load Register A with Register L, the low byte of the count, the bytes left.
56C6
CP FFH FE FF
Compare Register A against FFH: the NC FLAG when 255 bytes are left.
56C8
If the NC FLAG is set (255 left), JUMP to 56CBH with a full block.
56CA
LD B,L 45
Load Register B with Register L, the bytes left, for the last block.
56CB
POP HL E1
Restore Register Pair HL, the next byte of the image, from the top of the stack.
56CC
LD A,01H 3E 01
Load Register A with 01H, the record type of a load block.
56CE
GOSUB to 570FH to write the byte in Register A to the configuration file.
56D1
LD A,B 78
Load Register A with Register B, the bytes of the block.
56D2
ADD A,02H C6 02
ADD 02H, the two bytes of the address, to Register A: the length byte of the block.
56D4
GOSUB to 570FH to write the length byte in Register A to the configuration file.
56D7
PUSH BC C5
Save Register Pair BC, the bytes of the block, to the top of the stack.
56D8
PUSH HL E5
Save Register Pair HL, the next byte of the image, to the top of the stack.
56D9
LD BC,F800H 01 00 F8
Load Register Pair BC with F800H, which takes 0800H off an address.
56DC
ADD HL,BC 09
ADD Register Pair BC to Register Pair HL: the load address of the block, its image address less 0800H.
56DD
LD A,L 7D
Load Register A with Register L, the low byte of the load address.
56DE
GOSUB to 570FH to write the byte in Register A to the configuration file.
56E1
LD A,H 7C
Load Register A with Register H, the high byte of the load address.
56E2
GOSUB to 570FH to write the byte in Register A to the configuration file.
56E5
POP HL E1
Restore Register Pair HL, the next byte of the image, from the top of the stack.
56E6
POP BC C1
Restore Register Pair BC, the bytes of the block, from the top of the stack.
56E7
LD A,(HL) 7E
Load Register A with the byte of the image at Register Pair HL.
56E8
INC HL 23
INCrement Register Pair HL by 1, to the next byte of the image.
56E9
GOSUB to 570FH to write the byte in Register A to the configuration file.
56EC
DECrement Register B and LOOP back to 56E7H until the bytes of the block are written.
56EE
JUMP back to 56B6H for the next block of the image.
56F0
POP HL E1
Restore Register Pair HL from the top of the stack, the address left there at 56B6H.
56F1
LD A,02H 3E 02
Load Register A with 02H, the record type of the transfer record.
56F3
GOSUB to 570FH to write the byte in Register A to the configuration file.
56F6
LD A,02H 3E 02
Load Register A with 02H, the length byte of the transfer record.
56F8
GOSUB to 570FH to write the byte in Register A to the configuration file.
56FB
LD A,00H 3E 00
Load Register A with 00H, the low byte of the transfer address 5200H.
56FD
GOSUB to 570FH to write the byte in Register A to the configuration file.
5700
LD A,52H 3E 52
Load Register A with 52H, the high byte of the transfer address 5200H, the loader.
5702
GOSUB to 570FH to write the byte in Register A to the configuration file.
5705
LD DE,58A8H 11 A8 58
Point Register Pair DE to 58A8H, the file control block of the configuration file.
5708
GOSUB to 4428H, CLOSE@, to close the file at Register Pair DE: the NZ FLAG on an error.
570B
If the NZ FLAG is set (CLOSE@ failed), JUMP to 58A2H to post the error in Register A.
570E
RET C9
RETurn to the overlay request handler: SYSTEM has written the configuration file.

570FH - Write a Byte

Puts the byte in Register A to the configuration file at 58A8H through the ROM's 001BH; an error is posted.

570F
PUSH DE D5
Save Register Pair DE to the top of the stack, to keep it over the write.
5710
LD DE,58A8H 11 A8 58
Point Register Pair DE to 58A8H, the file control block of the configuration file.
5713
GOSUB to 001BH, the ROM's routine that puts the byte in Register A to the file at Register Pair DE: the NZ FLAG on an error.
5716
POP DE D1
Restore Register Pair DE from the top of the stack.
5717
If the NZ FLAG is set (the write failed), JUMP to 58A2H to post the error in Register A.
571A
RET C9
RETurn to the caller: the byte is written to the configuration file.

571BH - The Loader of a Configuration File

Code that SYSTEM copies to 5A00H (5676H) and writes to the file to load at 5200H, so it runs at 5200H, 051BH lower than here; its absolute addresses are those it has there (5260H the table, 527EH the saved data). With the interrupts off it keeps the cursor position (4020H) and the resident overlay bytes (429DH), copies each saved area back to its place, then the memory above HIGH$ (HIGH$ is already restored), sets bit 0 of DCT+03H of every drive with a driver so that each diskette is logged again, has the ROM's 005AH set up the RS-232 interface from the restored control block 41F5H, puts back 429DH and the cursor position, and RETurns with the interrupts on.

571B
DI F3
Disable the interrupts while the system areas are copied back.
571C
LD HL,(4020H) 2A 20 40
Load Register Pair HL with the cursor position from 4020H-4021H, which the saved areas must not change.
571F
PUSH HL E5
Save Register Pair HL, the cursor position, to the top of the stack.
5720
LD HL,(429DH) 2A 9D 42
Load Register Pair HL with the resident overlay bytes from 429DH-429EH, which describe the overlays now in memory.
5723
PUSH HL E5
Save Register Pair HL, the resident overlay bytes, to the top of the stack.
5724
LD IX,5260H DD 21 60 52
Point Index Register IX to 5260H, where the table of the saved areas is when the loader runs at 5200H.
5728
LD HL,527EH 21 7E 52
Point Register Pair HL to 527EH, where the saved data starts when the loader runs at 5200H.
572B
LD E,(IX+00H) DD 5E 00
Load Register E with the low byte of the area's address at Index Register IX+00H.
572E
LD D,(IX+01H) DD 56 01
Load Register D with the high byte of the area's address at Index Register IX+01H.
5731
INC D 14
INCrement Register D by 1, so that the DEC D below tests the high byte of the address.
5732
DEC D 15
DECrement Register D by 1: the Z FLAG when the high byte is 00H, the end of the table.
5733
If the Z FLAG is set (the end of the table), JUMP to 5744H for the high memory.
5735
LD C,(IX+02H) DD 4E 02
Load Register C with the low byte of the area's length at Index Register IX+02H.
5738
LD B,(IX+03H) DD 46 03
Load Register B with the high byte of the area's length at Index Register IX+03H.
573B
LDIR ED B0
Copy the saved area from Register Pair HL back to its place at Register Pair DE by LDIR. Register Pair BC counts down.
573D
LD DE,0004H 11 04 00
Load Register Pair DE with 0004H, the length of an entry of the table.
5740
ADD IX,DE DD 19
ADD Register Pair DE to Index Register IX, to the next entry of the table.
5742
JUMP back to 572BH to copy the next area of the table back to its place.
5744
PUSH HL E5
Save Register Pair HL, the saved high memory, to the top of the stack.
5745
LD DE,(4411H) ED 5B 11 44
Load Register Pair DE with HIGH$ from 4411H-4412H, as the saved areas have just put it back.
5749
LD HL,(42A5H) 2A A5 42
Load Register Pair HL with TOP$, the top of the memory, from 42A5H-42A6H.
574C
SBC HL,DE ED 52
Subtract Register Pair DE (HIGH$) from Register Pair HL (TOP$): the bytes above HIGH$, the Z FLAG when there are none.
574E
LD C,L 4D
Load Register C with Register L, the low byte of the count.
574F
LD B,H 44
Load Register B with Register H: Register Pair BC = the bytes above HIGH$.
5750
INC DE 13
INCrement Register Pair DE by 1, to the first byte above HIGH$ (INC does not change the flags).
5751
POP HL E1
Restore Register Pair HL, the saved high memory, from the top of the stack.
5752
If the Z FLAG is set (nothing above HIGH$), JUMP to 5756H.
5754
LDIR ED B0
Copy the saved high memory from Register Pair HL back above HIGH$ at Register Pair DE by LDIR. Register Pair BC counts down.
5756
LD C,00H 0E 00
Load Register C with 00H, drive 0, the first drive.
5758
GOSUB to 44A3H, LOCDCT%, to point Index Register IY to the drive control table of the drive in Register C.
575B
LD A,(IY+01H) FD 7E 01
Load Register A with the low byte of the driver address, DCT+01H at Index Register IY+01H.
575E
AND (IY+02H) FD A6 02
AND Register A with the high byte, DCT+02H at Index Register IY+02H: Register A = FFH only when the address is FFFFH.
5761
INC A 3C
INCrement Register A by 1: the Z FLAG for a drive without a driver (FFFFH).
5762
If the Z FLAG is set (no driver), JUMP to 5768H for the next drive.
5764
SET 0,(IY+03H) FD CB 03 C6
Set bit 0 of DCT+03H at Index Register IY+03H, so that the diskette is logged again at its next use.
5768
LD A,07H 3E 07
Load Register A with 07H, the last drive number.
576A
INC C 0C
INCrement Register C by 1, to the next drive number.
576B
CP C B9
Compare Register A against Register C: the NC FLAG while the drive number is 7 or less.
576C
If the NC FLAG is set (drives left), JUMP back to 5758H for the next drive.
576E
GOSUB to 005AH, the ROM's routine that sets up the RS-232 interface from its control block 41F5H, which the saved areas put back.
5771
POP HL E1
Restore Register Pair HL, the resident overlay bytes, from the top of the stack.
5772
LD (429DH),HL 22 9D 42
Store Register Pair HL back into 429DH-429EH: the overlays now in memory, not those of the saved state.
5775
POP HL E1
Restore Register Pair HL, the cursor position, from the top of the stack.
5776
LD (4020H),HL 22 20 40
Store Register Pair HL back into 4020H-4021H, the cursor position.
5779
EI FB
Enable the interrupts again: the system areas are back.
577A
RET C9
RETurn to the caller of the configuration file (DOSPLUS) with the saved state in force.

577BH - The System Areas

Data: the table of the system areas a configuration file saves (5681H) and its loader restores (5724H, at 5260H there): the address and the length of each, ended by an address whose high byte is 00H.

577B-577C
DEFW 400CH 0C 40
Area 1: from 400CH, the restart vectors, the ROM's device control blocks and the words up to 404BH.
577D-577E
DEFW 0040H 40 00
The length of area 1: 64 bytes, 400CH-404BH, saved and restored as it is.
577F-5780
DEFW 41E5H E5 41
Area 2: from 41E5H, the system words of the Model III up to 4215H.
5781-5782
DEFW 0031H 31 00
The length of area 2: 49 bytes, 41E5H-4215H, saved and restored as it is.
5783-5784
DEFW 428DH 8D 42
Area 3: from 428DH, the system variables of SYS0/SYS, LOW$ and TOP$.
5785-5786
DEFW 002EH 2E 00
The length of area 3: 46 bytes, 428DH-42BAH, saved and restored as it is.
5787-5788
DEFW 42BEH BE 42
Area 4: from 42BEH, more of the system variables of SYS0/SYS.
5789-578A
DEFW 0010H 10 00
The length of area 4: 16 bytes, 42BEH-42CDH, saved and restored as it is.
578B-578C
DEFW 4400H 00 44
Area 5: from 4400H, the system entry points of SYS0/SYS.
578D-578E
DEFW 0067H 67 00
The length of area 5: 103 bytes, 4400H-4466H, saved and restored as it is.
578F-5790
DEFW 4467H 67 44
Area 6: from 4467H, more of the system entry points of SYS0/SYS.
5791-5792
DEFW 003FH 3F 00
The length of area 6: 63 bytes, 4467H-44A5H, saved and restored as it is.
5793-5794
DEFW 44A6H A6 44
Area 7: from 44A6H, the DCB table, DCTTBL and the drive control tables.
5795-5796
DEFW 00B5H B5 00
The length of area 7: 181 bytes, 44A6H-455AH, saved and restored as it is.
5797-5798
DEFW 0000H 00 00
The end of the table: an address whose high byte is 00H.

5799H - SYSTEM's Texts

Data: the three words of the display of the memory pointers (5539H-555AH), each ended by 03H for DSPLY@, and the default extension of a configuration file.

5799-579D
DEFM "LOW$=" 4C 4F 57 24 3D
The word before LOW$, the bottom of free memory (5539H).
579E
DEFB 03H 03
The byte that ends the text LOW$= for DSPLY@.
579F-57A5
DEFM ",HIGH$=" 2C 48 49 47 48 24 3D
The word before HIGH$, the top of memory for programs (5545H).
57A6
DEFB 03H 03
The byte that ends the text ,HIGH$= for DSPLY@.
57A7-57AC
DEFM ",TOP$=" 2C 54 4F 50 24 3D
The word before TOP$, the top of the memory (5551H).
57AD
DEFB 03H 03
The byte that ends the text ,TOP$= for DSPLY@.
57AE-57B0
DEFM "CFG" 43 46 47
The default extension of a configuration file, added by FEXT@ (5662H).

57B1H - SYSTEM's Evaluation Block

Data: the block that Index Register IX points to for EVAL@ (5528H): EVAL@'s flags, the three field blocks, all 58A7H, and the parameter table. Each entry is the name (6 characters), the address its value is stored to (the operands of 5563H-562BH) and a type byte (20H a switch, 40H a number). The manual's HIGH is the name HIGH$, which a name of four characters matches.

57B1
DEFB 00H 00
The flags of SYSTEM's evaluation block, set by EVAL@: bits 0-2 the fields, bit 3 the parameters.
57B2-57B3
DEFW 58A7H A7 58
The address of the source block, 58A7H: the flag byte, then the file control block.
57B4-57B5
DEFW 58A7H A7 58
The address of the destination block: 58A7H again, so any field goes to the one block.
57B6-57B7
DEFW 58A7H A7 58
The address of the wildmask block: 58A7H again, so any field goes to the one block.
57B8-57B9
DEFW 57BAH BA 57
The address of SYSTEM's parameter table at 57BAH.
57BA-57BF
DEFM "TIME " 54 49 4D 45 20 20
The name TIME: the time prompt at boot, bit 3 of the boot flags (T).
57C0-57C1
DEFW 55C6H C6 55
TIME's value goes to 55C6H-55C7H, the operand of LD DE,0000H at 55C5H.
57C2
DEFB 20H 20
The type byte of TIME: 20H, bit 5, a switch, so the name alone sets it.
57C3-57C8
DEFM "DATE " 44 41 54 45 20 20
The name DATE: the date prompt at boot, bit 2 of the boot flags (D).
57C9-57CA
DEFW 55B7H B7 55
DATE's value goes to 55B7H-55B8H, the operand of LD DE,0000H at 55B6H.
57CB
DEFB 20H 20
The type byte of DATE: 20H, bit 5, a switch, so the name alone sets it.
57CC-57D1
DEFM "LOGO " 4C 4F 47 4F 20 20
The name LOGO: the logo at boot, bit 1 of the boot flags (L).
57D2-57D3
DEFW 55A8H A8 55
LOGO's value goes to 55A8H-55A9H, the operand of LD DE,0000H at 55A7H.
57D4
DEFB 20H 20
The type byte of LOGO: 20H, bit 5, a switch, so the name alone sets it.
57D5-57DA
DEFM "BLINK " 42 4C 49 4E 4B 20
The name BLINK: the blinking cursor, the switch at 401CH (B).
57DB-57DC
DEFW 55F3H F3 55
BLINK's value goes to 55F3H-55F4H, the operand of LD DE,0000H at 55F2H.
57DD
DEFB 20H 20
The type byte of BLINK: 20H, bit 5, a switch, so the name alone sets it.
57DE-57E3
DEFM "CAPS " 43 41 50 53 20 20
The name CAPS: upper or lower case from the keyboard, the switch at 4019H (C).
57E4-57E5
DEFW 55FFH FF 55
CAPS's value goes to 55FFH-5600H, the operand of LD DE,0000H at 55FEH.
57E6
DEFB 20H 20
The type byte of CAPS: 20H, bit 5, a switch, so the name alone sets it.
57E7-57EC
DEFM "CURSOR" 43 55 52 53 4F 52
The name CURSOR: the cursor character at 4023H (CU).
57ED-57EE
DEFW 560AH 0A 56
CURSOR's value goes to 560AH-560BH, the operand of LD DE,FFFFH at 5609H.
57EF
DEFB 40H 40
The type byte of CURSOR: 40H, bit 6, a number, the character.
57F0-57F5
DEFM "HIGH$ " 48 49 47 48 24 20
The name HIGH$: the top of memory for programs at 4411H (H).
57F6-57F7
DEFW 5614H 14 56
HIGH$'s value goes to 5614H-5615H, the operand of LD DE,0000H at 5613H.
57F8
DEFB 40H 40
The type byte of HIGH$: 40H, bit 6, a number, the address.
57F9-57FE
DEFM "STEP " 53 54 45 50 20 20
The name STEP: the system's default step rate, +16H of the boot sector (S).
57FF-5800
DEFW 55D5H D5 55
STEP's value goes to 55D5H-55D6H, the operand of LD DE,0000H at 55D4H.
5801
DEFB 40H 40
The type byte of STEP: 40H, bit 6, a number, the step rate code.
5802-5807
DEFM "PORT " 50 4F 52 54 20 20
The name PORT: the port to output to at boot, +17H of the boot sector (P).
5808-5809
DEFW 55DFH DF 55
PORT's value goes to 55DFH-55E0H, the operand of LD DE,0000H at 55DEH.
580A
DEFB 40H 40
The type byte of PORT: 40H, bit 6, a number, the port.
580B-5810
DEFM "MODE " 4D 4F 44 45 20 20
The name MODE: the value to output to PORT at boot, +18H of the boot sector (M).
5811-5812
DEFW 55E9H E9 55
MODE's value goes to 55E9H-55EAH, the operand of LD DE,0000H at 55E8H.
5813
DEFB 40H 40
The type byte of MODE: 40H, bit 6, a number, the value for the port.
5814-5819
DEFM "SAVE " 53 41 56 45 20 20
The name SAVE: keep BLINK, CURSOR and CAPS in the boot sector (SA).
581A-581B
DEFW 5627H 27 56
SAVE's value goes to 5627H-5628H, the operand of LD DE,0000H at 5626H.
581C
DEFB 20H 20
The type byte of SAVE: 20H, bit 5, a switch, so the name alone sets it.
581D
DEFB 00H 00
The end of SYSTEM's parameter table: a 00H in place of the next name.

581EH - A Number in Decimal

581EH shows the number in Register E, 5820H the number in Register Pair DE, each with up to four leading zeros left out; 5822H leaves out up to Register B of them. The routine runs under 4485H, which keeps the registers. The number is turned into six BCD digits at 58A7H-58A9H (the low two in 58A7H) by 16 doublings with DAA, then into six digits at 58AAH-58AFH; the five from 58ABH are shown, less the leading zeros left out.

581E
LD D,00H 16 00
Load Register D with 00H: Register Pair DE = the number in Register E.
5820
LD B,04H 06 04
Load Register B with 04H, so that up to four of the five digits are left out when they are leading zeros.
5822
GOSUB to 4485H, which runs the rest of this routine with the registers saved and puts them back when it RETurns.
5825
LD HL,58A7H 21 A7 58
Point Register Pair HL to 58A7H, the three bytes of the number in BCD.
5828
LD (HL),00H 36 00
Store 00H at Register Pair HL, the lowest two BCD digits.
582A
INC HL 23
INCrement Register Pair HL by 1, to the next byte of the BCD number.
582B
LD (HL),00H 36 00
Store 00H at Register Pair HL, the middle two BCD digits.
582D
INC HL 23
INCrement Register Pair HL by 1, to the next byte of the BCD number.
582E
LD (HL),00H 36 00
Store 00H at Register Pair HL, the highest two BCD digits.
5830
PUSH BC C5
Save Register Pair BC, the zeros to leave out in Register B, to the top of the stack.
5831
LD C,10H 0E 10
Load Register C with 10H, the 16 bits of the number in Register Pair DE.
5833
LD B,03H 06 03
Load Register B with 03H, the three bytes of the BCD number.
5835
LD HL,58A7H 21 A7 58
Point Register Pair HL to 58A7H, the lowest byte of the BCD number.
5838
SLA E CB 23
Shift Register E left by one bit: its bit 7 goes to the C FLAG.
583A
RL D CB 12
Rotate Register D left through the C FLAG: the highest bit of Register Pair DE goes to the C FLAG.
583C
LD A,(HL) 7E
Load Register A with the byte of the BCD number at Register Pair HL.
583D
ADC A,A 8F
ADD Register A to itself with the C FLAG: the BCD byte doubled, plus the bit from below.
583E
DAA 27
Decimal Adjust Register A, so that it holds the doubled byte as two BCD digits and the C FLAG carries into the next byte.
583F
LD (HL),A 77
Store Register A, the two BCD digits, back at Register Pair HL.
5840
INC HL 23
INCrement Register Pair HL by 1, to the next byte of the BCD number.
5841
DECrement Register B and LOOP back to 583CH until the three bytes are doubled.
5843
DEC C 0D
DECrement Register C by 1, the count of the bits still to take.
5844
If the NZ FLAG is set (bits left), JUMP back to 5833H for the next bit of the number.
5846
LD DE,58AAH 11 AA 58
Point Register Pair DE to 58AAH, the six digits of the number as characters.
5849
LD HL,58A9H 21 A9 58
Point Register Pair HL to 58A9H, the highest byte of the BCD number.
584C
LD B,03H 06 03
Load Register B with 03H, the three bytes of the BCD number.
584E
LD A,33H 3E 33
Load Register A with 33H, whose low four bits become the high half of the byte at Register Pair HL.
5850
RRD ED 67
Rotate the digits of Register A and the byte at Register Pair HL right (RRD): Register A = 30H plus the low digit, the byte = 30H plus the high digit.
5852
LD C,A 4F
Load Register C with Register A, the low digit as a character.
5853
LD A,(HL) 7E
Load Register A with the byte at Register Pair HL, the high digit as a character.
5854
DEC HL 2B
DECrement Register Pair HL by 1, to the next lower byte of the BCD number.
5855
LD (DE),A 12
Store Register A, the high digit, at Register Pair DE.
5856
INC DE 13
INCrement Register Pair DE by 1, to the next digit.
5857
LD A,C 79
Load Register A with Register C, the low digit.
5858
LD (DE),A 12
Store Register A, the low digit, at Register Pair DE.
5859
INC DE 13
INCrement Register Pair DE by 1, to the next digit.
585A
DECrement Register B and LOOP back to 584EH until the six digits are made.
585C
POP BC C1
Restore Register Pair BC, the zeros to leave out in Register B, from the top of the stack.
585D
LD HL,58ABH 21 AB 58
Point Register Pair HL to 58ABH, the first of the five digits shown (the sixth, 58AAH, is always 0).
5860
LD C,B 48
Load Register C with Register B, the most zeros to leave out.
5861
LD A,30H 3E 30
Load Register A with 30H, the digit 0, the leading zero to look for.
5863
CP (HL) BE
Compare Register A against the digit at Register Pair HL: the Z FLAG for a leading zero.
5864
If the NZ FLAG is set (not a zero), JUMP to 5869H to show the digits from here.
5866
INC HL 23
INCrement Register Pair HL by 1, past the leading zero.
5867
DECrement Register B and LOOP back to 5863H while more zeros may be left out.
5869
LD A,05H 3E 05
Load Register A with 05H, the five digits from 58ABH to 58AFH.
586B
SUB C 91
SUBtract Register C, the most zeros to leave out, from Register A.
586C
ADD A,B 80
ADD Register B, the zeros that were not left out, to Register A: the digits to show.
586D
LD B,A 47
Load Register B with Register A, the count of the digits to show.
586E
LD A,(HL) 7E
Load Register A with the digit at Register Pair HL.
586F
GOSUB to 0033H, the ROM's routine that shows the character in Register A on the display.
5872
INC HL 23
INCrement Register Pair HL by 1, to the next digit.
5873
DECrement Register B and LOOP back to 586EH until the digits are shown.
5875
RET C9
RETurn to the caller through 4485H, which puts the registers back.

5876H - A Number in Hexadecimal

5876H shows Register Pair HL as four hexadecimal digits and an H; 5883H shows Register A as two digits, 588CH the low four bits of Register A as one digit (by ADD 90H, DAA, ADC 40H, DAA).

5876
LD A,H 7C
Load Register A with Register H, the high byte of the number.
5877
GOSUB to 5883H to show Register A as two hexadecimal digits.
587A
LD A,L 7D
Load Register A with Register L, the low byte of the number.
587B
GOSUB to 5883H to show Register A as two hexadecimal digits.
587E
LD A,48H 3E 48
Load Register A with 48H, the letter H after a hexadecimal number.
5880
JUMP to 0033H, the ROM's routine that shows the character in Register A, which RETurns to the caller.
5883
PUSH AF F5
Save Register Pair AF, the byte, to the top of the stack.
5884
RRA 1F
Rotate Register A right through the C FLAG, the first of four rotations.
5885
RRA 1F
Rotate Register A right through the C FLAG, the second of four rotations.
5886
RRA 1F
Rotate Register A right through the C FLAG, the third of four rotations.
5887
RRA 1F
Rotate Register A right through the C FLAG: the high four bits of the byte are now its low four bits.
5888
GOSUB to 588CH to show the low four bits of Register A, the high digit of the byte.
588B
POP AF F1
Restore Register Pair AF, the byte, from the top of the stack, for its low digit.
588C
AND 0FH E6 0F
AND Register A with 0FH, the low four bits, one hexadecimal digit.
588E
ADD A,90H C6 90
ADD 90H to Register A: 90H-99H for 0-9, 9AH-9FH for A-F.
5890
DAA 27
Decimal Adjust Register A: 90H-99H for 0-9, 00H-05H with the C FLAG for A-F.
5891
ADC A,40H CE 40
ADD 40H and the C FLAG to Register A: D0H-D9H for the digits 0-9, 41H-46H for the letters A-F.
5893
DAA 27
Decimal Adjust Register A: 30H-39H for the digits 0-9, 41H-46H for the letters A-F.
5894
JUMP to 0033H, the ROM's routine that shows the character in Register A, which RETurns to the caller.

5897H - The Error Exits

Four entries, each loading its error code into Register A: 5897H 2DH Invalid data provided, 589AH 2BH Illegal devicespec, 589DH 2CH Illegal filespec, 58A0H 29H Device not available. Each LD A,n after the first is the operand of an LD BC,nn entered from the entry above it. 58A2H posts the error in Register A by ERROR@ with bit 6 set (no frame), and ERROR@ ends with ABORT@.

5897
LD A,2DH 3E 2D
Load Register A with 2DH, the error code Invalid data provided.
5899
LD BC,2B3EH 01 3E 2B
589AH enters inside this LD BC,2B3EH: its bytes 3EH 2BH read as LD A,2BH, the error code Illegal devicespec; from above it only loads Register Pair BC.
589C
LD BC,2C3EH 01 3E 2C
589DH enters inside this LD BC,2C3EH: its bytes 3EH 2CH read as LD A,2CH, the error code Illegal filespec; from above it only loads Register Pair BC.
589F
LD BC,293EH 01 3E 29
58A0H enters inside this LD BC,293EH: its bytes 3EH 29H read as LD A,29H, the error code Device not available; from above it only loads Register Pair BC.
58A2
OR 40H F6 40
OR Register A, the error code, with 40H, bit 6, so that ERROR@ shows the message without its frame.
58A4
JUMP to 4409H, ERROR@, to show the message of the error in Register A and end through ABORT@.

58A7H - The Work Area

Not in the file: SYS16/SYS uses the memory after its last byte (58A6H) for the field block of EVAL@, the digits of a decimal number, the buffer of the configuration file and its image.

58A7-58C7
DEFS 33
The field block of EVAL@: 58A7H the flag byte, 58A8H the file control block of the configuration file. 58A7H-58AFH also hold the BCD number and the digits of 581EH, used only while no file is open.
58C8-58E6
DEFS 31
Not used by SYS16/SYS: the bytes up to the buffer of the configuration file.
5900-59FF
DEFS 256
The buffer of the configuration file's sectors (566DH).
5A00-5AFF
DEFS 256
The start of the image of a configuration file (567CH): the loader, then the saved areas and the memory above HIGH$, as far as they need.