DOSPLUS 3.5 for the Model I - SYS13/SYS Disassembled

Page Customization

Introduction/Summary

DOSPLUS 3.5 SYS13/SYS Disassembly - The Library Commands DO, FORMS and RS232 (Model I)

SYS13/SYS is the fifth of the high overlays: it loads at 5200H and holds three library commands, routines 3 to 5 of its table at 5200H with the request codes C3H to C5H: DO, FORMS and RS232. CMNDI@ takes the codes from SYS1/SYS's table of the library commands and passes them to the overlay request handler, which loads SYS13/SYS and calls the routine with Register Pair HL at the rest of the command line. No file of the diskette requests routine 2 (C2H). The file is a load module of 5 blocks, 1145 bytes, from 5200H to 5678H, with the transfer address 5200H and no gaps; the work area after the file starts at 5679H.

The Parts of SYS13/SYS

AddressContents
5200H-5209HThe routine table (routines 2-5) and routine 2 (5200H, 5208H).
520AH-5284HDO (520AH).
5285H-533CHFORMS, its display and a byte in decimal (5285H, 52FCH, 5338H).
533DH-53E3HRS232 and its display (533DH, 5348H).
53E4H-54E7HRS232's parameters: BAUD, WORD, STOPS, PARITY, EVEN and ODD, DTR, RTS and BREAK, then the settings to the interface (53E4H, 5408H, 5433H, 5459H, 5476H, 5487H, 54A1H, 54DAH).
54E8H-555AHThe helpers: a number in decimal, the end of the line, the decimal digits; the error exits (54E8H, 54F2H, 54FDH, 554BH).
555BH-5678HThe baud rates, DO's evaluation block, the parameter tables of FORMS and RS232, the texts (555BH, 557BH, 5597H, 55C0H, 5611H).

DO

DO (520AH) takes the file and the parameters HIGH and BREAK through EVAL@ with its block at 557BH; all three field blocks are the one at 5679H, and a missing field or a field without a name (a drive or a device) is error 2FH. HIGH, by default HMEM$ as it is, becomes HMEM$ (4049H). BREAK, by default Y, clears bit 0 of SFLAG1$ (4302H), so that the BREAK key works, and BREAK=N sets it. Unless bit 6 of SFLAG1$ shows that a DO already took its memory, DO sets that bit and takes the 288 bytes below HMEM$: HMEM$ is lowered by 0120H, and the file control block starts at the new HMEM$ plus 1, followed by its 256 byte buffer; its address goes to DODCB$ (435AH). FSPEC@ puts the file into that block, FEXT@ gives it the extension TXT when it has none, OPEN@ opens it, and bit 5 of SFLAG1$ is set: a DO file is running.

FORMS

FORMS (5285H) works on the control block of @PR (device 2, from LOCDCB%): +03H the page length (PAGE), +07H the lines used on a page (LINES), +06H the width (WIDTH). Without parameters it shows $02 @PR Page=n,Lines=n,Width=n (52FCH), the name taken from @PR's entry of SYS0/SYS's DCB table (4388H). With parameters, PARAM@ takes PAGE, LINES, WIDTH, TOP and CODE through the table at 5597H into words at 5679H (CODE into an operand of FORMS); an unknown parameter is error 2EH and a value above 255 error 2DH. The three values go back into the control block; then CODE sends its high byte and then its low byte to the printer through the ROM's 003BH, each only when it is not 00H, and TOP sends a form feed (0CH).

RS232

RS232 (533DH) keeps the settings of the RS-232 interface at 4305H-4306H, in SYS0/SYS's system area: 4305H the baud rate byte for port E9H (bits 7-4 the sending rate, bits 3-0 the receiving rate, each an index into the 16 rates at 555BH) and 4306H the control byte for port EAH. Without parameters it shows $03 @RS Baud=n,Word=n,Stops=n,Parity=x and the marks ,BRK ,DTR ,RTS (5348H); the baud rate shown is the receiving one. In both cases the settings are then sent to the interface (54DAH): a byte to port E8H resets it, the baud rate byte goes to port E9H and the control byte to port EAH.

With parameters (53E4H) PARAM@ takes BAUD, WORD, STOPS, EVEN, ODD, PARITY, DTR, RTS, BREAK and WAIT through the table at 55C0H, each value into the operand of an instruction further on: BAUD's operand is first set to 0000H and the other nine to 80H in their low byte, the mark of a parameter not given. BAUD must be one of the 16 rates and sets both halves of the baud rate byte; WORD (5-8) sets bits 6-5 of the control byte (00 for 5 bits, 10 for 6, 01 for 7, 11 for 8), STOPS (1 or 2) bit 4, PARITY=N bit 3 (no parity), EVEN bit 7 (even parity); DTR=N sets bit 1, RTS=N bit 0 and BREAK=N bit 2, and each of them given as Y clears its bit. A rate not in the table, a word length outside 5-8, STOPS 3 or more, or EVEN and ODD with the same value is error 2DH; an unknown parameter is error 2EH. WAIT is taken and not used.

Differences from the Manual

CODE sends the high byte of its value first and the low byte second (FORMS (CODE=0F1BH) sends 0FH, then 1BH); the manual says the last byte given, 1BH, is sent first. Only EVEN decides the parity sense: ODD=N alone gives odd parity, where the manual says ODD=N is the same as EVEN=Y, and ODD=Y with EVEN=Y, or ODD=N with EVEN=N, is refused. STOPS=0 is not refused: 0 less 1 gives FFH, so every bit of the control byte is set. RS232 also takes a parameter WAIT, which the manual does not list (on the Model I it has no effect; on the Model III it is the ROM's wait switch). DO's BREAK sets the BREAK key flag of SFLAG1$ itself, for the system, and DO without BREAK turns the BREAK key on even after BREAK OFF; SYS13/SYS does not keep the old setting. The entry 554BH that posts error 2CH (Illegal filespec) is reached by nothing.

The bits DOSPLUS gives the control lines: the DTR parameter sets or clears bit 1 of the control byte and RTS bit 0, and the display follows the same bits. The ports page of this site gives bit 0 as DTR and bit 1 as RTS; the page follows the bytes.

Variables

Self-Modified Operands

Address
Size
Contents
52E5H-52E6H
2 bytes
CODE
The value of CODE: the operand of LD BC,0000H at 52E4H.
5409H-540AH
2 bytes
BAUD
The value of BAUD: the operand of LD DE,0000H at 5408H.
5437H-5438H
2 bytes
WORD
The value of WORD: the operand of LD DE,0000H at 5436H.
545AH-545BH
2 bytes
STOPS
The value of STOPS: the operand of LD DE,0000H at 5459H.
5477H-5478H
2 bytes
PARITY
The value of PARITY: the operand of LD DE,0000H at 5476H.
5488H-5489H
2 bytes
ODD
The value of ODD: the operand of LD DE,0000H at 5487H.
548BH-548CH
2 bytes
EVEN
The value of EVEN: the operand of LD BC,0000H at 548AH.
54A2H-54A3H
2 bytes
DTR
The value of DTR: the operand of LD DE,0000H at 54A1H.
54B3H-54B4H
2 bytes
RTS
The value of RTS: the operand of LD DE,0000H at 54B2H.
54C4H-54C5H
2 bytes
BREAK
The value of BREAK: the operand of LD DE,0000H at 54C3H.
54D8H-54D9H
2 bytes
WAIT
The value of WAIT: the operand of LD DE,0000H at 54D7H.

Work Areas

Address
Size
Contents
5679H-5699H
33 bytes
Field and Numbers
DO's field for EVAL@ (flag byte, then the text), FORMS's values at 5679H-5680H, and the BCD number, its digits and the text of 54FDH.
569AH-569BH
2 bytes
HIGH
The value of DO's parameter HIGH, at first HMEM$ (520EH).
569CH-569DH
2 bytes
BREAK
The value of DO's parameter BREAK, at first FFH (5214H).

System Addresses

Address
Size
Contents
4049H
2 bytes
HMEM$
The top of memory: set by HIGH and lowered by 288 bytes for the first DO.
4302H
1 byte
SFLAG1$
The system flags: bit 0 BREAK disabled, bit 5 a DO file running, bit 6 DO's memory taken.
435AH
2 bytes
DODCB$
The address of the DO file's control block.
4388H
2 bytes
PR
The name of device 2, +09H of its entry in SYS0/SYS's DCB table, shown by FORMS.
4393H
2 bytes
RS
The name of device 3, +09H of its entry in SYS0/SYS's DCB table, shown by RS232.
4305H
1 byte
RS-232 Baud Rate
SYS0/SYS's system area: the byte for port E9H, the sending rate in bits 7-4 and the receiving rate in bits 3-0.
4306H
1 byte
RS-232 Control
SYS0/SYS's system area: the byte for port EAH (bit 7 even parity, bits 6-5 word length, bit 4 two stop bits, bit 3 no parity, bit 2 clear for a break, bit 1 DTR, bit 0 RTS, both on when clear).

Outside Routines

AddressContents
4479HSYS0/SYS: EVAL@ (521BH).
441CHSYS0/SYS: FSPEC@ (5267H).
4473HSYS0/SYS: FEXT@ (526DH).
4424HSYS0/SYS: OPEN@ (5276H).
4488HSYS0/SYS: LOCDCB% (5287H).
4476HSYS0/SYS: PARAM@ (52C0H, 5402H).
4467HSYS0/SYS: DSPLY@.
4409HSYS0/SYS: ERROR@ (5558H).
0033HROM: show the character in Register A on the display.
003BHROM: send the character in Register A to the printer.

Disassembly

5200H - The Routine Table

Data: SYS13/SYS's table of routines 2-5, one word each, used by SYS0/SYS's overlay request handler (its 49C9H-49DCH) for the request codes C2H-C5H. CMNDI@ takes the codes of the library commands from SYS1/SYS's table: DO C3H (51CAH), FORMS C4H (51CFH), RS232 C5H (51DBH). No file of the diskette requests C2H.

5200-5201
DEFW 5208H 08 52
Routine 2: 5208H, XOR A and RET, which SYS0/SYS's record locator requests when it loads SYS13/SYS back (its 4D55H-4D62H).
5202-5203
DEFW 520AH 0A 52
Routine 3: 520AH, DO (C3H): run the commands of a file as if they were typed.
5204-5205
DEFW 5285H 85 52
Routine 4: 5285H, FORMS (C4H): show or set the printer's page length, lines and width.
5206-5207
DEFW 533DH 3D 53
Routine 5: 533DH, RS232 (C5H): show or set the baud rate, word length, stop bits, parity and lines of the RS-232 interface.

5208H - Routine 2

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

5208
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.
5209
RET C9
RETurn to SYS0/SYS's overlay request handler (49DDH) with Register A = 00H.

520AH - DO

Routine 3, entered from CMNDI@ through the overlay request handler with Register Pair HL at the rest of the command line. EVAL@ takes the file and the parameters HIGH (the top of memory, by default HMEM$ as it is) and BREAK (by default Y) with the block at 557BH; a missing field, or a field that is a drive or a device, is error 2FH. HMEM$ is set to HIGH, and BREAK=N sets bit 0 of SFLAG1$ (the BREAK key is disabled) while BREAK=Y clears it. The first DO (bit 6 of SFLAG1$ clear) sets that bit and takes 288 bytes below HMEM$: HMEM$ is lowered by 0120H and the file control block starts at the new HMEM$ plus 1, followed by its 256 byte buffer; the address goes to DODCB$ (435AH). A DO while that memory is taken uses the same block. The file is opened (default extension TXT) and bit 5 of SFLAG1$ is set: a DO file is running. Register B is not loaded before OPEN@.

520A
LD DE,(4049H) ED 5B 49 40
Load Register Pair DE with HMEM$, the top of memory, from 4049H-404AH: the value HIGH has when it is not given.
520E
LD (569AH),DE ED 53 9A 56
Store Register Pair DE into 569AH-569BH, the value of HIGH, which EVAL@ replaces when HIGH is given.
5212
LD A,FFH 3E FF
Load Register A with FFH, the value Y: BREAK on, the value BREAK has when it is not given.
5214
LD (569CH),A 32 9C 56
Store Register A (FFH) into 569CH, the value of BREAK, which EVAL@ replaces when BREAK is given.
5217
LD IX,557BH DD 21 7B 55
Point Index Register IX to 557BH, DO's evaluation block: its flags, the three field blocks (all 5679H) and the parameter table 5584H.
521B
GOSUB to 4479H, EVAL@, to take the file and the parameters from the command line at Register Pair HL: the NZ FLAG and Register A the error code on an error.
521E
If the NZ FLAG is set (EVAL@ failed), JUMP to 5556H to post the error in Register A.
5221
LD A,07H 3E 07
Load Register A with 07H, the mask of bits 0-2 of the evaluation block's flags: a source, destination or wildmask field.
5223
AND (IX+00H) DD A6 00
AND Register A with the flags of the evaluation block at Index Register IX+00H: the Z FLAG when no field was given.
5226
If the Z FLAG is set (no file given), JUMP to 554EH to post error 2FH, I/o field not found.
5229
LD A,(5679H) 3A 79 56
Load Register A with the flag byte of the field at 5679H: bit 6 a name, bit 5 a wildcard, bit 7 a device.
522C
AND 60H E6 60
AND Register A with 60H, bits 6 and 5: the Z FLAG when the field has no name, so a drive or a device was given.
522E
If the Z FLAG is set (no file name), JUMP to 554EH to post error 2FH, I/o field not found.
5231
LD HL,(569AH) 2A 9A 56
Load Register Pair HL with the value of HIGH from 569AH-569BH: the old HMEM$ or the address given.
5234
LD (4049H),HL 22 49 40
Store Register Pair HL into HMEM$ at 4049H-404AH: the top of memory is now HIGH.
5237
LD A,(569CH) 3A 9C 56
Load Register A with the value of BREAK from 569CH: 00H for BREAK=N, anything else for BREAK=Y.
523A
OR A B7
OR Register A with itself to set the flags: the NZ FLAG for BREAK=Y, the Z FLAG for BREAK=N.
523B
LD A,(4302H) 3A 02 43
Load Register A with SFLAG1$ from 4302H, the system flags (the flags of the OR above are kept).
523E
RES 0,A CB 87
Reset bit 0 of Register A, the BREAK disable flag of SFLAG1$: the BREAK key works.
5240
If the NZ FLAG is set (BREAK=Y), JUMP to 5244H with the BREAK key enabled.
5242
SET 0,A CB C7
Set bit 0 of Register A: BREAK=N, the BREAK key is disabled.
5244
LD (4302H),A 32 02 43
Store Register A into SFLAG1$ at 4302H with its new BREAK bit.
5247
BIT 6,A CB 77
Test bit 6 of Register A, the flag that DO's memory below HMEM$ is taken: the NZ FLAG when it is.
5249
If the NZ FLAG is set (a DO already took its memory), JUMP to 5260H to use the same file control block again.
524B
SET 6,A CB F7
Set bit 6 of Register A: DO's memory is now taken.
524D
LD (4302H),A 32 02 43
Store Register A into SFLAG1$ at 4302H with bit 6 set.
5250
LD HL,(4049H) 2A 49 40
Load Register Pair HL with HMEM$ from 4049H-404AH, the top of memory as HIGH set it.
5253
LD DE,0120H 11 20 01
Load Register Pair DE with 0120H, the 288 bytes DO needs: a 32 byte file control block and a 256 byte buffer.
5256
OR A B7
OR Register A with itself to clear the C FLAG for the SBC below.
5257
SBC HL,DE ED 52
Subtract Register Pair DE (0120H) from Register Pair HL: Register Pair HL = the new top of memory.
5259
LD (4049H),HL 22 49 40
Store Register Pair HL into HMEM$ at 4049H-404AH: the 288 bytes above it belong to DO.
525C
INC HL 23
INCrement Register Pair HL by 1: the first byte above the new top of memory, the start of DO's block.
525D
LD (435AH),HL 22 5A 43
Store Register Pair HL into DODCB$ at 435AH-435BH, the address of the DO file's control block that SYS0/SYS reads.
5260
LD DE,(435AH) ED 5B 5A 43
Load Register Pair DE with the address of the DO file's control block from DODCB$ at 435AH-435BH.
5264
LD HL,567AH 21 7A 56
Point Register Pair HL to 567AH, the text of the field EVAL@ took (after its flag byte at 5679H).
5267
GOSUB to 441CH, FSPEC@, to put the file specification at Register Pair HL into the file control block at Register Pair DE.
526A
LD HL,5611H 21 11 56
Point Register Pair HL to 5611H, the default extension TXT.
526D
GOSUB to 4473H, FEXT@, to give the specification at Register Pair DE the extension TXT at Register Pair HL when it has none.
5270
PUSH DE D5
Save Register Pair DE, the file control block, to the top of the stack.
5271
POP HL E1
Restore Register Pair HL from the top of the stack: Register Pair HL = the file control block too.
5272
LD BC,0020H 01 20 00
Load Register Pair BC with 0020H, the 32 bytes of the file control block.
5275
ADD HL,BC 09
ADD Register Pair BC (0020H) to Register Pair HL: Register Pair HL = the buffer after the file control block.
5276
GOSUB to 4424H, OPEN@, to open the file at Register Pair DE with the buffer at Register Pair HL: the NZ FLAG and the code in Register A on an error.
5279
If the NZ FLAG is set (the file was not opened), JUMP to 5556H to post the error in Register A.
527C
LD A,(4302H) 3A 02 43
Load Register A with SFLAG1$ from 4302H, the system flags.
527F
SET 5,A CB EF
Set bit 5 of Register A, the flag of SFLAG1$ that a DO file is running.
5281
LD (4302H),A 32 02 43
Store Register A into SFLAG1$ at 4302H with bit 5 set.
5284
RET C9
RETurn to CMNDI@ through the overlay request handler with the DO file open and running.

5285H - FORMS

Routine 4, entered from CMNDI@ through the overlay request handler with Register Pair HL at the rest of the command line. Index Register IX gets the control block of @PR (device 2) from LOCDCB%: +03H the page length (PAGE), +07H the lines used on a page (LINES), +06H the width (WIDTH). Without parameters the settings are shown (52FCH). Otherwise the three values are copied as words into 5679H-567EH (Index Register IY), PARAM@ takes PAGE, LINES, WIDTH, TOP and CODE with the table at 5597H (an unknown parameter is error 2EH), a value above 255 is error 2DH, and the values go back into the control block. CODE then sends its high byte and then its low byte to the printer, each only when it is not 00H, and TOP sends a form feed (0CH).

5285
LD A,02H 3E 02
Load Register A with 02H, the device number of @PR, the printer, for LOCDCB%.
5287
GOSUB to 4488H, LOCDCB%, to find the control block of the device in Register A: Register Pair DE = the DCB of @PR.
528A
PUSH DE D5
Save Register Pair DE, the DCB of @PR, to the top of the stack.
528B
POP IX DD E1
Restore Index Register IX from the top of the stack: Index Register IX = the DCB of @PR.
528D
LD IY,5679H FD 21 79 56
Point Index Register IY to 5679H, the work area for the values of PAGE, LINES, WIDTH and TOP.
5291
GOSUB to 54F2H to look at the character at Register Pair HL: the C FLAG at the end of the line, else the NC FLAG and Register Pair HL past it.
5294
If the C FLAG is set (no parameters), JUMP to 52FCH to show the settings of @PR.
5296
DEC HL 2B
DECrement Register Pair HL by 1, back to the character 54F2H passed over, the start of the parameters.
5297
XOR A AF
Set Register A to 00H by XORing it with itself, the high byte of each value.
5298
LD B,(IX+03H) DD 46 03
Load Register B with the page length of @PR at Index Register IX+03H.
529B
LD (IY+00H),B FD 70 00
Store Register B into Index Register IY+00H (5679H), the low byte of PAGE's value.
529E
LD (IY+01H),A FD 77 01
Store Register A (00H) into Index Register IY+01H (567AH), the high byte of PAGE's value.
52A1
LD B,(IX+06H) DD 46 06
Load Register B with the width of @PR at Index Register IX+06H.
52A4
LD (IY+04H),B FD 70 04
Store Register B into Index Register IY+04H (567DH), the low byte of WIDTH's value.
52A7
LD (IY+05H),A FD 77 05
Store Register A (00H) into Index Register IY+05H (567EH), the high byte of WIDTH's value.
52AA
LD B,(IX+07H) DD 46 07
Load Register B with the lines used on a page of @PR at Index Register IX+07H.
52AD
LD (IY+02H),B FD 70 02
Store Register B into Index Register IY+02H (567BH), the low byte of LINES's value.
52B0
LD (IY+03H),A FD 77 03
Store Register A (00H) into Index Register IY+03H (567CH), the high byte of LINES's value.
52B3
LD (IY+06H),A FD 77 06
Store Register A (00H) into Index Register IY+06H (567FH), the value of TOP: no form feed unless TOP is given.
52B6
LD BC,0000H 01 00 00
Load Register Pair BC with 0000H, the value of CODE when it is not given: no code to send.
52B9
LD (52E5H),BC ED 43 E5 52
Store Register Pair BC (0000H) into 52E5H-52E6H, the operand of LD BC,0000H at 52E4H, the value of CODE.
52BD
LD DE,5597H 11 97 55
Point Register Pair DE to 5597H, FORMS's parameter table for PARAM@: PAGE, LINES, WIDTH, TOP and CODE.
52C0
GOSUB to 4476H, PARAM@, to take the parameters at Register Pair HL by the table at Register Pair DE: the NZ FLAG on an error.
52C3
If the NZ FLAG is set (an unknown parameter), JUMP to 5554H to post error 2EH, Invalid parameter.
52C6
LD A,(IY+01H) FD 7E 01
Load Register A with the high byte of PAGE's value at Index Register IY+01H.
52C9
OR (IY+03H) FD B6 03
OR Register A with the high byte of LINES's value at Index Register IY+03H.
52CC
OR (IY+05H) FD B6 05
OR Register A with the high byte of WIDTH's value at Index Register IY+05H: the NZ FLAG when a value is above 255.
52CF
If the NZ FLAG is set (a value above 255), JUMP to 5551H to post error 2DH, Invalid data provided.
52D2
LD A,(IY+00H) FD 7E 00
Load Register A with PAGE's value from Index Register IY+00H.
52D5
LD (IX+03H),A DD 77 03
Store Register A into the page length of @PR at Index Register IX+03H.
52D8
LD A,(IY+04H) FD 7E 04
Load Register A with WIDTH's value from Index Register IY+04H.
52DB
LD (IX+06H),A DD 77 06
Store Register A into the width of @PR at Index Register IX+06H.
52DE
LD A,(IY+02H) FD 7E 02
Load Register A with LINES's value from Index Register IY+02H.
52E1
LD (IX+07H),A DD 77 07
Store Register A into the lines used on a page of @PR at Index Register IX+07H.
52E4
LD BC,0000H 01 00 00
Load Register Pair BC with the value of CODE, the operand 52E5H-52E6H that PARAM@ fills: 0000H when CODE is not given.
52E7
LD A,B 78
Load Register A with Register B, the high byte of CODE's value, the code sent first.
52E8
OR A B7
OR Register A with itself to set the flags: the Z FLAG when the high byte is 00H.
52E9
If the NZ FLAG is set, GOSUB to 003BH, the ROM's routine that sends the character in Register A to the printer.
52EC
LD A,C 79
Load Register A with Register C, the low byte of CODE's value, the code sent second.
52ED
OR A B7
OR Register A with itself to set the flags: the Z FLAG when the low byte is 00H.
52EE
If the NZ FLAG is set, GOSUB to 003BH, the ROM's routine that sends the character in Register A to the printer.
52F1
LD A,(IY+06H) FD 7E 06
Load Register A with the value of TOP from Index Register IY+06H: not 00H when TOP was given.
52F4
OR A B7
OR Register A with itself to set the flags: the Z FLAG when TOP was not given.
52F5
RET Z C8
If the Z FLAG is set (no TOP), RETurn to CMNDI@ through the overlay request handler.
52F6
LD A,0CH 3E 0C
Load Register A with 0CH, the form feed that moves the printer to the top of the next page.
52F8
GOSUB to 003BH, the ROM's routine that sends the character in Register A (0CH) to the printer.
52FB
RET C9
RETurn to CMNDI@ through the overlay request handler after the form feed.

52FCH - Show the Settings of @PR

One line on the display: $02 @PR Page=n,Lines=n,Width=n, the name taken from @PR's entry of the DCB table (4388H), the numbers in decimal from +03H, +07H and +06H of the control block at Index Register IX.

52FC
LD HL,5614H 21 14 56
Point Register Pair HL to 5614H, the text $02 @ ended by 03H.
52FF
GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL up to its 03H.
5302
LD HL,4388H 21 88 43
Point Register Pair HL to 4388H, the two character name of device 2 in SYS0/SYS's DCB table, PR.
5305
LD A,(HL) 7E
Load Register A with the first character of the name at Register Pair HL (4388H).
5306
GOSUB to 0033H, the ROM's routine that shows the character in Register A on the display.
5309
INC HL 23
INCrement Register Pair HL by 1, to the second character of the name (4389H).
530A
LD A,(HL) 7E
Load Register A with the second character of the name at Register Pair HL (4389H).
530B
GOSUB to 0033H, the ROM's routine that shows the character in Register A on the display.
530E
LD HL,561AH 21 1A 56
Point Register Pair HL to 561AH, the text Page= with a space before it and 03H after it.
5311
GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL up to its 03H.
5314
LD E,(IX+03H) DD 5E 03
Load Register E with the page length of @PR at Index Register IX+03H.
5317
GOSUB to 5338H to show the number in Register E in decimal.
531A
LD HL,5621H 21 21 56
Point Register Pair HL to 5621H, the text ,Lines= ended by 03H.
531D
GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL up to its 03H.
5320
LD E,(IX+07H) DD 5E 07
Load Register E with the lines used on a page of @PR at Index Register IX+07H.
5323
GOSUB to 5338H to show the number in Register E in decimal.
5326
LD HL,5629H 21 29 56
Point Register Pair HL to 5629H, the text ,Width= ended by 03H.
5329
GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL up to its 03H.
532C
LD E,(IX+06H) DD 5E 06
Load Register E with the width of @PR at Index Register IX+06H.
532F
GOSUB to 5338H to show the number in Register E in decimal.
5332
LD A,0DH 3E 0D
Load Register A with 0DH, the carriage return that ends the line.
5334
GOSUB to 0033H, the ROM's routine that shows the character in Register A (0DH) on the display.
5337
RET C9
RETurn to CMNDI@ through the overlay request handler.

5338H - Show a Byte in Decimal

Shows the number in Register E (0-255) on the display in decimal without leading zeros.

5338
LD D,00H 16 00
Load Register D with 00H: Register Pair DE = the number in Register E.
533A
JUMP to 54E8H to show the number in Register Pair DE in decimal; its RETurn goes back to the caller.

533DH - RS232

Routine 5, entered from CMNDI@ through the overlay request handler with Register Pair HL at the rest of the command line. Index Register IX points to 4305H: +00H the baud rate byte for port E9H (bits 7-4 the sending rate, bits 3-0 the receiving rate, both an index into the table at 555BH), +01H the control byte for port EAH. Without parameters the settings are shown and sent to the interface again (53E1H); with parameters they are changed first (53E4H).

533D
LD IX,4305H DD 21 05 43
Point Index Register IX to 4305H, the RS-232 settings: +00H the baud rate byte, +01H the control byte.
5341
GOSUB to 54F2H to look at the character at Register Pair HL: the C FLAG at the end of the line, else the NC FLAG and Register Pair HL past it.
5344
DEC HL 2B
DECrement Register Pair HL by 1, back to the character 54F2H passed over (the flags are kept).
5345
If the NC FLAG is set (parameters follow), JUMP to 53E4H to change the settings.

5348H - Show the RS-232 Settings

One line on the display: $03 @RS Baud=n,Word=n,Stops=n,Parity=None, Even or Odd, then ,BRK when a break is sent (bit 2 clear), ,DTR when bit 1 is clear and ,RTS when bit 0 is clear; then the settings are sent to the interface (54DAH).

5348
LD HL,5631H 21 31 56
Point Register Pair HL to 5631H, the text $03 @ ended by 03H.
534B
GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL up to its 03H.
534E
LD HL,4393H 21 93 43
Point Register Pair HL to 4393H, the two character name of device 3 in SYS0/SYS's DCB table, RS.
5351
LD A,(HL) 7E
Load Register A with the first character of the name at Register Pair HL (4393H).
5352
GOSUB to 0033H, the ROM's routine that shows the character in Register A on the display.
5355
INC HL 23
INCrement Register Pair HL by 1, to the second character of the name (4394H).
5356
LD A,(HL) 7E
Load Register A with the second character of the name at Register Pair HL (4394H).
5357
GOSUB to 0033H, the ROM's routine that shows the character in Register A on the display.
535A
LD HL,5637H 21 37 56
Point Register Pair HL to 5637H, the text Baud= with a space before it and 03H after it.
535D
GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL up to its 03H.
5360
LD A,(IX+00H) DD 7E 00
Load Register A with the baud rate byte at Index Register IX+00H (4305H).
5363
AND 0FH E6 0F
AND Register A with 0FH, bits 3-0: the index of the receiving rate, the one shown.
5365
LD B,A 47
Load Register B with Register A, the index (0-15).
5366
INC B 04
INCrement Register B by 1, so that the loop below takes index + 1 words.
5367
LD HL,555BH 21 5B 55
Point Register Pair HL to 555BH, the table of the 16 baud rates, one word each.
536A
LD E,(HL) 5E
Load Register E with the low byte of the baud rate at Register Pair HL.
536B
INC HL 23
INCrement Register Pair HL by 1, to the high byte.
536C
LD D,(HL) 56
Load Register D with the high byte of the baud rate at Register Pair HL.
536D
INC HL 23
INCrement Register Pair HL by 1, to the next word of the table.
536E
DECrement Register B and LOOP back to 536AH until it is zero: Register Pair DE = the baud rate of the index.
5370
GOSUB to 54E8H to show the number in Register Pair DE, the baud rate, in decimal.
5373
LD HL,563EH 21 3E 56
Point Register Pair HL to 563EH, the text ,Word= ended by 03H.
5376
GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL up to its 03H.
5379
LD A,(IX+01H) DD 7E 01
Load Register A with the control byte at Index Register IX+01H (4306H).
537C
RLCA 07
Rotate Register A left one bit (RLCA), the first of the shifts.
537D
RLCA 07
Rotate Register A left one more bit (RLCA), the second shift.
537E
RLCA 07
Rotate Register A left a third bit (RLCA): bits 6-5 of the control byte are now bits 1-0 of Register A.
537F
AND 03H E6 03
AND Register A with 03H, bits 1-0: the word length code, 00 for 5 bits, 01 for 7, 10 for 6, 11 for 8.
5381
If the Z FLAG is set (code 00, 5 bits), JUMP to 5389H with Register A = 00H.
5383
CP 03H FE 03
Compare Register A against 03H, the code of 8 bits.
5385
If the Z FLAG is set (code 11, 8 bits), JUMP to 5389H with Register A = 03H.
5387
XOR 03H EE 03
XOR Register A with 03H, which turns code 01 (7 bits) into 02H and code 10 (6 bits) into 01H.
5389
ADD A,35H C6 35
ADD 35H, the digit 5, to Register A: the word length 5, 6, 7 or 8 as a digit.
538B
GOSUB to 0033H, the ROM's routine that shows the character in Register A, the digit, on the display.
538E
LD HL,5645H 21 45 56
Point Register Pair HL to 5645H, the text ,Stops= ended by 03H.
5391
GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL up to its 03H.
5394
LD A,31H 3E 31
Load Register A with 31H, the digit 1: one stop bit.
5396
BIT 4,(IX+01H) DD CB 01 66
Test bit 4 of the control byte at Index Register IX+01H (4306H): set for two stop bits.
539A
If the Z FLAG is set (bit 4 clear, one stop bit), JUMP to 539DH to show the 1.
539C
INC A 3C
INCrement Register A by 1, the digit 2: two stop bits.
539D
GOSUB to 0033H, the ROM's routine that shows the character in Register A, the digit, on the display.
53A0
LD HL,564DH 21 4D 56
Point Register Pair HL to 564DH, the text ,Parity= ended by 03H.
53A3
GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL up to its 03H.
53A6
LD HL,566BH 21 6B 56
Point Register Pair HL to 566BH, the text None ended by 03H.
53A9
BIT 3,(IX+01H) DD CB 01 5E
Test bit 3 of the control byte at Index Register IX+01H (4306H): set when no parity is used.
53AD
If the NZ FLAG is set (no parity), JUMP to 53BBH to show None.
53AF
LD HL,5670H 21 70 56
Point Register Pair HL to 5670H, the text Even ended by 03H.
53B2
BIT 7,(IX+01H) DD CB 01 7E
Test bit 7 of the control byte at Index Register IX+01H (4306H): set for even parity, clear for odd.
53B6
If the NZ FLAG is set (even parity), JUMP to 53BBH to show Even.
53B8
LD HL,5675H 21 75 56
Point Register Pair HL to 5675H, the text Odd ended by 03H.
53BB
GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL (None, Even or Odd) up to its 03H.
53BE
BIT 2,(IX+01H) DD CB 01 56
Test bit 2 of the control byte at Index Register IX+01H (4306H): clear when a break is sent.
53C2
LD HL,565CH 21 5C 56
Point Register Pair HL to 565CH, the text ,BRK ended by 03H (LD does not change the flags).
53C5
If the Z FLAG is set (bit 2 clear, a break), GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL.
53C8
BIT 1,(IX+01H) DD CB 01 4E
Test bit 1 of the control byte at Index Register IX+01H (4306H), the bit that the DTR parameter sets: clear for DTR on.
53CC
LD HL,5661H 21 61 56
Point Register Pair HL to 5661H, the text ,DTR ended by 03H (LD does not change the flags).
53CF
If the Z FLAG is set (bit 1 clear, DTR on), GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL.
53D2
BIT 0,(IX+01H) DD CB 01 46
Test bit 0 of the control byte at Index Register IX+01H (4306H), the bit that the RTS parameter sets: clear for RTS on.
53D6
LD HL,5666H 21 66 56
Point Register Pair HL to 5666H, the text ,RTS ended by 03H (LD does not change the flags).
53D9
If the Z FLAG is set (bit 0 clear, RTS on), GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL.
53DC
LD A,0DH 3E 0D
Load Register A with 0DH, the carriage return that ends the line.
53DE
GOSUB to 0033H, the ROM's routine that shows the character in Register A (0DH) on the display.
53E1
JUMP to 54DAH to send the settings, unchanged, to the RS-232 interface.

53E4H - Change the RS-232 Settings

PARAM@ takes BAUD, WORD, STOPS, EVEN, ODD, PARITY, DTR, RTS, BREAK and WAIT with the table at 55C0H (an unknown parameter is error 2EH). Each value goes into the operand of an LD DE,0000H (EVEN's into that of an LD BC,0000H) below; BAUD's operand is first set to 0000H and the other nine to 80H in their low byte, the mark of a parameter not given. Each parameter given then changes its bits of the control byte, and a wrong value is error 2DH.

53E4
PUSH HL E5
Save Register Pair HL, the start of the parameters, to the top of the stack.
53E5
LD HL,0000H 21 00 00
Load Register Pair HL with 0000H, the value of BAUD when it is not given.
53E8
LD (5409H),HL 22 09 54
Store Register Pair HL (0000H) into 5409H-540AH, the operand of LD DE,0000H at 5408H, BAUD's value.
53EB
LD A,80H 3E 80
Load Register A with 80H, the mark of a parameter that was not given.
53ED
LD HL,55CEH 21 CE 55
Point Register Pair HL to 55CEH, the address field of WORD, the second entry of the parameter table at 55C0H.
53F0
LD B,09H 06 09
Load Register B with 09H, the nine parameters after BAUD.
53F2
LD E,(HL) 5E
Load Register E with the low byte of the parameter's address at Register Pair HL.
53F3
INC HL 23
INCrement Register Pair HL by 1, to the high byte of the address.
53F4
LD D,(HL) 56
Load Register D with the high byte of the parameter's address at Register Pair HL.
53F5
LD (DE),A 12
Store Register A (80H) at Register Pair DE, the low byte of the operand that holds the parameter's value.
53F6
LD C,07H 0E 07
Load Register C with 07H, the bytes from here to the address field of the next entry, less one.
53F8
INC HL 23
INCrement Register Pair HL by 1, on through the next entry's name.
53F9
DEC C 0D
DECrement Register C by 1, the bytes still to pass over.
53FA
If the NZ FLAG is set (bytes left), LOOP back to 53F8H.
53FC
DECrement Register B and LOOP back to 53F2H until all nine operands hold 80H.
53FE
POP HL E1
Restore Register Pair HL, the start of the parameters, from the top of the stack.
53FF
LD DE,55C0H 11 C0 55
Point Register Pair DE to 55C0H, RS232's parameter table for PARAM@.
5402
GOSUB to 4476H, PARAM@, to take the parameters at Register Pair HL by the table at Register Pair DE: the NZ FLAG on an error.
5405
If the NZ FLAG is set (an unknown parameter), JUMP to 5554H to post error 2EH, Invalid parameter.

5408H - BAUD

The value must be one of the 16 rates of the table at 555BH (else error 2DH); its index n (0-15) is stored as nnH, the same rate for sending and receiving, into the baud rate byte. 0 or no BAUD keeps the byte as it is.

5408
LD DE,0000H 11 00 00
Load Register Pair DE with the value of BAUD, the operand 5409H-540AH that PARAM@ fills: 0000H when BAUD is not given.
540B
LD A,D 7A
Load Register A with Register D, the high byte of the baud rate.
540C
OR E B3
OR Register A with Register E, the low byte: the Z FLAG when the value is 0000H.
540D
If the Z FLAG is set (no BAUD), JUMP to 5433H to keep the baud rate byte.
540F
LD IY,5579H FD 21 79 55
Point Index Register IY to 5579H, the last word of the baud rate table, 19200.
5413
LD B,10H 06 10
Load Register B with 10H, the 16 rates of the table, searched from the last.
5415
LD L,(IY+00H) FD 6E 00
Load Register L with the low byte of the table's rate at Index Register IY+00H.
5418
LD H,(IY+01H) FD 66 01
Load Register H with the high byte of the table's rate at Index Register IY+01H.
541B
OR A B7
OR Register A with itself to clear the C FLAG for the SBC below.
541C
SBC HL,DE ED 52
Subtract Register Pair DE, the rate given, from Register Pair HL, the table's: the Z FLAG when they are equal.
541E
If the Z FLAG is set (the rate is in the table), JUMP to 5429H with Register B = its index + 1.
5420
DEC IY FD 2B
DECrement Index Register IY by 1, the first byte back.
5422
DEC IY FD 2B
DECrement Index Register IY by 1 more, to the word before.
5424
DECrement Register B and LOOP back to 5415H until the 16 rates are compared.
5426
JUMP to 5551H to post error 2DH, Invalid data provided: the rate is not in the table.
5429
DEC B 05
DECrement Register B by 1: Register B = the index of the rate, 0-15.
542A
LD A,B 78
Load Register A with Register B, the index of the rate.
542B
RLCA 07
Rotate Register A left one bit (RLCA), the first of the shifts.
542C
RLCA 07
Rotate Register A left one more bit (RLCA), the second shift.
542D
RLCA 07
Rotate Register A left a third bit (RLCA), the third shift.
542E
RLCA 07
Rotate Register A left a fourth bit (RLCA): the index is now in bits 7-4 of Register A.
542F
OR B B0
OR Register A with Register B: the index in both halves, the sending and the receiving rate.
5430
LD (IX+00H),A DD 77 00
Store Register A into the baud rate byte at Index Register IX+00H (4305H).

5433H - WORD

The control byte is built in Register L from its old value. WORD must be 5, 6, 7 or 8 (else error 2DH) and sets bits 6-5: 00 for 5, 10 for 6, 01 for 7, 11 for 8.

5433
LD L,(IX+01H) DD 6E 01
Load Register L with the control byte at Index Register IX+01H (4306H), the value the parameters change.
5436
LD DE,0000H 11 00 00
Load Register Pair DE with the value of WORD, the operand 5437H-5438H that PARAM@ fills (0000H as assembled): 80H in Register E when WORD is not given.
5439
LD A,E 7B
Load Register A with Register E, the low byte of WORD's value.
543A
CP 80H FE 80
Compare Register A against 80H, the mark of a parameter not given.
543C
If the Z FLAG is set (no WORD), JUMP to 5459H to keep the word length.
543E
INC D 14
INCrement Register D by 1, to test the high byte of the value.
543F
DEC D 15
DECrement Register D by 1, back to its value: the Z FLAG when it is 00H.
5440
If the NZ FLAG is set (a value above 255), JUMP to 5551H to post error 2DH, Invalid data provided.
5443
SUB 05H D6 05
SUBtract 05H from Register A: 0 for 5 bits, 3 for 8 bits.
5445
If the Z FLAG is set (5 bits), JUMP to 5450H with Register A = 00H, code 00.
5447
CP 03H FE 03
Compare Register A against 03H, the value 8 bits less 5.
5449
If the Z FLAG is set (8 bits), JUMP to 5450H with Register A = 03H, code 11.
544B
If the NC FLAG is set (below 5 or above 8), JUMP to 5551H to post error 2DH, Invalid data provided.
544E
XOR 03H EE 03
XOR Register A with 03H: 6 bits (01H) becomes 02H, code 10, and 7 bits (02H) becomes 01H, code 01.
5450
RRCA 0F
Rotate Register A right one bit (RRCA), the first of the shifts.
5451
RRCA 0F
Rotate Register A right one more bit (RRCA), the second shift.
5452
RRCA 0F
Rotate Register A right a third bit (RRCA): the code is now in bits 6-5 of Register A.
5453
LD B,A 47
Load Register B with Register A, the new bits 6-5.
5454
LD A,9FH 3E 9F
Load Register A with 9FH, the mask that keeps every bit of the control byte but bits 6-5.
5456
AND L A5
AND Register A with Register L, the control byte: its bits 6-5 cleared.
5457
OR B B0
OR Register A with Register B, the new word length bits.
5458
LD L,A 6F
Load Register L with Register A, the control byte with the new word length.

5459H - STOPS

STOPS 1 clears bit 4 and STOPS 2 sets it; a value of 3 or more is error 2DH. STOPS=0 is not refused: 0 less 1 is FFH, so every bit of the control byte is set (8 bits, two stop bits, no parity, even, no break, DTR and RTS off).

5459
LD DE,0000H 11 00 00
Load Register Pair DE with the value of STOPS, the operand 545AH-545BH that PARAM@ fills (0000H as assembled): 80H in Register E when STOPS is not given.
545C
LD A,E 7B
Load Register A with Register E, the low byte of STOPS's value.
545D
CP 80H FE 80
Compare Register A against 80H, the mark of a parameter not given.
545F
If the Z FLAG is set (no STOPS), JUMP to 5476H to keep the stop bits.
5461
INC D 14
INCrement Register D by 1, to test the high byte of the value.
5462
DEC D 15
DECrement Register D by 1, back to its value: the Z FLAG when it is 00H.
5463
If the NZ FLAG is set (a value above 255), JUMP to 5551H to post error 2DH, Invalid data provided.
5466
CP 03H FE 03
Compare Register A against 03H: the NC FLAG for 3 or more.
5468
If the NC FLAG is set (3 or more), JUMP to 5551H to post error 2DH, Invalid data provided.
546B
DEC A 3D
DECrement Register A by 1: 00H for one stop bit, 01H for two (FFH for 0).
546C
RRCA 0F
Rotate Register A right one bit (RRCA), the first of the shifts.
546D
RRCA 0F
Rotate Register A right one more bit (RRCA), the second shift.
546E
RRCA 0F
Rotate Register A right a third bit (RRCA), the third shift.
546F
RRCA 0F
Rotate Register A right a fourth bit (RRCA): bit 0 is now bit 4 of Register A.
5470
LD B,A 47
Load Register B with Register A, the new bit 4.
5471
LD A,EFH 3E EF
Load Register A with EFH, the mask that keeps every bit of the control byte but bit 4.
5473
AND L A5
AND Register A with Register L, the control byte: its bit 4 cleared.
5474
OR B B0
OR Register A with Register B, the new stop bit setting.
5475
LD L,A 6F
Load Register L with Register A, the control byte with the new stop bits.

5476H - PARITY

PARITY=Y (or PARITY alone) clears bit 3, parity used; PARITY=N sets it, no parity.

5476
LD DE,0000H 11 00 00
Load Register Pair DE with the value of PARITY, the operand 5477H-5478H that PARAM@ fills (0000H as assembled): 80H in Register E when PARITY is not given.
5479
LD A,E 7B
Load Register A with Register E, the low byte of PARITY's value.
547A
CP 80H FE 80
Compare Register A against 80H, the mark of a parameter not given.
547C
If the Z FLAG is set (no PARITY), JUMP to 5487H to keep the parity bit.
547E
CPL 2F
Complement Register A (CPL): 00H for PARITY=Y (FFH), FFH for PARITY=N.
547F
AND 08H E6 08
AND Register A with 08H, bit 3: set for PARITY=N, no parity.
5481
LD B,A 47
Load Register B with Register A, the new bit 3.
5482
LD A,F7H 3E F7
Load Register A with F7H, the mask that keeps every bit of the control byte but bit 3.
5484
AND L A5
AND Register A with Register L, the control byte: its bit 3 cleared.
5485
OR B B0
OR Register A with Register B, the new parity bit.
5486
LD L,A 6F
Load Register L with Register A, the control byte with the new parity setting.

5487H - EVEN and ODD

Bit 7 is set for even parity and cleared for odd. EVEN and ODD with the same value (both given as Y, or both as N) are error 2DH. Otherwise bit 6 of EVEN's value decides alone: EVEN=Y gives even, EVEN=N or no EVEN gives odd, so ODD=N alone gives odd parity, where the manual says it is the same as EVEN=Y.

5487
LD DE,0000H 11 00 00
Load Register Pair DE with the value of ODD, the operand 5488H-5489H that PARAM@ fills (0000H as assembled): 80H in Register E when ODD is not given.
548A
LD BC,0000H 01 00 00
Load Register Pair BC with the value of EVEN, the operand 548BH-548CH that PARAM@ fills (0000H as assembled): 80H in Register C when EVEN is not given.
548D
LD A,C 79
Load Register A with Register C, the low byte of EVEN's value.
548E
CP E BB
Compare Register A against Register E, the low byte of ODD's value: the Z FLAG when they are the same.
548F
If the NZ FLAG is set (EVEN and ODD differ), JUMP to 5498H to set the parity sense from EVEN.
5491
CP 80H FE 80
Compare Register A against 80H, the mark of a parameter not given.
5493
If the Z FLAG is set (neither EVEN nor ODD given), JUMP to 54A1H to keep the parity sense.
5495
JUMP to 5551H to post error 2DH, Invalid data provided: EVEN and ODD were given the same value.
5498
AND 40H E6 40
AND Register A with 40H, bit 6 of EVEN's value: set for EVEN=Y (FFH), clear for EVEN=N (00H) or not given (80H).
549A
RLCA 07
Rotate Register A left one bit (RLCA): bit 6 is now bit 7 of Register A.
549B
LD B,A 47
Load Register B with Register A, the new bit 7.
549C
LD A,7FH 3E 7F
Load Register A with 7FH, the mask that keeps every bit of the control byte but bit 7.
549E
AND L A5
AND Register A with Register L, the control byte: its bit 7 cleared.
549F
OR B B0
OR Register A with Register B, the new parity sense.
54A0
LD L,A 6F
Load Register L with Register A, the control byte with the new parity sense.

54A1H - DTR, RTS and BREAK

Each switch given as Y (or alone) clears its bit and as N sets it: DTR bit 1, RTS bit 0, BREAK bit 2. WAIT is taken into the operand at 54D8H and not used on the Model I.

54A1
LD DE,0000H 11 00 00
Load Register Pair DE with the value of DTR, the operand 54A2H-54A3H that PARAM@ fills (0000H as assembled): 80H in Register E when DTR is not given.
54A4
LD A,E 7B
Load Register A with Register E, the low byte of DTR's value.
54A5
CP 80H FE 80
Compare Register A against 80H, the mark of a parameter not given.
54A7
If the Z FLAG is set (no DTR), JUMP to 54B2H to keep bit 1.
54A9
CPL 2F
Complement Register A (CPL): 00H for DTR=Y (FFH), FFH for DTR=N.
54AA
AND 02H E6 02
AND Register A with 02H, bit 1: set for DTR=N.
54AC
LD B,A 47
Load Register B with Register A, the new bit 1.
54AD
LD A,FDH 3E FD
Load Register A with FDH, the mask that keeps every bit of the control byte but bit 1.
54AF
AND L A5
AND Register A with Register L, the control byte: its bit 1 cleared.
54B0
OR B B0
OR Register A with Register B, the new DTR bit.
54B1
LD L,A 6F
Load Register L with Register A, the control byte with the new DTR bit.
54B2
LD DE,0000H 11 00 00
Load Register Pair DE with the value of RTS, the operand 54B3H-54B4H that PARAM@ fills (0000H as assembled): 80H in Register E when RTS is not given.
54B5
LD A,E 7B
Load Register A with Register E, the low byte of RTS's value.
54B6
CP 80H FE 80
Compare Register A against 80H, the mark of a parameter not given.
54B8
If the Z FLAG is set (no RTS), JUMP to 54C3H to keep bit 0.
54BA
CPL 2F
Complement Register A (CPL): 00H for RTS=Y (FFH), FFH for RTS=N.
54BB
AND 01H E6 01
AND Register A with 01H, bit 0: set for RTS=N.
54BD
LD B,A 47
Load Register B with Register A, the new bit 0.
54BE
LD A,FEH 3E FE
Load Register A with FEH, the mask that keeps every bit of the control byte but bit 0.
54C0
AND L A5
AND Register A with Register L, the control byte: its bit 0 cleared.
54C1
OR B B0
OR Register A with Register B, the new RTS bit.
54C2
LD L,A 6F
Load Register L with Register A, the control byte with the new RTS bit.
54C3
LD DE,0000H 11 00 00
Load Register Pair DE with the value of BREAK, the operand 54C4H-54C5H that PARAM@ fills (0000H as assembled): 80H in Register E when BREAK is not given.
54C6
LD A,E 7B
Load Register A with Register E, the low byte of BREAK's value.
54C7
CP 80H FE 80
Compare Register A against 80H, the mark of a parameter not given.
54C9
If the Z FLAG is set (no BREAK), JUMP to 54D4H to keep bit 2.
54CB
CPL 2F
Complement Register A (CPL): 00H for BREAK=Y (FFH), FFH for BREAK=N.
54CC
AND 04H E6 04
AND Register A with 04H, bit 2: set for BREAK=N, clear for a break.
54CE
LD B,A 47
Load Register B with Register A, the new bit 2.
54CF
LD A,FBH 3E FB
Load Register A with FBH, the mask that keeps every bit of the control byte but bit 2.
54D1
AND L A5
AND Register A with Register L, the control byte: its bit 2 cleared.
54D2
OR B B0
OR Register A with Register B, the new break bit.
54D3
LD L,A 6F
Load Register L with Register A, the control byte with the new break bit.
54D4
LD (IX+01H),L DD 75 01
Store Register L, the new control byte, into Index Register IX+01H (4306H).
54D7
LD DE,0000H 11 00 00
Load Register Pair DE with the value of WAIT, the operand 54D8H-54D9H that PARAM@ fills (0000H as assembled); the Model I code does not use it.

54DAH - Send the Settings to the Interface

A byte to port E8H resets the RS-232 interface; the baud rate byte goes to port E9H and the control byte to port EAH.

54DA
XOR A AF
Set Register A to 00H by XORing it with itself, the byte for the reset.
54DB
OUT (E8H),A D3 E8
Send Register A (00H) to port E8H, which resets the RS-232 interface.
54DD
LD A,(IX+00H) DD 7E 00
Load Register A with the baud rate byte at Index Register IX+00H (4305H).
54E0
OUT (E9H),A D3 E9
Send Register A, the baud rate byte, to port E9H, the baud rate generator.
54E2
LD A,(IX+01H) DD 7E 01
Load Register A with the control byte at Index Register IX+01H (4306H).
54E5
OUT (EAH),A D3 EA
Send Register A, the control byte, to port EAH, the UART's control register.
54E7
RET C9
RETurn to CMNDI@ through the overlay request handler.

54E8H - Show a Number in Decimal

Shows the number in Register Pair DE (0-65535) on the display in decimal without leading zeros: 54FDH puts the digits at 5679H, and DSPLY@ shows them.

54E8
LD HL,5679H 21 79 56
Point Register Pair HL to 5679H, the place for the digits of the number.
54EB
GOSUB to 54FDH to put the number in Register Pair DE as decimal digits, ended by 03H, at Register Pair HL.
54EE
GOSUB to 4467H, DSPLY@, to show the digits at Register Pair HL up to their 03H.
54F1
RET C9
RETurn to the caller with the number shown on the display.

54F2H - The End of the Line

Tests the character at Register Pair HL: a control code (below 20H) or a semicolon is the end of the line, returned with the C FLAG and Register Pair HL unchanged; any other character is returned in Register A with the NC FLAG and Register Pair HL past it.

54F2
LD A,(HL) 7E
Load Register A with the character at Register Pair HL.
54F3
CP 20H FE 20
Compare Register A against 20H, the space: the C FLAG for a control code, such as the 0DH that ends the line.
54F5
RET C D8
If the C FLAG is set (a control code), RETurn with the C FLAG: the end of the line.
54F6
CP 3BH FE 3B
Compare Register A against 3BH, the semicolon that separates commands on a line.
54F8
SCF 37
Set the C FLAG (SCF), the end of the line, should it be a semicolon (the Z FLAG is kept).
54F9
RET Z C8
If the Z FLAG is set (a semicolon), RETurn with the C FLAG: the end of the line.
54FA
INC HL 23
INCrement Register Pair HL by 1, past the character.
54FB
OR A B7
OR Register A with itself to clear the C FLAG: not the end of the line.
54FC
RET C9
RETurn with the NC FLAG and the character in Register A.

54FDH - Decimal Digits

Puts the number in Register Pair DE (0-65535) at Register Pair HL as decimal digits without leading zeros (at least one digit), ended by 03H, and returns Register Pair HL at the digits and Register Pair DE at the 03H. The number is turned into six BCD digits at 5679H-567BH (sixteen doublings by ADC and DAA), and the digits into ASCII at 567CH-5681H by RLD; the digits after the leading zeros are then copied to Register Pair HL, which may be 5679H itself.

54FD
PUSH HL E5
Save Register Pair HL, the place for the digits, to the top of the stack.
54FE
LD HL,5679H 21 79 56
Point Register Pair HL to 5679H, the three BCD bytes of the number, the low two digits first.
5501
PUSH HL E5
Save Register Pair HL (5679H) to the top of the stack.
5502
LD B,03H 06 03
Load Register B with 03H, the three BCD bytes to clear.
5504
LD (HL),00H 36 00
Store 00H at Register Pair HL, a BCD byte of the number.
5506
INC HL 23
INCrement Register Pair HL by 1, to the next BCD byte.
5507
DECrement Register B and LOOP back to 5504H until the three bytes are 00H.
5509
POP HL E1
Restore Register Pair HL (5679H) from the top of the stack.
550A
LD C,10H 0E 10
Load Register C with 10H, the 16 bits of the number in Register Pair DE.
550C
LD B,03H 06 03
Load Register B with 03H, the three BCD bytes to double.
550E
PUSH HL E5
Save Register Pair HL (5679H) to the top of the stack.
550F
RL E CB 13
Rotate Register E left through the C FLAG (RL E).
5511
RL D CB 12
Rotate Register D left through the C FLAG (RL D): the C FLAG = the next bit of the number, from the top.
5513
LD A,(HL) 7E
Load Register A with the BCD byte at Register Pair HL.
5514
ADC A,A 8F
Add Register A to itself with the C FLAG (ADC A,A): the byte doubled, plus the bit or the carry from below.
5515
DAA 27
Decimal Adjust Register A (DAA) to two BCD digits, the C FLAG the carry to the next byte.
5516
LD (HL),A 77
Store Register A, the doubled BCD byte, at Register Pair HL.
5517
INC HL 23
INCrement Register Pair HL by 1, to the next BCD byte.
5518
DECrement Register B and LOOP back to 5513H until the three bytes are doubled.
551A
POP HL E1
Restore Register Pair HL (5679H) from the top of the stack.
551B
DEC C 0D
DECrement Register C by 1, the bits still to take.
551C
If the NZ FLAG is set (bits left), LOOP back to 550CH.
551E
LD DE,567CH 11 7C 56
Point Register Pair DE to 567CH, the six ASCII digits.
5521
PUSH DE D5
Save Register Pair DE (567CH) to the top of the stack.
5522
INC HL 23
INCrement Register Pair HL by 1, to 567AH, the middle BCD byte.
5523
INC HL 23
INCrement Register Pair HL by 1 more, to 567BH, the BCD byte of the two highest digits.
5524
LD A,30H 3E 30
Load Register A with 30H, the digit 0, whose low half RLD replaces with each BCD digit.
5526
LD B,03H 06 03
Load Register B with 03H, the three BCD bytes.
5528
RLD ED 6F
Rotate the digits of Register A and the BCD byte at Register Pair HL left (RLD): the high digit goes into Register A.
552A
LD (DE),A 12
Store Register A, the high digit in ASCII, at Register Pair DE.
552B
INC DE 13
INCrement Register Pair DE by 1, to the next ASCII digit.
552C
RLD ED 6F
Rotate the digits of Register A and the BCD byte at Register Pair HL left again (RLD): the low digit goes into Register A.
552E
LD (DE),A 12
Store Register A, the low digit in ASCII, at Register Pair DE.
552F
INC DE 13
INCrement Register Pair DE by 1, to the next ASCII digit.
5530
DEC HL 2B
DECrement Register Pair HL by 1, to the next lower BCD byte.
5531
DECrement Register B and LOOP back to 5528H until the six digits are in ASCII.
5533
POP HL E1
Restore Register Pair HL (567CH), the first ASCII digit, from the top of the stack.
5534
LD B,05H 06 05
Load Register B with 05H, the five leading digits that may be passed over: the last is always shown.
5536
LD A,30H 3E 30
Load Register A with 30H, the digit 0, for the comparisons.
5538
CP (HL) BE
Compare Register A (30H) against the digit at Register Pair HL: the Z FLAG for a 0.
5539
If the NZ FLAG is set (not a 0), JUMP to 553EH: the number starts here.
553B
INC HL 23
INCrement Register Pair HL by 1, past the leading 0.
553C
DECrement Register B and LOOP back to 5538H until five digits are passed.
553E
POP DE D1
Restore Register Pair DE, the place for the digits, from the top of the stack.
553F
PUSH DE D5
Save Register Pair DE to the top of the stack again, for the return.
5540
LD C,B 48
Load Register C with Register B, the digits after the first one left.
5541
INC C 0C
INCrement Register C by 1: Register C = the number of digits to copy.
5542
LD B,00H 06 00
Load Register B with 00H: Register Pair BC = the count.
5544
LDIR ED B0
Copy the Register Pair BC digits from Register Pair HL to Register Pair DE (LDIR).
5546
POP HL E1
Restore Register Pair HL, the start of the digits, from the top of the stack.
5547
LD A,03H 3E 03
Load Register A with 03H, the byte that ends a text for DSPLY@.
5549
LD (DE),A 12
Store Register A (03H) at Register Pair DE, after the last digit.
554A
RET C9
RETurn with Register Pair HL at the digits and Register Pair DE at the 03H.

554BH - The Error Exits

Four entries, each loading its error code into Register A: 554BH 2CH Illegal filespec (entered by nothing), 554EH 2FH I/o field not found, 5551H 2DH Invalid data provided, 5554H 2EH Invalid parameter. Each LD A,n after the first is the operand of an LD BC,nn entered from the entry above it. 5556H posts the error in Register A by ERROR@ with bit 6 set (no frame), and ERROR@ ends with ABORT@.

554B
LD A,2CH 3E 2C
Load Register A with 2CH, the error code Illegal filespec; no jump or call of SYS13/SYS reaches this entry.
554D
LD BC,2F3EH 01 3E 2F
554EH enters inside this LD BC,2F3EH: its bytes 3EH 2FH read as LD A,2FH, the error code I/o field not found; from above it only loads Register Pair BC.
5550
LD BC,2D3EH 01 3E 2D
5551H enters inside this LD BC,2D3EH: its bytes 3EH 2DH read as LD A,2DH, the error code Invalid data provided; from above it only loads Register Pair BC.
5553
LD BC,2E3EH 01 3E 2E
5554H enters inside this LD BC,2E3EH: its bytes 3EH 2EH read as LD A,2EH, the error code Invalid parameter; from above it only loads Register Pair BC.
5556
OR 40H F6 40
OR Register A, the error code, with 40H, bit 6, so that ERROR@ shows the message without its frame.
5558
JUMP to 4409H, ERROR@, to show the message of the error in Register A and end through ABORT@.

555BH - The Baud Rates

Data: the 16 baud rates RS232 accepts, one word each, in the order of their index 0-15, the value of each half of the baud rate byte.

555B-555C
DEFW 0032H 32 00
Index 0: 50 baud, the rate for the half byte value 0.
555D-555E
DEFW 004BH 4B 00
Index 1: 75 baud, the rate for the half byte value 1.
555F-5560
DEFW 006EH 6E 00
Index 2: 110 baud, the rate for the half byte value 2.
5561-5562
DEFW 0086H 86 00
Index 3: 134 baud, the rate for the half byte value 3.
5563-5564
DEFW 0096H 96 00
Index 4: 150 baud, the rate for the half byte value 4.
5565-5566
DEFW 012CH 2C 01
Index 5: 300 baud, the rate for the half byte value 5.
5567-5568
DEFW 0258H 58 02
Index 6: 600 baud, the rate for the half byte value 6.
5569-556A
DEFW 04B0H B0 04
Index 7: 1200 baud, the rate for the half byte value 7.
556B-556C
DEFW 0708H 08 07
Index 8: 1800 baud, the rate for the half byte value 8.
556D-556E
DEFW 07D0H D0 07
Index 9: 2000 baud, the rate for the half byte value 9.
556F-5570
DEFW 0960H 60 09
Index 10: 2400 baud, the rate for the half byte value 10.
5571-5572
DEFW 0E10H 10 0E
Index 11: 3600 baud, the rate for the half byte value 11.
5573-5574
DEFW 12C0H C0 12
Index 12: 4800 baud, the rate for the half byte value 12.
5575-5576
DEFW 1C20H 20 1C
Index 13: 7200 baud, the rate for the half byte value 13.
5577-5578
DEFW 2580H 80 25
Index 14: 9600 baud, the rate for the half byte value 14.
5579-557A
DEFW 4B00H 00 4B
Index 15: 19200 baud, the rate for the half byte value 15, the word where the search of BAUD (540FH) starts.

557BH - DO's Evaluation Block

Data: the block that Index Register IX points to for EVAL@ (5217H): EVAL@'s flags, the addresses of the source, destination and wildmask blocks (all three 5679H, so the one field given lands there), and the parameter table. Each entry of the table is the name (6 characters), the address its value is stored to and a type byte.

557B
DEFB 00H 00
The flags of DO's evaluation block, set by EVAL@: bits 0-2 tell which fields were given (5221H).
557C-557D
DEFW 5679H 79 56
The address of the source block, 5679H: the flag byte, then the file specification.
557E-557F
DEFW 5679H 79 56
The address of the destination block: 5679H again.
5580-5581
DEFW 5679H 79 56
The address of the wildmask block: 5679H again.
5582-5583
DEFW 5584H 84 55
The address of the parameter table at 5584H: HIGH and BREAK.
5584-5589
DEFM "HIGH " 48 49 47 48 20 20
The name of DO's parameter HIGH, the top of memory to set before the DO memory is taken.
558A-558B
DEFW 569AH 9A 56
HIGH's value goes to 569AH-569BH, which DO first fills with HMEM$.
558C
DEFB 40H 40
The type byte of HIGH: 40H, bit 6, a number (an address).
558D-5592
DEFM "BREAK " 42 52 45 41 4B 20
The name of DO's parameter BREAK: the BREAK key on (Y) or off (N).
5593-5594
DEFW 569CH 9C 56
BREAK's value goes to 569CH-569DH, which DO first fills with FFH.
5595
DEFB 20H 20
The type byte of BREAK: 20H, bit 5, a switch, so the name alone sets it.
5596
DEFB 00H 00
The end of DO's parameter table: a 00H in place of the next name.

5597H - FORMS's Parameter Table

Data: the table for PARAM@ (52BDH), eight bytes an entry: the name, then the address its value is stored to. The values of PAGE, LINES, WIDTH and TOP go into the work area at 5679H, CODE's into an operand of FORMS.

5597-559C
DEFM "PAGE " 50 41 47 45 20 20
The name PAGE: the page length, +03H of @PR's control block.
559D-559E
DEFW 5679H 79 56
PAGE's value goes to 5679H-567AH, Index Register IY+00H.
559F-55A4
DEFM "LINES " 4C 49 4E 45 53 20
The name LINES: the lines used on a page, +07H of @PR's control block.
55A5-55A6
DEFW 567BH 7B 56
LINES's value goes to 567BH-567CH, Index Register IY+02H.
55A7-55AC
DEFM "WIDTH " 57 49 44 54 48 20
The name WIDTH: the width of a line, +06H of @PR's control block.
55AD-55AE
DEFW 567DH 7D 56
WIDTH's value goes to 567DH-567EH, Index Register IY+04H.
55AF-55B4
DEFM "TOP " 54 4F 50 20 20 20
The name TOP: send a form feed to the printer.
55B5-55B6
DEFW 567FH 7F 56
TOP's value goes to 567FH-5680H, Index Register IY+06H, of which FORMS tests the low byte.
55B7-55BC
DEFM "CODE " 43 4F 44 45 20 20
The name CODE: one or two codes to send to the printer.
55BD-55BE
DEFW 52E5H E5 52
CODE's value goes to 52E5H-52E6H, the operand of LD BC,0000H at 52E4H.
55BF
DEFB 00H 00
The end of FORMS's parameter table: a 00H in place of the next name.

55C0H - RS232's Parameter Table

Data: the table for PARAM@ (53FFH), eight bytes an entry: the name, then the address its value is stored to, each the operand of an LD DE,0000H (EVEN's of an LD BC,0000H) in RS232. The first entry that starts with an abbreviation is taken, so B is BAUD and BR is BREAK.

55C0-55C5
DEFM "BAUD " 42 41 55 44 20 20
The name BAUD: the baud rate, sending and receiving.
55C6-55C7
DEFW 5409H 09 54
BAUD's value goes to 5409H-540AH, the operand of LD DE,0000H at 5408H.
55C8-55CD
DEFM "WORD " 57 4F 52 44 20 20
The name WORD: the word length of a character, 5 to 8 bits.
55CE-55CF
DEFW 5437H 37 54
WORD's value goes to 5437H-5438H, the operand of LD DE,0000H at 5436H; 53EDH starts at this word.
55D0-55D5
DEFM "STOPS " 53 54 4F 50 53 20
The name STOPS: one or two stop bits after each character.
55D6-55D7
DEFW 545AH 5A 54
STOPS's value goes to 545AH-545BH, the operand of LD DE,0000H at 5459H.
55D8-55DD
DEFM "EVEN " 45 56 45 4E 20 20
The name EVEN: even parity (Y) or odd parity (N).
55DE-55DF
DEFW 548BH 8B 54
EVEN's value goes to 548BH-548CH, the operand of LD BC,0000H at 548AH.
55E0-55E5
DEFM "ODD " 4F 44 44 20 20 20
The name ODD: odd parity; its value is only compared with EVEN.
55E6-55E7
DEFW 5488H 88 54
ODD's value goes to 5488H-5489H, the operand of LD DE,0000H at 5487H.
55E8-55ED
DEFM "PARITY" 50 41 52 49 54 59
The name PARITY: parity used (Y) or no parity at all (N).
55EE-55EF
DEFW 5477H 77 54
PARITY's value goes to 5477H-5478H, the operand of LD DE,0000H at 5476H.
55F0-55F5
DEFM "DTR " 44 54 52 20 20 20
The name DTR: the Data Terminal Ready line on (Y) or off (N).
55F6-55F7
DEFW 54A2H A2 54
DTR's value goes to 54A2H-54A3H, the operand of LD DE,0000H at 54A1H.
55F8-55FD
DEFM "RTS " 52 54 53 20 20 20
The name RTS: the Request To Send line on (Y) or off (N).
55FE-55FF
DEFW 54B3H B3 54
RTS's value goes to 54B3H-54B4H, the operand of LD DE,0000H at 54B2H.
5600-5605
DEFM "BREAK " 42 52 45 41 4B 20
The name BREAK: a break sent (Y) or normal sending (N).
5606-5607
DEFW 54C4H C4 54
BREAK's value goes to 54C4H-54C5H, the operand of LD DE,0000H at 54C3H.
5608-560D
DEFM "WAIT " 57 41 49 54 20 20
The name WAIT, which the manual does not list: on the Model I it is taken and not used.
560E-560F
DEFW 54D8H D8 54
WAIT's value goes to 54D8H-54D9H, the operand of LD DE,0000H at 54D7H.
5610
DEFB 00H 00
The end of RS232's parameter table: a 00H in place of the next name.

5611H - The Texts

Data: DO's default extension and the parts of the lines of FORMS and RS232, each ended by 03H for DSPLY@.

5611-5613
DEFM "TXT" 54 58 54
The extension FEXT@ gives a DO file that has none (526AH).
5614-5618
DEFM "$02 @" 24 30 32 20 40
The start of FORMS's line: the device number 02 and the @ before the name PR.
5619
DEFB 03H 03
The byte that ends the text $02 @ for DSPLY@ (52FFH).
561A-561F
DEFM " Page=" 20 50 61 67 65 3D
The label of the page length in FORMS's line.
5620
DEFB 03H 03
The byte that ends the text Page= for DSPLY@ (5311H).
5621-5627
DEFM ",Lines=" 2C 4C 69 6E 65 73 3D
The label of the lines used on a page in FORMS's line.
5628
DEFB 03H 03
The byte that ends the text ,Lines= for DSPLY@ (531DH).
5629-562F
DEFM ",Width=" 2C 57 69 64 74 68 3D
The label of the width of a line in FORMS's line.
5630
DEFB 03H 03
The byte that ends the text ,Width= for DSPLY@ (5329H).
5631-5635
DEFM "$03 @" 24 30 33 20 40
The start of RS232's line: the device number 03 and the @ before the name RS.
5636
DEFB 03H 03
The byte that ends the text $03 @ for DSPLY@ (534BH).
5637-563C
DEFM " Baud=" 20 42 61 75 64 3D
The label of the baud rate of the interface in RS232's line.
563D
DEFB 03H 03
The byte that ends the text Baud= for DSPLY@ (535DH).
563E-5643
DEFM ",Word=" 2C 57 6F 72 64 3D
The label of the word length in RS232's line.
5644
DEFB 03H 03
The byte that ends the text ,Word= for DSPLY@ (5376H).
5645-564B
DEFM ",Stops=" 2C 53 74 6F 70 73 3D
The label of the number of stop bits in RS232's line.
564C
DEFB 03H 03
The byte that ends the text ,Stops= for DSPLY@ (5391H).
564D-5654
DEFM ",Parity=" 2C 50 61 72 69 74 79 3D
The label of the parity setting in RS232's line.
5655
DEFB 03H 03
The byte that ends the text ,Parity= for DSPLY@ (53A3H).
5656-565A
DEFM ",Wait" 2C 57 61 69 74
The mark of the wait switch, which the Model I code never shows.
565B
DEFB 03H 03
The byte that ends the text ,Wait, which no DSPLY@ of the Model I reaches.
565C-565F
DEFM ",BRK" 2C 42 52 4B
The mark of a break being sent, shown when bit 2 of the control byte is clear.
5660
DEFB 03H 03
The byte that ends the text ,BRK for DSPLY@ (53C5H).
5661-5664
DEFM ",DTR" 2C 44 54 52
The mark of DTR on, shown when bit 1 of the control byte is clear.
5665
DEFB 03H 03
The byte that ends the text ,DTR for DSPLY@ (53CFH).
5666-5669
DEFM ",RTS" 2C 52 54 53
The mark of RTS on, shown when bit 0 of the control byte is clear.
566A
DEFB 03H 03
The byte that ends the text ,RTS for DSPLY@ (53D9H).
566B-566E
DEFM "None" 4E 6F 6E 65
The parity shown when bit 3 of the control byte is set: no parity.
566F
DEFB 03H 03
The byte that ends the text None for DSPLY@ (53BBH).
5670-5673
DEFM "Even" 45 76 65 6E
The parity shown when bit 3 is clear and bit 7 set: even parity.
5674
DEFB 03H 03
The byte that ends the text Even for DSPLY@ (53BBH).
5675-5677
DEFM "Odd" 4F 64 64
The parity shown when bits 3 and 7 are clear: odd parity.
5678
DEFB 03H 03
The byte that ends the text Odd for DSPLY@ (53BBH), the last byte of the file.

5679H - The Work Area

Not in the file: SYS13/SYS uses the memory after its last byte (5678H) for the field of DO's EVAL@ block, the values of FORMS, the digits of a number, and the values of HIGH and BREAK.

5679-5699
DEFS 33
The field of EVAL@ for DO (5679H flag, 567AH text); also FORMS's values at 5679H-5680H (Index Register IY), and the BCD number (5679H-567BH), its digits (567CH-5681H) and the text shown (from 5679H) of 54FDH.
569A-569B
DEFS 2
The value of DO's parameter HIGH: HMEM$ or the address given (520EH, 5231H).
569C-569D
DEFS 2
The value of DO's parameter BREAK: FFH or the value given, of which DO tests the low byte (5214H, 5237H).