DOSPLUS 3.5 for the Model III - SYS13/SYS Disassembled

Page Customization

Introduction/Summary

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

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, 1152 bytes, from 5200H to 567FH, with the transfer address 5200H and no gaps; the work area after the file starts at 5680H.

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-53EDHRS232 and its display (533DH, 5348H).
53EEH-54EEHRS232's parameters: BAUD, WORD, STOPS, PARITY, EVEN and ODD, DTR, RTS and BREAK, then the settings to the interface (53EEH, 5412H, 543DH, 5463H, 5480H, 5491H, 54ABH, 54E4H).
54EFH-5561HThe helpers: a number in decimal, the end of the line, the decimal digits; the error exits (54EFH, 54F9H, 5504H, 5552H).
5562H-567FHThe baud rates, DO's evaluation block, the parameter tables of FORMS and RS232, the texts (5562H, 5582H, 559EH, 55C7H, 5618H).

DO

DO (520AH) takes the file and the parameters HIGH and BREAK through EVAL@ with its block at 5582H; all three field blocks are the one at 5680H, 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$ (4411H). BREAK, by default Y, clears bit 0 of SFLAG1$ (4297H), 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$ (42A9H). 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 (44C5H). With parameters, PARAM@ takes PAGE, LINES, WIDTH, TOP and CODE through the table at 559EH into words at 5680H (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 in the ROM's RS-232 initialisation control block at 41F5H: 41F8H the baud rate byte (bits 7-4 the sending rate, bits 3-0 the receiving rate, each an index into the 16 rates at 5562H), 41F9H the control byte and 41FAH the wait switch (00H no wait). Without parameters it shows $03 @RS Baud=n,Word=n,Stops=n,Parity=x and the marks ,Wait ,BRK ,DTR ,RTS (5348H); the baud rate shown is the receiving one. In both cases the interface is then set up by the ROM's RS-232 initialisation at 005AH (54ECH), which takes its values from 41F8H-41FAH.

With parameters (53EEH) PARAM@ takes BAUD, WORD, STOPS, EVEN, ODD, PARITY, DTR, RTS, BREAK and WAIT through the table at 55C7H, 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 stores its low byte into 41FAH when it is given.

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 5552H 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.

Differences from the Model I

The code is the Model I SYS13/SYS with the Model III addresses of SYS0/SYS (HMEM$ 4411H, SFLAG1$ 4297H, DODCB$ 42A9H, FEXT@ 444BH, PARAM@ 4454H, LOCDCB% 44A0H, the names of @PR and @RS in the DCB table 44C5H and 44D0H) except in RS232. Index Register IX points to 41F5H, the ROM's RS-232 initialisation control block, so the baud rate byte is IX+03H (41F8H) and the control byte IX+04H (41F9H) where the Model I has IX+00H (4305H) and IX+01H (4306H). The display shows ,Wait when IX+05H (41FAH) is not 00H (ten bytes more at 53DCH-53E5H), and the end of RS232 stores WAIT into 41FAH and jumps to the ROM's 005AH instead of writing to ports E8H, E9H and EAH itself (54E4H-54EEH, three bytes less). So the code from 53E6H to 54E3H is ten bytes higher than on the Model I, and the code and data from 54EFH on seven bytes higher.

Variables

Self-Modified Operands

Address
Size
Contents
52E5H-52E6H
2 bytes
CODE
The value of CODE: the operand of LD BC,0000H at 52E4H.
5413H-5414H
2 bytes
BAUD
The value of BAUD: the operand of LD DE,0000H at 5412H.
5441H-5442H
2 bytes
WORD
The value of WORD: the operand of LD DE,0000H at 5440H.
5464H-5465H
2 bytes
STOPS
The value of STOPS: the operand of LD DE,0000H at 5463H.
5481H-5482H
2 bytes
PARITY
The value of PARITY: the operand of LD DE,0000H at 5480H.
5492H-5493H
2 bytes
ODD
The value of ODD: the operand of LD DE,0000H at 5491H.
5495H-5496H
2 bytes
EVEN
The value of EVEN: the operand of LD BC,0000H at 5494H.
54ACH-54ADH
2 bytes
DTR
The value of DTR: the operand of LD DE,0000H at 54ABH.
54BDH-54BEH
2 bytes
RTS
The value of RTS: the operand of LD DE,0000H at 54BCH.
54CEH-54CFH
2 bytes
BREAK
The value of BREAK: the operand of LD DE,0000H at 54CDH.
54E2H-54E3H
2 bytes
WAIT
The value of WAIT: the operand of LD DE,0000H at 54E1H.

Work Areas

Address
Size
Contents
5680H-56A0H
33 bytes
Field and Numbers
DO's field for EVAL@ (flag byte, then the text), FORMS's values at 5680H-5687H, and the BCD number, its digits and the text of 5504H.
56A1H-56A2H
2 bytes
HIGH
The value of DO's parameter HIGH, at first HMEM$ (520EH).
56A3H-56A4H
2 bytes
BREAK
The value of DO's parameter BREAK, at first FFH (5214H).

System Addresses

Address
Size
Contents
4411H
2 bytes
HMEM$
The top of memory: set by HIGH and lowered by 288 bytes for the first DO.
4297H
1 byte
SFLAG1$
The system flags: bit 0 BREAK disabled, bit 5 a DO file running, bit 6 DO's memory taken.
42A9H
2 bytes
DODCB$
The address of the DO file's control block.
44C5H
2 bytes
PR
The name of device 2, +09H of its entry in SYS0/SYS's DCB table, shown by FORMS.
44D0H
2 bytes
RS
The name of device 3, +09H of its entry in SYS0/SYS's DCB table, shown by RS232.
41F8H
1 byte
RS-232 Baud Rate
The ROM's RS-232 initialisation control block (41F5H): the sending rate in bits 7-4 and the receiving rate in bits 3-0.
41F9H
1 byte
RS-232 Control
The same block: the control byte (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).
41FAH
1 byte
RS-232 Wait
The same block: the wait switch, 00H no wait.

Outside Routines

AddressContents
4479HSYS0/SYS: EVAL@ (521BH).
441CHSYS0/SYS: FSPEC@ (5267H).
444BHSYS0/SYS: FEXT@ (526DH).
4424HSYS0/SYS: OPEN@ (5276H).
44A0HSYS0/SYS: LOCDCB% (5287H).
4454HSYS0/SYS: PARAM@ (52C0H, 5402H).
4467HSYS0/SYS: DSPLY@.
4409HSYS0/SYS: ERROR@ (555FH).
0033HROM: show the character in Register A on the display.
003BHROM: send the character in Register A to the printer.
005AHROM: initialise the RS-232 interface from 41F8H-41FAH (54ECH).

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 49D3H-49E6H) for the request codes C2H-C5H. CMNDI@ takes the codes of the library commands from SYS1/SYS's table: DO C3H (51C7H), FORMS C4H (51CCH), RS232 C5H (51D8H). 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 4D5FH-4D6CH).
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 (49E7H) 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 5582H; 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$ (42A9H). 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,(4411H) ED 5B 11 44
Load Register Pair DE with HMEM$, the top of memory, from 4411H-4412H: the value HIGH has when it is not given.
520E
LD (56A1H),DE ED 53 A1 56
Store Register Pair DE into 56A1H-56A2H, 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 (56A3H),A 32 A3 56
Store Register A (FFH) into 56A3H, the value of BREAK, which EVAL@ replaces when BREAK is given.
5217
LD IX,5582H DD 21 82 55
Point Index Register IX to 5582H, DO's evaluation block: its flags, the three field blocks (all 5680H) and the parameter table 558BH.
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 555DH 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 5555H to post error 2FH, I/o field not found.
5229
LD A,(5680H) 3A 80 56
Load Register A with the flag byte of the field at 5680H: 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 5555H to post error 2FH, I/o field not found.
5231
LD HL,(56A1H) 2A A1 56
Load Register Pair HL with the value of HIGH from 56A1H-56A2H: the old HMEM$ or the address given.
5234
LD (4411H),HL 22 11 44
Store Register Pair HL into HMEM$ at 4411H-4412H: the top of memory is now HIGH.
5237
LD A,(56A3H) 3A A3 56
Load Register A with the value of BREAK from 56A3H: 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,(4297H) 3A 97 42
Load Register A with SFLAG1$ from 4297H, 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 (4297H),A 32 97 42
Store Register A into SFLAG1$ at 4297H 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 (4297H),A 32 97 42
Store Register A into SFLAG1$ at 4297H with bit 6 set.
5250
LD HL,(4411H) 2A 11 44
Load Register Pair HL with HMEM$ from 4411H-4412H, 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 (4411H),HL 22 11 44
Store Register Pair HL into HMEM$ at 4411H-4412H: 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 (42A9H),HL 22 A9 42
Store Register Pair HL into DODCB$ at 42A9H-435BH, the address of the DO file's control block that SYS0/SYS reads.
5260
LD DE,(42A9H) ED 5B A9 42
Load Register Pair DE with the address of the DO file's control block from DODCB$ at 42A9H-435BH.
5264
LD HL,5681H 21 81 56
Point Register Pair HL to 5681H, the text of the field EVAL@ took (after its flag byte at 5680H).
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,5618H 21 18 56
Point Register Pair HL to 5618H, the default extension TXT.
526D
GOSUB to 444BH, 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 555DH to post the error in Register A.
527C
LD A,(4297H) 3A 97 42
Load Register A with SFLAG1$ from 4297H, 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 (4297H),A 32 97 42
Store Register A into SFLAG1$ at 4297H 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 5680H-5685H (Index Register IY), PARAM@ takes PAGE, LINES, WIDTH, TOP and CODE with the table at 559EH (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 44A0H, 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,5680H FD 21 80 56
Point Index Register IY to 5680H, the work area for the values of PAGE, LINES, WIDTH and TOP.
5291
GOSUB to 54F9H 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 54F9H 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 (5680H), the low byte of PAGE's value.
529E
LD (IY+01H),A FD 77 01
Store Register A (00H) into Index Register IY+01H (5681H), 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 (5684H), the low byte of WIDTH's value.
52A7
LD (IY+05H),A FD 77 05
Store Register A (00H) into Index Register IY+05H (5685H), 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 (5682H), the low byte of LINES's value.
52B0
LD (IY+03H),A FD 77 03
Store Register A (00H) into Index Register IY+03H (5683H), the high byte of LINES's value.
52B3
LD (IY+06H),A FD 77 06
Store Register A (00H) into Index Register IY+06H (5686H), 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,559EH 11 9E 55
Point Register Pair DE to 559EH, FORMS's parameter table for PARAM@: PAGE, LINES, WIDTH, TOP and CODE.
52C0
GOSUB to 4454H, 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 555BH 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 5558H 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 (44C5H), the numbers in decimal from +03H, +07H and +06H of the control block at Index Register IX.

52FC
LD HL,561BH 21 1B 56
Point Register Pair HL to 561BH, 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,44C5H 21 C5 44
Point Register Pair HL to 44C5H, 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 (44C5H).
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 (44C6H).
530A
LD A,(HL) 7E
Load Register A with the second character of the name at Register Pair HL (44C6H).
530B
GOSUB to 0033H, the ROM's routine that shows the character in Register A on the display.
530E
LD HL,5621H 21 21 56
Point Register Pair HL to 5621H, 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,5628H 21 28 56
Point Register Pair HL to 5628H, 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,5630H 21 30 56
Point Register Pair HL to 5630H, 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 54EFH 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 41F5H, the ROM's RS-232 initialisation control block: +03H (41F8H) the baud rate byte (bits 7-4 the sending rate, bits 3-0 the receiving rate, both an index into the table at 5562H), +04H (41F9H) the control byte, +05H (41FAH) the wait switch (00H no wait). Without parameters the settings are shown and the interface is set up again (53EBH); with parameters they are changed first (53EEH). Either way the ROM's RS-232 initialisation at 005AH sets up the interface from them.

533D
LD IX,41F5H DD 21 F5 41
Point Index Register IX to 41F5H, the ROM's RS-232 initialisation control block: +03H the baud rate byte, +04H the control byte, +05H the wait switch.
5341
GOSUB to 54F9H 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 54F9H passed over (the flags are kept).
5345
If the NC FLAG is set (parameters follow), JUMP to 53EEH 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 ,Wait when the wait switch is not 00H, ,BRK when a break is sent (bit 2 clear), ,DTR when bit 1 is clear and ,RTS when bit 0 is clear; then the interface is set up by the ROM (54ECH).

5348
LD HL,5638H 21 38 56
Point Register Pair HL to 5638H, 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,44D0H 21 D0 44
Point Register Pair HL to 44D0H, 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 (44D0H).
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 (44D1H).
5356
LD A,(HL) 7E
Load Register A with the second character of the name at Register Pair HL (44D1H).
5357
GOSUB to 0033H, the ROM's routine that shows the character in Register A on the display.
535A
LD HL,563EH 21 3E 56
Point Register Pair HL to 563EH, 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+03H) DD 7E 03
Load Register A with the baud rate byte at Index Register IX+03H (41F8H).
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,5562H 21 62 55
Point Register Pair HL to 5562H, 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 54EFH to show the number in Register Pair DE, the baud rate, in decimal.
5373
LD HL,5645H 21 45 56
Point Register Pair HL to 5645H, 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+04H) DD 7E 04
Load Register A with the control byte at Index Register IX+04H (41F9H).
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,564CH 21 4C 56
Point Register Pair HL to 564CH, 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+04H) DD CB 04 66
Test bit 4 of the control byte at Index Register IX+04H (41F9H): 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,5654H 21 54 56
Point Register Pair HL to 5654H, 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,5672H 21 72 56
Point Register Pair HL to 5672H, the text None ended by 03H.
53A9
BIT 3,(IX+04H) DD CB 04 5E
Test bit 3 of the control byte at Index Register IX+04H (41F9H): set when no parity is used.
53AD
If the NZ FLAG is set (no parity), JUMP to 53BBH to show None.
53AF
LD HL,5677H 21 77 56
Point Register Pair HL to 5677H, the text Even ended by 03H.
53B2
BIT 7,(IX+04H) DD CB 04 7E
Test bit 7 of the control byte at Index Register IX+04H (41F9H): 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,567CH 21 7C 56
Point Register Pair HL to 567CH, 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+04H) DD CB 04 56
Test bit 2 of the control byte at Index Register IX+04H (41F9H): clear when a break is sent.
53C2
LD HL,5663H 21 63 56
Point Register Pair HL to 5663H, 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+04H) DD CB 04 4E
Test bit 1 of the control byte at Index Register IX+04H (41F9H), the bit that the DTR parameter sets: clear for DTR on.
53CC
LD HL,5668H 21 68 56
Point Register Pair HL to 5668H, 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+04H) DD CB 04 46
Test bit 0 of the control byte at Index Register IX+04H (41F9H), the bit that the RTS parameter sets: clear for RTS on.
53D6
LD HL,566DH 21 6D 56
Point Register Pair HL to 566DH, 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,(IX+05H) DD 7E 05
Load Register A with the wait switch at Index Register IX+05H (41FAH): 00H for no wait.
53DF
OR A B7
OR Register A with itself to set the flags: the NZ FLAG when the interface waits.
53E0
LD HL,565DH 21 5D 56
Point Register Pair HL to 565DH, the text ,Wait ended by 03H (LD does not change the flags).
53E3
If the NZ FLAG is set (wait), GOSUB to 4467H, DSPLY@, to show the text at Register Pair HL.
53E6
LD A,0DH 3E 0D
Load Register A with 0DH, the carriage return that ends the line.
53E8
GOSUB to 0033H, the ROM's routine that shows the character in Register A (0DH) on the display.
53EB
JUMP to 54ECH to have the ROM's 005AH set up the RS-232 interface from 41F8H-41FAH, unchanged.

53EEH - Change the RS-232 Settings

PARAM@ takes BAUD, WORD, STOPS, EVEN, ODD, PARITY, DTR, RTS, BREAK and WAIT with the table at 55C7H (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.

53EE
PUSH HL E5
Save Register Pair HL, the start of the parameters, to the top of the stack.
53EF
LD HL,0000H 21 00 00
Load Register Pair HL with 0000H, the value of BAUD when it is not given.
53F2
LD (5413H),HL 22 13 54
Store Register Pair HL (0000H) into 5413H-5414H, the operand of LD DE,0000H at 5412H, BAUD's value.
53F5
LD A,80H 3E 80
Load Register A with 80H, the mark of a parameter that was not given.
53F7
LD HL,55D5H 21 D5 55
Point Register Pair HL to 55D5H, the address field of WORD, the second entry of the parameter table at 55C7H.
53FA
LD B,09H 06 09
Load Register B with 09H, the nine parameters after BAUD.
53FC
LD E,(HL) 5E
Load Register E with the low byte of the parameter's address at Register Pair HL.
53FD
INC HL 23
INCrement Register Pair HL by 1, to the high byte of the address.
53FE
LD D,(HL) 56
Load Register D with the high byte of the parameter's address at Register Pair HL.
53FF
LD (DE),A 12
Store Register A (80H) at Register Pair DE, the low byte of the operand that holds the parameter's value.
5400
LD C,07H 0E 07
Load Register C with 07H, the bytes from here to the address field of the next entry, less one.
5402
INC HL 23
INCrement Register Pair HL by 1, on through the next entry's name.
5403
DEC C 0D
DECrement Register C by 1, the bytes still to pass over.
5404
If the NZ FLAG is set (bytes left), LOOP back to 5402H.
5406
DECrement Register B and LOOP back to 53FCH until all nine operands hold 80H.
5408
POP HL E1
Restore Register Pair HL, the start of the parameters, from the top of the stack.
5409
LD DE,55C7H 11 C7 55
Point Register Pair DE to 55C7H, RS232's parameter table for PARAM@.
540C
GOSUB to 4454H, PARAM@, to take the parameters at Register Pair HL by the table at Register Pair DE: the NZ FLAG on an error.
540F
If the NZ FLAG is set (an unknown parameter), JUMP to 555BH to post error 2EH, Invalid parameter.

5412H - BAUD

The value must be one of the 16 rates of the table at 5562H (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.

5412
LD DE,0000H 11 00 00
Load Register Pair DE with the value of BAUD, the operand 5413H-5414H that PARAM@ fills: 0000H when BAUD is not given.
5415
LD A,D 7A
Load Register A with Register D, the high byte of the baud rate.
5416
OR E B3
OR Register A with Register E, the low byte: the Z FLAG when the value is 0000H.
5417
If the Z FLAG is set (no BAUD), JUMP to 543DH to keep the baud rate byte.
5419
LD IY,5580H FD 21 80 55
Point Index Register IY to 5580H, the last word of the baud rate table, 19200.
541D
LD B,10H 06 10
Load Register B with 10H, the 16 rates of the table, searched from the last.
541F
LD L,(IY+00H) FD 6E 00
Load Register L with the low byte of the table's rate at Index Register IY+00H.
5422
LD H,(IY+01H) FD 66 01
Load Register H with the high byte of the table's rate at Index Register IY+01H.
5425
OR A B7
OR Register A with itself to clear the C FLAG for the SBC below.
5426
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.
5428
If the Z FLAG is set (the rate is in the table), JUMP to 5433H with Register B = its index + 1.
542A
DEC IY FD 2B
DECrement Index Register IY by 1, the first byte back.
542C
DEC IY FD 2B
DECrement Index Register IY by 1 more, to the word before.
542E
DECrement Register B and LOOP back to 541FH until the 16 rates are compared.
5430
JUMP to 5558H to post error 2DH, Invalid data provided: the rate is not in the table.
5433
DEC B 05
DECrement Register B by 1: Register B = the index of the rate, 0-15.
5434
LD A,B 78
Load Register A with Register B, the index of the rate.
5435
RLCA 07
Rotate Register A left one bit (RLCA), the first of the shifts.
5436
RLCA 07
Rotate Register A left one more bit (RLCA), the second shift.
5437
RLCA 07
Rotate Register A left a third bit (RLCA), the third shift.
5438
RLCA 07
Rotate Register A left a fourth bit (RLCA): the index is now in bits 7-4 of Register A.
5439
OR B B0
OR Register A with Register B: the index in both halves, the sending and the receiving rate.
543A
LD (IX+03H),A DD 77 03
Store Register A into the baud rate byte at Index Register IX+03H (41F8H).

543DH - 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.

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

5463H - 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).

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

5480H - PARITY

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

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

5491H - 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.

5491
LD DE,0000H 11 00 00
Load Register Pair DE with the value of ODD, the operand 5492H-5493H that PARAM@ fills (0000H as assembled): 80H in Register E when ODD is not given.
5494
LD BC,0000H 01 00 00
Load Register Pair BC with the value of EVEN, the operand 5495H-5496H that PARAM@ fills (0000H as assembled): 80H in Register C when EVEN is not given.
5497
LD A,C 79
Load Register A with Register C, the low byte of EVEN's value.
5498
CP E BB
Compare Register A against Register E, the low byte of ODD's value: the Z FLAG when they are the same.
5499
If the NZ FLAG is set (EVEN and ODD differ), JUMP to 54A2H to set the parity sense from EVEN.
549B
CP 80H FE 80
Compare Register A against 80H, the mark of a parameter not given.
549D
If the Z FLAG is set (neither EVEN nor ODD given), JUMP to 54ABH to keep the parity sense.
549F
JUMP to 5558H to post error 2DH, Invalid data provided: EVEN and ODD were given the same value.
54A2
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).
54A4
RLCA 07
Rotate Register A left one bit (RLCA): bit 6 is now bit 7 of Register A.
54A5
LD B,A 47
Load Register B with Register A, the new bit 7.
54A6
LD A,7FH 3E 7F
Load Register A with 7FH, the mask that keeps every bit of the control byte but bit 7.
54A8
AND L A5
AND Register A with Register L, the control byte: its bit 7 cleared.
54A9
OR B B0
OR Register A with Register B, the new parity sense.
54AA
LD L,A 6F
Load Register L with Register A, the control byte with the new parity sense.

54ABH - 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 54E2H and stored into the wait switch (41FAH) when it is given (54E4H).

54AB
LD DE,0000H 11 00 00
Load Register Pair DE with the value of DTR, the operand 54ACH-54ADH that PARAM@ fills (0000H as assembled): 80H in Register E when DTR is not given.
54AE
LD A,E 7B
Load Register A with Register E, the low byte of DTR's value.
54AF
CP 80H FE 80
Compare Register A against 80H, the mark of a parameter not given.
54B1
If the Z FLAG is set (no DTR), JUMP to 54BCH to keep bit 1.
54B3
CPL 2F
Complement Register A (CPL): 00H for DTR=Y (FFH), FFH for DTR=N.
54B4
AND 02H E6 02
AND Register A with 02H, bit 1: set for DTR=N.
54B6
LD B,A 47
Load Register B with Register A, the new bit 1.
54B7
LD A,FDH 3E FD
Load Register A with FDH, the mask that keeps every bit of the control byte but bit 1.
54B9
AND L A5
AND Register A with Register L, the control byte: its bit 1 cleared.
54BA
OR B B0
OR Register A with Register B, the new DTR bit.
54BB
LD L,A 6F
Load Register L with Register A, the control byte with the new DTR bit.
54BC
LD DE,0000H 11 00 00
Load Register Pair DE with the value of RTS, the operand 54BDH-54BEH that PARAM@ fills (0000H as assembled): 80H in Register E when RTS is not given.
54BF
LD A,E 7B
Load Register A with Register E, the low byte of RTS's value.
54C0
CP 80H FE 80
Compare Register A against 80H, the mark of a parameter not given.
54C2
If the Z FLAG is set (no RTS), JUMP to 54CDH to keep bit 0.
54C4
CPL 2F
Complement Register A (CPL): 00H for RTS=Y (FFH), FFH for RTS=N.
54C5
AND 01H E6 01
AND Register A with 01H, bit 0: set for RTS=N.
54C7
LD B,A 47
Load Register B with Register A, the new bit 0.
54C8
LD A,FEH 3E FE
Load Register A with FEH, the mask that keeps every bit of the control byte but bit 0.
54CA
AND L A5
AND Register A with Register L, the control byte: its bit 0 cleared.
54CB
OR B B0
OR Register A with Register B, the new RTS bit.
54CC
LD L,A 6F
Load Register L with Register A, the control byte with the new RTS bit.
54CD
LD DE,0000H 11 00 00
Load Register Pair DE with the value of BREAK, the operand 54CEH-54CFH that PARAM@ fills (0000H as assembled): 80H in Register E when BREAK is not given.
54D0
LD A,E 7B
Load Register A with Register E, the low byte of BREAK's value.
54D1
CP 80H FE 80
Compare Register A against 80H, the mark of a parameter not given.
54D3
If the Z FLAG is set (no BREAK), JUMP to 54DEH to keep bit 2.
54D5
CPL 2F
Complement Register A (CPL): 00H for BREAK=Y (FFH), FFH for BREAK=N.
54D6
AND 04H E6 04
AND Register A with 04H, bit 2: set for BREAK=N, clear for a break.
54D8
LD B,A 47
Load Register B with Register A, the new bit 2.
54D9
LD A,FBH 3E FB
Load Register A with FBH, the mask that keeps every bit of the control byte but bit 2.
54DB
AND L A5
AND Register A with Register L, the control byte: its bit 2 cleared.
54DC
OR B B0
OR Register A with Register B, the new break bit.
54DD
LD L,A 6F
Load Register L with Register A, the control byte with the new break bit.
54DE
LD (IX+04H),L DD 75 04
Store Register L, the new control byte, into Index Register IX+04H (41F9H).
54E1
LD DE,0000H 11 00 00
Load Register Pair DE with the value of WAIT, the operand 54E2H-54E3H that PARAM@ fills (0000H as assembled): 80H in Register E when WAIT is not given.

54E4H - WAIT and the Interface

WAIT given stores its low byte into the wait switch at 41FAH (00H no wait); then the ROM's RS-232 initialisation at 005AH sets up the interface from 41F8H-41FAH and returns to CMNDI@.

54E4
LD A,E 7B
Load Register A with Register E, the low byte of WAIT's value.
54E5
CP 80H FE 80
Compare Register A against 80H, the mark of a parameter not given.
54E7
If the Z FLAG is set (no WAIT), JUMP to 54ECH to keep the wait switch.
54E9
LD (IX+05H),A DD 77 05
Store Register A, WAIT's value, into the wait switch at Index Register IX+05H (41FAH).
54EC
JUMP to 005AH, the ROM's RS-232 initialisation, which sets up the interface from 41F8H-41FAH; its RETurn goes to CMNDI@.

54EFH - Show a Number in Decimal

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

54EF
LD HL,5680H 21 80 56
Point Register Pair HL to 5680H, the place for the digits of the number.
54F2
GOSUB to 5504H to put the number in Register Pair DE as decimal digits, ended by 03H, at Register Pair HL.
54F5
GOSUB to 4467H, DSPLY@, to show the digits at Register Pair HL up to their 03H.
54F8
RET C9
RETurn to the caller with the number shown on the display.

54F9H - 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.

54F9
LD A,(HL) 7E
Load Register A with the character at Register Pair HL.
54FA
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.
54FC
RET C D8
If the C FLAG is set (a control code), RETurn with the C FLAG: the end of the line.
54FD
CP 3BH FE 3B
Compare Register A against 3BH, the semicolon that separates commands on a line.
54FF
SCF 37
Set the C FLAG (SCF), the end of the line, should it be a semicolon (the Z FLAG is kept).
5500
RET Z C8
If the Z FLAG is set (a semicolon), RETurn with the C FLAG: the end of the line.
5501
INC HL 23
INCrement Register Pair HL by 1, past the character.
5502
OR A B7
OR Register A with itself to clear the C FLAG: not the end of the line.
5503
RET C9
RETurn with the NC FLAG and the character in Register A.

5504H - 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 5680H-5682H (sixteen doublings by ADC and DAA), and the digits into ASCII at 5683H-5688H by RLD; the digits after the leading zeros are then copied to Register Pair HL, which may be 5680H itself.

5504
PUSH HL E5
Save Register Pair HL, the place for the digits, to the top of the stack.
5505
LD HL,5680H 21 80 56
Point Register Pair HL to 5680H, the three BCD bytes of the number, the low two digits first.
5508
PUSH HL E5
Save Register Pair HL (5680H) to the top of the stack.
5509
LD B,03H 06 03
Load Register B with 03H, the three BCD bytes to clear.
550B
LD (HL),00H 36 00
Store 00H at Register Pair HL, a BCD byte of the number.
550D
INC HL 23
INCrement Register Pair HL by 1, to the next BCD byte.
550E
DECrement Register B and LOOP back to 550BH until the three bytes are 00H.
5510
POP HL E1
Restore Register Pair HL (5680H) from the top of the stack.
5511
LD C,10H 0E 10
Load Register C with 10H, the 16 bits of the number in Register Pair DE.
5513
LD B,03H 06 03
Load Register B with 03H, the three BCD bytes to double.
5515
PUSH HL E5
Save Register Pair HL (5680H) to the top of the stack.
5516
RL E CB 13
Rotate Register E left through the C FLAG (RL E).
5518
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.
551A
LD A,(HL) 7E
Load Register A with the BCD byte at Register Pair HL.
551B
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.
551C
DAA 27
Decimal Adjust Register A (DAA) to two BCD digits, the C FLAG the carry to the next byte.
551D
LD (HL),A 77
Store Register A, the doubled BCD byte, at Register Pair HL.
551E
INC HL 23
INCrement Register Pair HL by 1, to the next BCD byte.
551F
DECrement Register B and LOOP back to 551AH until the three bytes are doubled.
5521
POP HL E1
Restore Register Pair HL (5680H) from the top of the stack.
5522
DEC C 0D
DECrement Register C by 1, the bits still to take.
5523
If the NZ FLAG is set (bits left), LOOP back to 5513H.
5525
LD DE,5683H 11 83 56
Point Register Pair DE to 5683H, the six ASCII digits.
5528
PUSH DE D5
Save Register Pair DE (5683H) to the top of the stack.
5529
INC HL 23
INCrement Register Pair HL by 1, to 5681H, the middle BCD byte.
552A
INC HL 23
INCrement Register Pair HL by 1 more, to 5682H, the BCD byte of the two highest digits.
552B
LD A,30H 3E 30
Load Register A with 30H, the digit 0, whose low half RLD replaces with each BCD digit.
552D
LD B,03H 06 03
Load Register B with 03H, the three BCD bytes.
552F
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.
5531
LD (DE),A 12
Store Register A, the high digit in ASCII, at Register Pair DE.
5532
INC DE 13
INCrement Register Pair DE by 1, to the next ASCII digit.
5533
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.
5535
LD (DE),A 12
Store Register A, the low digit in ASCII, at Register Pair DE.
5536
INC DE 13
INCrement Register Pair DE by 1, to the next ASCII digit.
5537
DEC HL 2B
DECrement Register Pair HL by 1, to the next lower BCD byte.
5538
DECrement Register B and LOOP back to 552FH until the six digits are in ASCII.
553A
POP HL E1
Restore Register Pair HL (5683H), the first ASCII digit, from the top of the stack.
553B
LD B,05H 06 05
Load Register B with 05H, the five leading digits that may be passed over: the last is always shown.
553D
LD A,30H 3E 30
Load Register A with 30H, the digit 0, for the comparisons.
553F
CP (HL) BE
Compare Register A (30H) against the digit at Register Pair HL: the Z FLAG for a 0.
5540
If the NZ FLAG is set (not a 0), JUMP to 5545H: the number starts here.
5542
INC HL 23
INCrement Register Pair HL by 1, past the leading 0.
5543
DECrement Register B and LOOP back to 553FH until five digits are passed.
5545
POP DE D1
Restore Register Pair DE, the place for the digits, from the top of the stack.
5546
PUSH DE D5
Save Register Pair DE to the top of the stack again, for the return.
5547
LD C,B 48
Load Register C with Register B, the digits after the first one left.
5548
INC C 0C
INCrement Register C by 1: Register C = the number of digits to copy.
5549
LD B,00H 06 00
Load Register B with 00H: Register Pair BC = the count.
554B
LDIR ED B0
Copy the Register Pair BC digits from Register Pair HL to Register Pair DE (LDIR).
554D
POP HL E1
Restore Register Pair HL, the start of the digits, from the top of the stack.
554E
LD A,03H 3E 03
Load Register A with 03H, the byte that ends a text for DSPLY@.
5550
LD (DE),A 12
Store Register A (03H) at Register Pair DE, after the last digit.
5551
RET C9
RETurn with Register Pair HL at the digits and Register Pair DE at the 03H.

5552H - The Error Exits

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

5552
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.
5554
LD BC,2F3EH 01 3E 2F
5555H 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.
5557
LD BC,2D3EH 01 3E 2D
5558H 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.
555A
LD BC,2E3EH 01 3E 2E
555BH 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.
555D
OR 40H F6 40
OR Register A, the error code, with 40H, bit 6, so that ERROR@ shows the message without its frame.
555F
JUMP to 4409H, ERROR@, to show the message of the error in Register A and end through ABORT@.

5562H - 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.

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

5582H - 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 5680H, 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.

5582
DEFB 00H 00
The flags of DO's evaluation block, set by EVAL@: bits 0-2 tell which fields were given (5221H).
5583-5584
DEFW 5680H 80 56
The address of the source block, 5680H: the flag byte, then the file specification.
5585-5586
DEFW 5680H 80 56
The address of the destination block: 5680H again.
5587-5588
DEFW 5680H 80 56
The address of the wildmask block: 5680H again.
5589-558A
DEFW 558BH 8B 55
The address of the parameter table at 558BH: HIGH and BREAK.
558B-5590
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.
5591-5592
DEFW 56A1H A1 56
HIGH's value goes to 56A1H-56A2H, which DO first fills with HMEM$.
5593
DEFB 40H 40
The type byte of HIGH: 40H, bit 6, a number (an address).
5594-5599
DEFM "BREAK " 42 52 45 41 4B 20
The name of DO's parameter BREAK: the BREAK key on (Y) or off (N).
559A-559B
DEFW 56A3H A3 56
BREAK's value goes to 56A3H-56A4H, which DO first fills with FFH.
559C
DEFB 20H 20
The type byte of BREAK: 20H, bit 5, a switch, so the name alone sets it.
559D
DEFB 00H 00
The end of DO's parameter table: a 00H in place of the next name.

559EH - 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 5680H, CODE's into an operand of FORMS.

559E-55A3
DEFM "PAGE " 50 41 47 45 20 20
The name PAGE: the page length, +03H of @PR's control block.
55A4-55A5
DEFW 5680H 80 56
PAGE's value goes to 5680H-5681H, Index Register IY+00H.
55A6-55AB
DEFM "LINES " 4C 49 4E 45 53 20
The name LINES: the lines used on a page, +07H of @PR's control block.
55AC-55AD
DEFW 5682H 82 56
LINES's value goes to 5682H-5683H, Index Register IY+02H.
55AE-55B3
DEFM "WIDTH " 57 49 44 54 48 20
The name WIDTH: the width of a line, +06H of @PR's control block.
55B4-55B5
DEFW 5684H 84 56
WIDTH's value goes to 5684H-5685H, Index Register IY+04H.
55B6-55BB
DEFM "TOP " 54 4F 50 20 20 20
The name TOP: send a form feed to the printer.
55BC-55BD
DEFW 5686H 86 56
TOP's value goes to 5686H-5687H, Index Register IY+06H, of which FORMS tests the low byte.
55BE-55C3
DEFM "CODE " 43 4F 44 45 20 20
The name CODE: one or two codes to send to the printer.
55C4-55C5
DEFW 52E5H E5 52
CODE's value goes to 52E5H-52E6H, the operand of LD BC,0000H at 52E4H.
55C6
DEFB 00H 00
The end of FORMS's parameter table: a 00H in place of the next name.

55C7H - RS232's Parameter Table

Data: the table for PARAM@ (5409H), 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.

55C7-55CC
DEFM "BAUD " 42 41 55 44 20 20
The name BAUD: the baud rate, sending and receiving.
55CD-55CE
DEFW 5413H 13 54
BAUD's value goes to 5413H-5414H, the operand of LD DE,0000H at 5412H.
55CF-55D4
DEFM "WORD " 57 4F 52 44 20 20
The name WORD: the word length of a character, 5 to 8 bits.
55D5-55D6
DEFW 5441H 41 54
WORD's value goes to 5441H-5442H, the operand of LD DE,0000H at 5440H; 53F7H starts at this word.
55D7-55DC
DEFM "STOPS " 53 54 4F 50 53 20
The name STOPS: one or two stop bits after each character.
55DD-55DE
DEFW 5464H 64 54
STOPS's value goes to 5464H-5465H, the operand of LD DE,0000H at 5463H.
55DF-55E4
DEFM "EVEN " 45 56 45 4E 20 20
The name EVEN: even parity (Y) or odd parity (N).
55E5-55E6
DEFW 5495H 95 54
EVEN's value goes to 5495H-5496H, the operand of LD BC,0000H at 5494H.
55E7-55EC
DEFM "ODD " 4F 44 44 20 20 20
The name ODD: odd parity; its value is only compared with EVEN.
55ED-55EE
DEFW 5492H 92 54
ODD's value goes to 5492H-5493H, the operand of LD DE,0000H at 5491H.
55EF-55F4
DEFM "PARITY" 50 41 52 49 54 59
The name PARITY: parity used (Y) or no parity at all (N).
55F5-55F6
DEFW 5481H 81 54
PARITY's value goes to 5481H-5482H, the operand of LD DE,0000H at 5480H.
55F7-55FC
DEFM "DTR " 44 54 52 20 20 20
The name DTR: the Data Terminal Ready line on (Y) or off (N).
55FD-55FE
DEFW 54ACH AC 54
DTR's value goes to 54ACH-54ADH, the operand of LD DE,0000H at 54ABH.
55FF-5604
DEFM "RTS " 52 54 53 20 20 20
The name RTS: the Request To Send line on (Y) or off (N).
5605-5606
DEFW 54BDH BD 54
RTS's value goes to 54BDH-54BEH, the operand of LD DE,0000H at 54BCH.
5607-560C
DEFM "BREAK " 42 52 45 41 4B 20
The name BREAK: a break sent (Y) or normal sending (N).
560D-560E
DEFW 54CEH CE 54
BREAK's value goes to 54CEH-54CFH, the operand of LD DE,0000H at 54CDH.
560F-5614
DEFM "WAIT " 57 41 49 54 20 20
The name WAIT, which the manual does not list: the ROM's wait switch at 41FAH.
5615-5616
DEFW 54E2H E2 54
WAIT's value goes to 54E2H-54E3H, the operand of LD DE,0000H at 54E1H, stored into 41FAH (54E9H).
5617
DEFB 00H 00
The end of RS232's parameter table: a 00H in place of the next name.

5618H - The Texts

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

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

5680H - The Work Area

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

5680-56A0
DEFS 33
The field of EVAL@ for DO (5680H flag, 5681H text); also FORMS's values at 5680H-5687H (Index Register IY), and the BCD number (5680H-5682H), its digits (5683H-5688H) and the text shown (from 5680H) of 5504H.
56A1-56A2
DEFS 2
The value of DO's parameter HIGH: HMEM$ or the address given (520EH, 5231H).
56A3-56A4
DEFS 2
The value of DO's parameter BREAK: FFH or the value given, of which DO tests the low byte (5214H, 5237H).