LS-DOS 6.3.1 for the Model 4 - SYS8/SYS Disassembled

Page Customization

Introduction/Summary

LS-DOS 6.3.1 SYS8/SYS Disassembly (Model 4)

SYS8/SYS is Library C of LS-DOS 6.3.1: six members, each a separate program that carries out one command typed at LS-DOS Ready or passed by a program through @CMNDR: SYSTEM, SYSGEN, FORMS, SETCOM, SETKI and SPOOL. All six load at 2400H, the first address above the overlay area 1E00H-23FFH. Only one member is in memory at a time: the next library command reads its own member over it, and a member is read again from the file every time its command is given, so the operands that a member changes as it runs always start from the values in the file.

The file is 9536 bytes: a module name record (05H) with the name sys8, a copyright record (1FH) with the text (C) 1982-4,6,90 MISOSYS, six member headers (08H), a record 0AH that ends the headers, then the six members, each one after a record 04H, a last 04H record and a transfer record (02H) for 0000H. A member header holds six bytes: the request byte, the entry address, the record number (a word) and the byte in that record where the member's load blocks begin. The members hold 9243 bytes in their load blocks; members 2, 3 and 6 have gaps between their blocks. Member 5 (SETKI) is followed in the file by a patch record (07H) named SETKI1 and two load blocks that change one byte of it and add eight, the fix of 6.3.1 Level 1C; the release carries no other patch. The source of every member is in the LS-DOS 6.3.1 source restoration (ls631rst, DISK2 and DISK3, the files LBname/ASM), which assembles to these bytes exactly, the SETKI1 patch assembled in place; its labels are used on this page.

The page is built a member at a time, from 22 November 2026; so far it holds members 1 (SYSTEM), 2 (SYSGEN), 3 (FORMS), 4 (SETCOM) and 5 (SETKI). Each member's rows begin at the heading that names it, and the Members menu in the Page Index leads to each one; the members not yet disassembled are marked there.

Members and Commands

SYS1/SYS looks the command word up in LIBTBL$ (1F24H on the SYS1/SYS page) and finds a word such as C0B3H: bits 15-13 give the library (8000H SYS6, A000H SYS7, C000H SYS8) and the low byte the request. It sets @DBGHK to C9H, loads Register B with the request and sends the library request through RST 28H. The SVC dispatcher of SYS0/SYS reads SYS8 every time, and the loader looks through the member headers for the one whose request byte equals Register B, positions the file at the record and byte it names, reads the load blocks up to the next 04H and calls the entry address of the header, with Register Pair HL at the text after the command word. The member returns with Register Pair HL = 0000H, FFFFH after a message of its own, or an error number.

CommandRequestMemberFirst and last byte loadedEntry
SYSTEMA1H12400H-2D19H2400H
SYSGEN1CH22400H-2829H2400H
FORMSB1H32400H-29DDH2400H
SETCOMB2H42400H-29EEH2400H
SETKIB3H52400H-2595H2400H
SPOOLA2H62400H-2F89H2400H

The headers (request, entry, record, byte): SYSTEM A1H 2400H 0000H 57H; SYSGEN 1CH 2400H 0009H 9CH; FORMS B1H 2400H 000DH CEH; SETCOM B2H 2400H 0013H BFH; SETKI B3H 2400H 0019H C9H; SPOOL A2H 2400H 001BH 7BH. The load blocks of each member: 1 SYSTEM 2400H-2D19H (2330 bytes); 2 SYSGEN 2400H-263FH and 264FH-2829H (1051); 3 FORMS 2400H-2801H and 280EH-29DDH (1490); 4 SETCOM 2400H-29EEH (1519); 5 SETKI 2400H-258DH, then the patch blocks 2583H and 258EH-2595H (406 bytes, one of them loaded twice); 6 SPOOL 2400H-2AE1H, 2B02H-2B4DH, 2D00H-2F32H and 2F5DH-2F89H (2446).

Member 1: SYSTEM

Member 1 holds 2330 bytes in ten load blocks, 2400H-2D19H without a gap, and serves SYSTEM, the command that sets the options of the running system and of the system information sector. In 6.3.1 it starts with a jump (2400H) over its messages and its parameter table PRMTBL$ (24ECH), which 6.3.0 kept at the end. LSYSTEM (25E5H) keeps the Stack Pointer for LSAVESP and ends at once with FFFFH when BREAK is pending. Every message (SETERR, 2AE4H) and every error (IOERR, 2AE9H) ends the command through LSAVESP (2AC6H), which restores the Stack Pointer, clears a pending BREAK and returns FFFFH or the error number (00C0H plus the number after a failed @LOAD of a DRIVER program, B180); the normal end (L2B7D, 2B7DH) returns 0000H. Each return goes into the tail of RST28 (1A77H). A CALL SETERR never comes back, so the instructions after its three unconditional calls (26BAH, 2831H-2832H, 298CH-2990H) are never run; after the fourth, CALL NZ,SETERR at 2977H, the JR to 2995H runs only when the call is not made (DRIVE=0). 6.3.0's SETERR did not return either (it fell into FRCERR and SAVESP), so this code was dead there already.

PRMTBL$ is an old style table: 31 names of six characters padded with spaces, each with the address of the operand of the LD BC (LD DE for DRIVER) that tests it. @PARAM matches only the six characters of a full length name (B11 of SYS1/SYS), which is how GRAPHIC, DISABLE, RESTORE, HERTZ50 and HERTZ60 reach GRAPHI, DISABL, RESTOR, HERTZ5 and HERTZ6. The word stored is FFFFH for a name alone and for =ON, =YES or =Y, 0000H for =OFF, =NO or =N, the number for a number, and the address of the first character for a string; the operand in the file says not given, 0001H for most, FFFFH for BSTEP, SYSRES, DRIVE, STEP, SYSTEM and SWAP, 0000H for SLOW, FAST, LARGE, SMALL, CYL, DISABLE, ENABLE and DRIVER. The tests differ by parameter: SLOW, FAST, CYL, DISABLE, ENABLE and DRIVER count 0000H as not given, so =OFF does nothing; BSTEP, SYSRES, DRIVE and STEP count a high byte FFH as not given (alone or =ON too) and use the low byte; TRACE, BREAK, DATE and TIME OR the two bytes, 00H OFF, FFH ON, any other value nothing (DATE=5); BLINK, RESTORE, TYPE, SMOOTH, GRAPHIC, ALIVE, WP, DELAY and CKDRV OR the two bytes, 01H not given (so the numbers 1, 256 and 257 too), 00H OFF, anything else ON; HERTZ5 and HERTZ6 act on anything but 01H, OFF included; LARGE and SMALL act only on a low byte FFH; AMPM and PRTIME need FFFFH for ON and 0000H for OFF and skip any other number; for SYSTEM and SWAP FFFFH means not given and any other word names a drive by its low byte. The kinds of value are not checked: DRIVER=5 copies a name from address 0005H, HERTZ5=OFF selects 50 Hz, and SWAP=OFF swaps with drive 0. The parameters are done in the order of the code whatever their order on the line, and a message stops the rest with whatever came before it done: SLOW or FAST, TRACE, AMPM, BREAK, PRTIME, DATE, TIME, BSTEP, BLINK, RESTORE, TYPE, SMOOTH, HERTZ5 and HERTZ6, GRAPHIC, ALIVE, SYSRES, the drive parameters, DRIVER, then SYSTEM and SWAP. SYSTEM alone, or with no parenthesis, does nothing and returns 0000H; SYSTEM () gives Parameter error. SYSTEM (SYSRES=1,2,3), which the manual says makes SYS3 resident, gives Parameter error and changes nothing, since @PARAM takes 2 and 3 for parameter words and finds no such names.

The settings in memory. SLOW and FAST (25FBH) set SFLAG$ bit 3, MODOUT$ bit 6 and port ECH (2 or 4 MHz) and store TIMSL$, the bit pattern the clock interrupt rotates to step TIMER$: 55H for FAST, and for SLOW the high byte of its word, FFH for SLOW alone (B172). TRACE adds or removes task 7 with the task control block TRACE_INT of BOOT/SYS (07B1H). AMPM sets IFLAG$ bit 4 for 24 hour times in DIR, or resets it for 12 hour times (631). BREAK sets or resets SFLAG$ bit 4. PRTIME (631, 2669H) stores a NOP (OFF: the printer driver waits for ever) or DEC DE (ON: about ten seconds, then Device not available) into @PRTIMO (0E29H); the release has DEC DE there, so the time-out is on, while the manual says the default is OFF. BLINK (26CAH) makes the cursor solid (OFF, VFLAG$ bit 6) or blinking, with @VDCTL function 8 for the character: the underline, LARGE (143), SMALL (136, which wins), or the two bytes of a number ORed (BLINK=42 is the asterisk the manual shows); LARGE and SMALL act only with BLINK. TYPE, SMOOTH and GRAPHIC set DFLAG$ bits 1, 3 and 7, and SMOOTH also puts DI (ON) or NOP (OFF) into FDDINT$ (000EH). HERTZ5 and HERTZ6 store 25 or 30 into HERTZ$ (0750H), the ticks of the clock task in a second; HERTZ6 wins.

The system information sector. DATE, TIME, BSTEP and RESTORE each read sector 2 of cylinder 0 of drive 0 into SBUFF$ (GETCFG, 2BF5H), change one byte and write it back (PUTCFG, 2BF2H); a write protected diskette ends SYSTEM with error 15. BOOT/SYS loads the sector at 0400H at every start-up, so they act from the next one: DATE and TIME store FFH (OFF, no prompt) or 00H into DTPMT$ and TMPMT$ (offsets C2H and C3H), RESTORE stores 00H (ON) or AFH (OFF) into RSTOR$ (C4H), and BSTEP=n, 0 to 3, goes into bits 1-0 of offset 73H, DCT+3 of the default DCT of drive 0, the boot step rate that FORMAT offers. CYL=n, 35 to 96, stores n less one into DCT+6 of the default DCT (offset 70H + 10 x the drive) and is read and written with the drive parameters. The sector is always drive 0's: DRIVE=d chooses only which default DCT CYL changes, and does nothing for BSTEP, though the manual's wording suggests it does; without DRIVE, CYL changes the default DCTs of all eight drives.

ALIVE and SYSRES use high memory; they, and DRIVER with a name before it loads its program, refuse with No memory space available while CFLAG$ bit 0 freezes HIGH$. ALIVE=ON (2787H) copies a module of 41 bytes below HIGH$, a header named ALIVE and a task that swaps the character at row 0, column 79 between A3H and 93H, and adds it as task 3; ALIVE=OFF removes the task and leaves the module, which MEMORY can remove. SYSRES=n (27E3H) takes n from 1 to 5 and 9 to 12 (Can't SYSRES requested module otherwise, System module already resident for the second time). The first SYSRES puts the module SYSRES below HIGH$ (PUTDVR, 2889H): RESTAB$, a word for each overlay number, and RESDVR (28E5H), and points the CALL at HKRES$ (1A6CH) in RST28 at RESDVR instead of CKMOD@. MOVITIN (2842H) loads SYSn/SYS with CKMOD@, copies it with the length word that the overlay carries at 23FEH below HIGH$ behind a header named SYS1 to SYSC, and enters the address of the length word in RESTAB$. RESDVR then serves every overlay request: an overlay already at 1E00H, or one without a RESTAB$ address, goes on to CKMOD@; a resident one is copied to 1E00H with its length word, entered at 1E00H, and its request stored for OVRLY$, with no disk read. SYSRES=2 first clears bit 7 of drive 0's DCT+4 (the CKDRV setting), even when it then refuses as already resident; with HIGH$ frozen the refusal comes first and the bit stays.

The drive parameters (2924H). DRIVE=d, 0 to 7 (Parameter error otherwise; a word from FF00H to FF07H passes as not given, B181), makes WP, CYL, DISABLE, ENABLE, STEP, DELAY and CKDRV act on that drive; without DRIVE they act on all eight in turn. WP sets or resets DCT+3 bit 7, DISABLE and ENABLE put RET or JP into DCT+0, STEP (0 to 3, Parameter error otherwise) goes into DCT+3 bits 1-0 unless the drive is alien (DCT+4 bit 4), DELAY=ON resets and DELAY=OFF sets DCT+3 bit 2 (1 and 0.5 second), and CKDRV=OFF sets DCT+4 bit 7, so that @CKDRV skips its index test. These change DCT$ in memory only, for SYSGEN to save. Without DRIVE, DISABLE is passed over with no message (and ENABLE with it), while ENABLE alone enables all eight drives, drives 4-7 too with their null driver FDCRET.

DRIVER (2A1EH) takes DRIVER="filespec", or prompts Enter DCT driver <BREAK=default> : for up to 24 characters. The program, with /DCT as the default extension, is loaded by @LOAD with SFLAG$ bit 2 set as @RUN does, and called with Register Pair DE = the DCT of DRIVE=d (0000H without DRIVE) and CFLAG$ bit 3 set, the sign that SYSTEM calls it; it returns to DVR4. ENTER alone at the prompt does nothing; BREAK copies DCT+3 to DCT+9 of the drive's default DCT from the system information sector back into DCT$ (DDCT1, 2A63H).

SYSTEM and SWAP (631, 2AF5H). SYSTEM=d becomes SWAP=d with DRIVE=0. SWAP=s with DRIVE=d (SWAP without DRIVE, or a SWAP or SYSTEM drive above 7, gives Drive specification error <0-7>!, a DRIVE above 7 has already given Parameter error, and the same drive twice Source & Destination are the same drive!) exchanges the ten bytes of the two DCTs and shows Drives :s and :d now swapped. When drive 0 is one of the two, the other must hold a system diskette, one whose GAT has bit 7 of byte CDH clear and whose directory sector 5 starts with a system file in use (SYSP1, 2BB5H); otherwise SYSTEM prompts Insert SYSTEM diskette in drive n, n being the drive that is to become drive 0 (d for SWAP=0,DRIVE=d), and waits for ENTER, BREAK giving Manual <BREAK> abort!, or under JCL refuses with Can't prompt for SYSTEM disk during JCL!. While a JCL file runs, the drive number in its FCB (00C6H) is changed with the swap (L2B81, 2B81H), as the manual says; other open files are not. Bit 7 of DCT+4 stays with the first drive number, drive 0 when it is in the swap. 6.3.0's SYSTEM=d exchanged the DCTs of drive 0 and d only, and ended with New SYSTEM drive installed and the return code FFFFH.

631 changes: the jump at 2400H and the texts and PRMTBL$ moved to the start, the Stack Pointer kept before the BREAK test, AMPM, PRTIME, SWAP and the new SYSTEM=d with its texts, the exits ABORT, LSAVESP, MANABT, JCLON, SPCERR and SAMDRV, the drive of PUTGETC loaded as LD C,L, and the patch space of 32 letters S (2CDAH).

Bugs (listed on the LS-DOS reference page): B172, SLOW given a number stores the high byte of the number into TIMSL$: SYSTEM (SLOW=1) makes it 00H, and TIMER$, the clock, the cursor blink and the tasks of slots 0-10 (type-ahead, the spooler, TRACE, ALIVE) stop (261DH). B173, ALIVE=ON does not look for an ALIVE module already in memory: each one puts another 41 bytes below HIGH$ and moves task 3 to the new copy (278DH). B174, CYL for an 8 inch drive tests the drive number with OR A where the other tests use INC A: with DRIVE=0 the count is left unchanged with no message, and without DRIVE the first 8 inch default DCT ends SYSTEM with the message, before the sector is written (2973H). B175, STEP on an alien drive jumps past DELAY and CKDRV as well, so SYSTEM (DRIVE=d,STEP=n,CKDRV=OFF) leaves a hard drive's CKDRV setting unchanged (29C2H). B176, BREAK at the DRIVER prompt stores the JP or RET into the copy of the default DCT in the sector buffer instead of the DCT, and copies only DCT+3 to DCT+9, so the drive keeps the driver a /DCT program put there, or its disabled state (2A77H). B177, without DRIVE that BREAK is meant to reset all eight drives, but the loop's test is the wrong way round and it ends after drive 0 (2A8CH). B178, SWAP clears bit 7 of DCT+4 of the second drive before the exchange, so for two drives other than 0 the CKDRV=OFF setting of the SWAP drive is lost and the DRIVE drive's stays with its number (2B5EH). B179, latent: SYSP1 does not test the read of directory sector 5; after a failed read @RDSSC has put the boot sector into SBUFF$ and read sector 5 again, so a CRC error passes when the damaged first byte still looks like a system file, and any other error gives the system diskette prompt (2BCFH). B180, after a failed @LOAD of the DRIVER program IOERR takes the error number as @LOAD returns it, with bits 7 and 6 set, so SYSTEM (DRIVER="NOFILE") shows Program not found and returns 00DFH instead of 001FH (2AB5H). B181, DRIVE's word counts as not given when its high byte is FFH, but the later tests read only its low byte: a word from FF00H to FF07H (DRIVE=X'FF00') acts on drive 0 alone, leaves the stack one word short so that SYSTEM returns one level too high, and with BREAK at the DRIVER prompt copies seven bytes over RST28's tail and CKMOD@ (1A7AH-1A80H), so the system crashes (2936H).

Member 2: SYSGEN

Member 2 holds 1051 bytes in five load blocks that cover 2400H-263FH and 264FH-2829H; the last 15 bytes of the FCB GENDCB (2640H-264EH) lie between them and are not in the file, and the file's sector buffer GENBUF (2900H-29FFH) follows the member. It serves SYSGEN, which saves the state of the system in CONFIG/SYS for SYS0/SYS to load at every start-up, or with OFF stops that. The entry keeps the Stack Pointer (2400H) and SFLAG$, clears SFLAG$ bit 5 (a DO file running) so that the copy saved in CONFIG/SYS does not hold it, and then tests BREAK. Every exit goes through SAVESP (241AH), which puts SFLAG$ back (L2568, 2568H) and clears a pending BREAK, with 0000H after SYSGEN (OFF), FFFFH after a message of its own or a BREAK at the entry, or the error number after its short message (IOERR, 2426H); each return goes into the tail of RST28 (1A77H). A build does not return at all: it ends by handing Attrib CONFIG/SYS.CCC:d (I) to @CMNDI (2562H), which makes the file invisible and goes on to @EXIT.

@PARAM (SYSGEN1, 2450H) reads ON or YES (Y), which change nothing, OFF or NO (N), and DRIVE (D), 0 by default, which must be below 8. The 631 change puts a @CKDRV test of the drive here: a write protected diskette gives Specified drive is write protected, for OFF too, as the manual says; a drive that is not ready is not refused here, and @INIT or @RDSEC gives the error later. For a build SYSGEN refuses while the spooler or MemDISK is active (DFLAG$ bits 0 and 4), while a program has set CFLAG$ bit 5 to forbid it, and while any device is routed to a file, following each chain of routes from the 31 DCBs (CKRTES, 2609H). 6.3.0 refused under DO with Command invalid during <DO> processing; 6.3.1 runs. @INIT then opens CONFIG/SYS.CCC on the drive, or makes it there, with a record length of 256.

CONFIG/SYS is written as a load module (24A2H): a name record CONFIG; one byte C9H (RET) for 0038H, so that an interrupt while the file loads only turns the interrupts off; the drivers added to the low memory driver zone, 0FF4H (DVREND$) up to the byte below DVRHI$; the modules in high memory, HIGH$+1 to PHIGH$; the system areas of ADRTBL$ (27B4H): HIGH$, LOW$, TIMSL$, DVRHI$ with the 31 DCBs (routes, links, filters and the printer's lines), EXTDBG$, the interrupt vectors and task slots, FLGTAB$ with the other flags and the @ICNFG and @KITSK hooks, the word of SVC 75 (VERIFY), HKRES$, the key repeat delay and rate, the video mode and cursor bytes, SVCs 120 to 127, 0008H-0017H (the RST 08H and RST 10H zones, with FDDINT$, the setting of SYSTEM (SMOOTH)), HERTZ$ and the printer time-out byte of SYSTEM (PRTIME) (631); the 80 bytes of DCT$ as a block that loads at 4300H, where SYS0's STUB copies it into DCT$; a byte C3H for 0038H; and the transfer address 0000H. Blocks are 254 bytes at most (DUMP, 2570H). This covers the manual's list: devices and drivers, tasks, high memory modules, VERIFY, the DCBs and the state of CAPS, which is a bit of KFLAG$. The date and the time, and banks 1 and 2 of memory, are not saved. After the file is closed SYSGEN reads sector 2 of cylinder 0 of the drive, the sector that BOOT/SYS loads at 0400H, stores 00H at its offset 01H, which becomes ZERO$ (0401H), and writes it back (252FH): at the next start-up SYS0/SYS loads CONFIG/SYS unless that byte is not 00H or CLEAR is held. A diskette whose DSKTYP$ byte (offset C0H) is 00H gets the warning Target drive contains no system.

SYSGEN (OFF) (CFGOFF, 25CCH) stores C9H at offset 01H of sector 2 and writes it, then opens CONFIG/SYS and removes it with @REMOVE. Any @OPEN error is reported as No user configuration found, with the switch already written. The configuration in memory is left as it is until the next start-up, as the manual says. 631 changes: the entry (Stack Pointer first, SFLAG$ kept and its bit 5 cleared, BREAK tested after), L2568 at SAVESP and before @CMNDI, the @CKDRV test with ISWP$ in place of NOINDO$, and the ADRTBL$ entry for @PRTIMO.

SYSGEN OFF typed without the parenthesis builds a configuration: @PARAM reads only a list in parentheses, so the word is not read (SYS1/SYS, as for every command). The overlay number OVRLY$ (0069H) is in the 50 bytes saved from INTIM$ and is always A4H, SYS2's request from @INIT; that is harmless, since at start-up @LOAD opens CONFIG/SYS through @OPEN, which has loaded SYS2 at 1E00H before the saved byte comes back.

Bugs (listed on the LS-DOS reference page): B169, a successful build ends with @CMNDI, whose CLEANUP drops the stack and BREAK handler of a program that ran SYSGEN through @CMNDR, so that program never gets control back: ATTRIB runs and LS-DOS Ready, or the next DO line, follows; SYSGEN (OFF), the refusals and the errors return normally (2562H). B170, no effect: the entry that the source calls the DEBUG vector and DBGHK saves 19A4H-19A6H, EXTDBG$ and the first byte of @REMOVE, not @DBGHK (199FH), which CLEANUP sets from SFLAG$ bit 7 anyway (27C4H). B171, @INIT opens an existing CONFIG/SYS and the build writes over it from the start, while sector 2 still says to load it: a rebuild that fails part way (Disk space full, a write fault) ends through IOERR with the file not closed, new at the front and old after that up to its old end, and the next start-up loads it all the same (249EH).

Member 3: FORMS

Member 3 holds 1490 bytes in two runs of load blocks, 2400H-2801H and 280EH-29DDH; the twelve bytes between them are INBUFF$ (2802H-280DH), the answer to a QUERY prompt, and TEMBUF (29DEH-29E2H) and DUPDA (29E3H-29ECH) follow the member. It serves FORMS, which shows or changes the settings of the forms filter FORMS/FLT. The entry keeps the Stack Pointer (2400H) and every exit goes through SAVESP (2422H), which clears a pending BREAK and returns 0000H, FFFFH after Forms Filter not Resident or BREAK at a prompt, or the error number after its short message (IOERR, 240EH); each return goes into the tail of RST28 (1A77H). There is no BREAK test at the start. The member has no 631 change: its source is still titled FORMS - LS-DOS 6.2.

DOINIT (2700H) finds the filter with @GTMOD and the name $FF. FORMS/FLT's header is a JR, the word of its last byte, the name, the word of its DCB and a word 0000H, so the ten bytes of its data area start four bytes after the end of the name: PAGE (offset 00H), the line counter (01H), LINES (02H), the character counter (03H), the From and To bytes of XLATE (04H, 05H), INDENT (06H), a flag byte (07H: bit 0 ADDLF, bit 1 FFHARD, bit 2 TAB), CHARS (08H, 0 for no wrap-around) and MARGIN (09H). FORMS keeps the address as the operand of DATAREA and copies the bytes to DUPDA, with Index Register IX pointing there. Any module named $FF serves, attached to the printer or not. The call of @FLAGS there is of no use: nothing reads Index Register IY before 24FEH and 252CH load it.

With nothing after the spaces FORMS shows the settings (DSFORMS, 2489H), one to a line: PAGE   =  66, LINES  =  66, CHARS  = OFF, MARGIN =   0, INDENT =   0, ADDLF  = OFF, FFHARD = OFF and TAB    =  ON for a filter just installed, then an empty line (the line feed after TAB's setting and the 0DH at 28FFH); the flag byte of a new filter is 04H: tabs are expanded from the start, though the manual says they are expanded when TAB is given. A line XLATE  = X'aa' => X'bb', between two empty lines, follows only when the two bytes differ. Anything else goes to @PARAM (243EH) with the names ADDLF, CHARS, FFHARD, INDENT, LINES, MARGIN, PAGE, QUERY, TAB, XLATE and DEFAULT, or their first letters. A word without a parenthesis (FORMS ADDLF) is not read at all: nothing changes, nothing is shown, and the return code is 0000H. XLATE=X'aabb' is split so that aa is the byte translated and bb what it becomes; a value below 256 translates 00H. DEFAULT (245CH) copies the filter's starting values into its data area, the two counters included, shows them and ends; any other parameter on the line is passed over.

Without QUERY, INITVAL (2619H) gives each of CHARS, INDENT, LINES, MARGIN and PAGE that was not given the filter's present value, and CKCOMM (24FCH) checks each parameter given, in the order PAGE, LINES, CHARS, MARGIN, INDENT, the switches, XLATE. PAGE and LINES must be 1 to 255 with LINES not more than PAGE; CHARS 1 to 255, or a switch (OFF is no wrap-around, CHARS alone or ON is 255); MARGIN and INDENT 0 to 255, with MARGIN below CHARS and MARGIN plus INDENT below CHARS; ADDLF, FFHARD and TAB only switches; XLATE a number of any size (the split leaves both bytes below 256, so FORMS (XLATE=300) translates 01H into 2CH), XLATE alone or a string being refused. Any refusal is Parameter error with nothing changed. STFPRMS (25CCH) then stores every parameter whose response byte is set into the filter's data area, by patching the displacement of an LD (IX+d),C and the bit of a SET or RES; nothing is shown.

QUERY (PROMPT, 252AH) asks for all ten settings in turn, with prompts such as Physical Page Length {66}, each padded so that its question mark is in column 38 (DISPROM, 2558H). ENTER alone keeps a setting. An answer of up to three keys (INPUT, 2743H) is read by @PARAM as the value of a one letter parameter F, from the text (F= that INBUFF$ continues (STUFVAL, 25A3H), and checked by the same routine as on the line; a refused answer is asked again. Three keys allow a decimal byte for XLATE, not X'nn'. Here the checks also correct the settings still to come: a PAGE below LINES makes LINES equal to PAGE (PQUERY, 2658H), and a CHARS not above MARGIN plus INDENT makes both 0, a MARGIN whose sum with INDENT is not below CHARS makes INDENT 0; the changed defaults show in the prompts that follow. With QUERY the numbers given on the line are replaced by the present settings first; BREAK at a prompt ends FORMS with FFFFH and nothing stored.

Bugs (listed on the LS-DOS reference page): B182, QUERY and DEFAULT are tested by their response bytes, so QUERY=NO asks all the same and DEFAULT=NO puts the starting values back (2456H). B183, without QUERY a PAGE below the LINES in force is refused: FORMS (PAGE=51) gives Parameter error while LINES is 66, though the manual says LINES defaults to PAGE and QUERY lowers it (2656H). B184, MARGIN and INDENT must be below CHARS, so neither can be set, not even to 0, while CHARS is OFF, the filter's starting state, though the filter puts in the margin without wrap-around (26A8H). B185, without QUERY a MARGIN whose sum with INDENT is not below CHARS is meant to make INDENT 0, but it marks INDENT with the response byte 01H, which INDENT's check then refuses: Parameter error (269CH). B186, without QUERY CHARS is not checked against the MARGIN and INDENT in force, so FORMS (CHARS=12) after FORMS (CHARS=80,MARGIN=10,INDENT=6) is taken, and the filter's wrap-around then calls itself without end on the first line that wraps, sending lines of spaces while the stack runs down over the memory below it (2680H). B187, an answer to a prompt is stored before it is checked; a refused one stays, so ENTER after it installs it when the parameter was also on the line (FORMS (Q,P=40), answer 0, then ENTER: PAGE 0) and makes it the limit of the later checks otherwise; a refused MARGIN kept so can be above CHARS and start B186 (25BBH). B188, PAGE and LINES are changed with the filter's line counter left as it is, so a PAGE set below the lines already printed on the page makes the next line end feed PAGE less the counter, modulo 256, lines: 245 for PAGE 40 after 50 lines (25EBH). B189, with QUERY the switches and XLATE given on the line are not replaced by the present settings as the numbers are: their prompts show the present setting, and ENTER installs the line's value, unchecked, as CKCOMM does not run with QUERY: FORMS (Q,A=5) sets ADDLF (2619H).

Member 4: SETCOM

Member 4 holds 1519 bytes, 2400H-29EEH, in six load blocks without a gap; INBUF, the answer to a QUERY prompt, follows it at 29EFH. It serves SETCOM, which shows or changes the settings of the serial driver COM/DVR. The entry keeps the Stack Pointer (2400H) and every exit goes through SAVESP (240AH), which clears a pending BREAK and returns 0000H, FFFFH for BREAK at a prompt, or the error number after its short message (IOERR, 2420H); each return goes into the tail of RST28 (1A77H). When no module $CL is in memory SETCOM shows COM/DVR not installed and returns 0008H, Device not available, without its message (BADMOD, 242BH). There is no BREAK test at the start, and the member has no 631 change.

@GTMOD returns the byte after the name $CL, the word of the DCB that COM/DVR was set on (CLDCB), and SETCOM keeps it in Index Register IX (2444H); the driver's data area is four bytes on: MSMASK (IX+04H), the line conditions, a check bit for each line in bits 3-0 (CTS 3, DSR 2, CD 1, RI 0) and the level it must have in bits 7-4; UCIMAGE (IX+05H), the control byte of the UART (bit 7 even parity, bits 6-5 the word length 00 5, 10 6, 01 7, 11 8, bit 4 two stop bits, bit 3 parity off, bit 2 transmit on, bit 1 DTR and bit 0 RTS, 0 for TRUE); BAUDRT (IX+06H), the transmit rate code in bits 7-4 and the receive rate code in bits 3-0; LOGBRK (IX+07H), the received character that counts as BREAK, 00H for none. COM/DVR's SEND writes UCIMAGE to the UART before every character; the rates reach it only through @CTL function 2.

When the first character after the spaces is not an opening parenthesis SETCOM shows the settings (DSPALL, 2631H) and anything else on the line is not read: RS232 parameters: Baud=300, Word=7, Stop=1, Parity=EVEN, Break=X'03', then Output control: DTR=ON, RTS=OFF and Input control: RI=IGNORE, DSR=IGNORE, CD=IGNORE, CTS=IGNORE for the starting values. A line condition shows IGNORE when neither of its bits is set, ON when only the check bit is (the driver waits for TRUE before it sends), OFF when both are (it waits for FALSE). With a parenthesis @PARAM reads BREAK, QUERY (Q), BAUD (B), WORD (W), STOP (S), PARITY (P), EVEN (E), ODD (O), DTR, RTS, RI, CD, DSR, CTS and DEFAULT (D). DEFAULT and QUERY are tested by their values, so =OFF works for both. DEFAULT (DEFALT, 26CCH) stores the starting values at once: no line conditions, A5H (even parity, 7 bits, one stop bit, DTR TRUE, RTS FALSE), 55H (300 baud) and CTRL C as BREAK; the other parameters are then applied over them.

QUERY (246EH) asks for the baud rate, word length, stop bits, parity, BREAK, DTR, RTS, RI, DSR, CD and CTS, each not given on the line with a kind its entry allows (CKRSP, 2663H). Each prompt is the setting as the display shows it, then the cursor moved to column 20 of the same row with @VDCTL and a question mark (GETRSP, 2674H); up to ten keys are read and handed to @PARAM as the value of a one letter parameter F whose kinds are the entry's, and the result is copied into the entry. ENTER alone keeps the setting, even a value given on the line with a kind its entry does not take: SETCOM (Q,BAUD=ON) asks for the rate, and ENTER there ends in Parameter error after the last prompt. BAUD, WORD, STOP and PARITY are checked at once and asked again when refused.

SETPARAM (287FH) checks and stores, with PRMERR's address on the stack so that each refusal is Parameter error. BAUD must be one of the sixteen rates of BAUDTBL, 50 to 19200 (135 stands for 134.5), and sets both rates. WORD is 5 to 8, STOP 1 or 2. PARITY is a switch, ON or OFF, or a string whose first letter is E or O (PARITY="E"), which also turns parity on; PARITY=EVEN on the line is a Parameter error, as @PARAM takes as a word value only one that begins with Y, N, ON or OF (PARITY=NONE is OFF), and the manual's form is PARITY=ON,EVEN. EVEN and ODD set only the parity bit and do not turn parity on; a string for PARITY, or PARITY=OFF, makes SETCOM pass over them. BREAK alone or ON is CTRL C, BREAK=n the character n, BREAK=0 none. DTR and RTS ON hold the line TRUE. RI, DSR, CD and CTS ON make the driver wait for TRUE, OFF for FALSE (SETIT, 298AH); nothing but DEFAULT, which clears all four, puts a line back to IGNORE, though the manual says a line not specified is ignored. Last, @CTL function 2 on the driver's DCB resets the UART and sends it the control byte and the rates (2529H); nothing is shown. MSMASK, UCIMAGE and LOGBRK act as soon as they are stored, since the driver reads them as it sends and receives; only the rates wait for @CTL. The manual's SETCOM (BREAK), which it says restores the default values, only makes CTRL C the BREAK character.

Bugs (listed on the LS-DOS reference page): B190, BREAK=OFF stores 80H, not 00H, so COM/DVR still takes a received 80H and a framing error for BREAK, where the manual says OFF never sets the BREAK bit; BREAK=0 is the way to turn it off; BREAK=N and OFF at the Break prompt store 80H as well (2936H). B191, DEFAULT and BAUD are stored into the driver's data area as soon as they are read, and a later refusal ends SETCOM before @CTL: SETCOM (BAUD=1200,WORD=9) gives Parameter error, and the display then says Baud=1200 while the UART still runs at the old rate (288DH). B192, at the Parity prompt of QUERY the answers EVEN and ODD, as the display shows them, are refused by @PARAM and asked again with no message; only a switch (ON, OFF, Y, N) or a quoted string starting with E or O is taken (26B3H). B193, the QUERY checks of WORD and STOP read only the low byte of the answer, and the BREAK answer is not checked at all, so 261 at Word=, 257 at Stop= or 300 at Break= is taken and refused by SETPARAM after the last prompt, with Parameter error (248FH). B194, a quoted answer at Parity= is read again by SETPARAM from INBUF after the later answers have been typed over it: any later answer but ENTER gives Parameter error, or another parity (28E0H).

Member 5: SETKI

Member 5 holds 406 bytes, 2400H-2595H, and serves SETKI. In the file its two load blocks, 2400H-24FFH and 2500H-258DH, are followed by the patch record SETKI1 and two more blocks, 2583H (one byte, 96H) and 258EH-2595H (eight bytes), which the loader reads over and after them; the rows show the result. The entry keeps the Stack Pointer at SAVESP (2400H), so every exit returns at the depth of the entry and first clears a BREAK still pending with @CKBRKC; the return codes are 0000H, FFFFH for BREAK at a prompt, or the error number after its short message (IOERR, 2423H). Every exit returns into the tail of RST28 (1A77H), and on to @EXIT or to the caller of @CMNDR. SETKI changes two bytes of the keyboard driver of BOOT/SYS: KIDATA$+2 (08FEH), the delay before a held key first repeats, and KIDATA$+3 (08FFH), the time between the repeats, both counted in ticks of TIMER$, which steps 30 times a second (33.3 ms; 22 and 2 in the release, 0.73 and 0.067 seconds). It finds them through @GTMOD and the module $KI (PGRM, 242EH), and would answer Device not available if no module of that name were in memory.

Without a parameter list SETKI shows the line Wait   =  22, Rate   =   2 (the manual prints it as Wait= 15, Rate =2); anything after the spaces that is not a parenthesis is not read. With a list (GETNEW, 2462H) @PARAM reads DEFAULT, RATE, WAIT and QUERY, or D, R, W and Q. DEFAULT puts back 22 and 2 first. QUERY then asks for each value that was not given a number on the line, with the prompt Wait   = {22}  ? (SHOW, 24DEH), reads up to three keys (GETIT, 2582H), keeps the value on ENTER alone and asks again for a value below the limit. Last, the numbers given on the line are checked and stored, WAIT and then RATE (CKPARM, 24B8H). Every value is taken modulo 128, as the manual says, and must then be 10 or more for WAIT and 1 or more for RATE (CHECK, 257BH), else Parameter error; nothing is shown after a change. WAIT or RATE given as a flag or a string (WAIT, R="5") is passed over with no message, as only bit 7 of its response byte, a number, is tested.

The patch. The member's 631 changes put SVCs in place of 6.3.0's own conversions: HEXDEC calls @HEXD (2566H), and GETIT was to call @DECHEX, but the call was left out of the source, so in 6.3.1 Level 1B the keys of an answer to a QUERY prompt, even ENTER alone, were run as code at INBUF, then 258EH. MISOSYS's FIX631B/JCL (Level 1C) puts it in with PATCH, which on a library adds the patch record SETKI1: the low byte of INBUF's address goes from 8EH to 96H, and the eight bytes LD A,60H / RST 28H / LD D,B / LD E,C / LD A,C / OR A / RET follow the JP C at 258BH. The restored source assembles the same bytes in place (switch @BLD631C), so its build of SYS8/SYS has no patch record and is 17 bytes shorter, with the byte of SPOOL's header 11H lower.

Bugs (listed on the LS-DOS reference page): B167, each value is stored as soon as it is accepted, so a command that then fails changes the settings anyway: SETKI (WAIT=15,RATE=0) gives Parameter error with the delay already 15, SETKI (DEFAULT,WAIT=5) puts back 22 and 2 before its Parameter error, SETKI (Q,W=5) keeps the rate answered at the prompt before its Parameter error, and BREAK at the Rate prompt of QUERY keeps the delay just typed (24D7H). B168, the patched GETIT returns Z, which QUERY takes for ENTER alone, whenever the low byte of the value is 00H, so an answer of 0, 256, 512 or 768 keeps the old value with no new prompt, while 5 is refused and asked again; 6.3.0's own DECHEX returned Z only when the answer did not begin with a digit (2594H).

Variables

Memory Used by Member 1 (SYSTEM)

Address
Size
Contents
000EH
1 byte
FDDINT$
F3H (DI) for SMOOTH=ON (2743H), 00H (NOP) for OFF (2738H).
002BH
1 byte
TIMSL$
55H for FAST, the high byte of SLOW's word for SLOW (261EH).
0069H
1 byte
OVRLY$
Set to 00H before a SYSRES load (2842H); read by RESDVR in high memory (28E7H).
006CH
1 byte
CFLAG$ (Index Register IY + 02H)
Bit 0, HIGH$ frozen: read by GOTMEM? (2C0CH); bit 3, a system request, set for the DRIVER program (2ABEH).
006DH
1 byte
DFLAG$ (Index Register IY + 03H)
Bit 1 type-ahead (TYPE, 271DH, 2723H), bit 3 SMOOTH (2732H, 273DH), bit 7 graphics printer (GRAPHIC, 276BH, 2771H).
0072H
1 byte
IFLAG$ (Index Register IY + 08H)
Bit 4, 24 hour times in DIR: reset for AMPM=ON (264BH), set for OFF (2651H).
0076H
1 byte
MODOUT$ (Index Register IY + 0CH)
Bit 6, the 4 MHz clock: set by FAST (260DH), reset by SLOW (2619H), read at 2621H and sent to port ECH at 2624H.
007CH
1 byte
SFLAG$ (Index Register IY + 12H)
Bit 2 set before @LOAD of DRIVER (2AADH); bit 3 FAST (2609H, 2615H); bit 4 BREAK disabled (265FH, 2665H); bit 5, a JCL file running, read at 2B84H and 2BD9H.
007FH
1 byte
VFLAG$ (Index Register IY + 15H)
Bit 6, a solid cursor: set by BLINK=OFF (26D5H), reset by any other BLINK (26DBH).
00C6H
1 byte
JFCB$+6
The drive of the open JCL file, read and changed by L2B81 (2B87H-2B9BH).
0470H-04BFH
80 bytes
DCT$ (Index Register IY)
The DCTs: DCT+0 (ENABLE, DISABLE, 29AFH), DCT+3 (WP, STEP, DELAY), DCT+4 (CKDRV, alien test 29BEH), DCT+3 to DCT+9 from the defaults (2A81H), exchanged by SWAP (2B6EH); 0474H bit 7 reset by SYSRES=2 (27FBH).
0750H
1 byte
HERTZ$
The clock task's ticks in a second: 25 for HERTZ5 (2750H), 30 for HERTZ6 (275DH).
0E29H
1 byte
@PRTIMO
The printer driver's DEC DE (1BH) or a NOP (00H), stored by PRTIME (267AH).
1A6DH-1A6EH
2 bytes
HKRES$+1
The address RST28's CALL at 1A6CH calls: read at 280AH, set to RESDVR in high memory at 28AFH.
1A70H, 1A75H-1A76H
3 bytes
RST28's operands
The request for OVRLY$ and the overlay's entry address, set by RESDVR in high memory (291AH, 290CH).
1D00H-1DFFH
256 bytes
SBUFF$
Sector 2 of cylinder 0 of drive 0 (GETCFG, PUTCFG): offsets 70H-BFH the default DCTs (Index Register IX, CYL, DRIVER BREAK), 73H BSTEP, C2H DATE, C3H TIME, C4H RESTORE; for SWAP the GAT and directory sector 5 of the new drive 0 (2BBEH, 2BCFH), or after a failed read of sector 5 the boot sector (cylinder 0, sector 1) that @RDSSC reads to renew DCT+9.
1E00H-23FFH
1536 bytes
The overlay area
SYSn/SYS loaded there for SYSRES (284CH) and copied below HIGH$; 23FEH-23FFH, its length, read at 2856H and stored by RESDVR (2914H).
25FCH-2AF7H
2 bytes each
The parameter words
The operands of the LD BC (LD DE at 2A1EH) of each parameter, stored by @PARAM (25F4H): their addresses are in PRMTBL$ (24ECH-25E3H); 292CH, DRIVE's low byte, is read again as the drive; DRIVE's word is also written by SYSTEM=d (2B04H).
27BCH, 27C8H
2 bytes each
The ALIVE module's words
The last byte (2790H) and the task control block (27A3H), written before the copy.
2837H, 283DH
3 bytes
The RES1 header
Its last byte (2852H) and the overlay's digit in the name SYSn (2878H).
28B8H, 28F1H-28F2H
4 bytes
The SYSRES module
Its last byte (288CH) and RESD1's pointer to RESTAB$ less 3 (289EH), written before the copy.
2AC7H-2AC8H
2 bytes
LSAVESP+1
0000H in the file; the Stack Pointer of the entry, stored at 25E5H and loaded at 2AC6H.
2B08H-2B09H
2 bytes
SWAP$
The word of SWAP, also stored by SYSTEM=d at 2AFDH.
2B48H, 2B58H, 2BACH
1 byte each
L2B48, L2B58, L2BAC
The first and second drives of a swap (2B15H, 2B1EH, 2B2FH) and the drive tested for a system diskette (2BA3H).
2C5AH, 2C65H, 2C6CH
1 byte each
The digits of the messages
NDRIVE$ (2BA8H), SRCDRV$ (2B24H) and DSTDRV$ (2B32H).
2CFAH-2D19H
32 bytes
FCB1
The FCB of the DRIVER program (2A9EH), its name copied or typed from 2CFBH (2A42H, 2A5AH); the buffer of the system diskette prompt (2BECH).

Routines of Other Files Called by Member 1

AddressRoutine
0500H@LOGOT (BOOT/SYS), SVC 12: every message of SETERR (2AE6H).
052DH@DSPLY (BOOT/SYS), SVC 10: the DRIVER prompt (2A51H), the swap message (2B7CH), the system diskette prompt (2BE3H).
0553H@CKBRKC (BOOT/SYS), SVC 106: BREAK at the entry (25EBH), cleared at LSAVESP (2ACBH).
0585H@KEYIN (BOOT/SYS), SVC 9: the driver's name (2A5AH), ENTER or BREAK at the system diskette prompt (2BECH).
0B99H@VDCTL (BOOT/SYS), SVC 15: function 8, the cursor character (26FAH); called directly by the ALIVE task, functions 1 and 2 (27D0H, 27DFH).
18D8H@RDSSC (SYS0/SYS), SVC 85: the GAT and directory sector 5 of the new drive 0 (2BBEH, 2BCFH).
1948H@HIGH$ (SYS0/SYS), SVC 100: HIGH$ read (2C0AH) and set (279DH, 2885H, 2898H).
196AH@FLAGS (SYS0/SYS), SVC 101: Index Register IY = 006AH (25FAH, 2AACH).
1981H@FSPEC (the SYS0/SYS stub that loads SYS1/SYS), SVC 78: the driver's file spec (2AA3H).
1984H@FEXT (the SYS0/SYS stub that loads SYS1/SYS), SVC 79: the extension DCT (2AA9H).
1987H@PARAM (the SYS0/SYS stub that loads SYS1/SYS, whose code is at 21D7H), SVC 17: PRMTBL$ (25F4H).
1993H@CKDRV (the SYS0/SYS stub that loads SYS2/SYS), SVC 33: the drive that is to become drive 0 (2BAFH).
19E8H, 19F4H@WRSEC and @RDSEC (SYS0/SYS), SVCs 53 and 49: sector 2 of cylinder 0 of drive 0 (2BFEH).
1A1EH@GTDCT (SYS0/SYS), SVC 81: Index Register IY = the DCT of a drive (2941H, 2B4BH, 2B5BH, 2BB4H).
1A7FHCKMOD@ (SYS0/SYS): the overlay for SYSRES (284CH, called directly), and every request RESDVR passes on (2921H).
1B0FH@ERROR (the SYS0/SYS stub that loads SYS4/SYS), SVC 26: the short error message (2AF1H).
1B38H@LOAD (SYS0/SYS), SVC 76: the DRIVER program (2AB3H).
1CD7H, 1CDAH@RMTSK and @ADTSK (SYS0/SYS), SVCs 30 and 29: task 7 for TRACE (263EH, 2637H) and task 3 for ALIVE (2784H, 27B7H).

Memory Used by Member 2 (SYSGEN)

Address
Size
Contents
001CH-001DH
2 bytes
PHIGH$
The physical top of memory, the end of the high memory dump (24D1H).
006CH
1 byte
CFLAG$ (Index Register IY + 02H)
Bit 5, SYSGEN forbidden by a program: tested at 2487H.
006DH
1 byte
DFLAG$ (Index Register IY + 03H)
Bit 0, the spooler active (2479H); bit 4, MemDISK active (2480H).
007CH
1 byte
SFLAG$
Kept at 2408H, bit 5 (JCL active) reset at 2409H, put back by L2568 (256CH).
0206H-0207H
2 bytes
DVRHI$
The next free byte of the low memory driver zone, the end of the first dump (24C3H).
0208H-02FFH
248 bytes
The DCBs
Walked by CKRTES from KIDCB$ (260EH), saved with DVRHI$ by the ADRTBL$ entry at 27C0H.
0420H-046FH
80 bytes
INBUF$
The command line that SYS1 passes, read by @PARAM (2455H); @CMNDI copies ATRBIT into it (2562H).
0470H-04BFH
80 bytes
DCT$
Written into CONFIG/SYS as a block that loads at 4300H (2509H).
1D00H-1DFFH
256 bytes
SBUFF$
Sector 2 of cylinder 0, read and written at 253BH-2545H and 25D8H-25E3H; offset 01H (1D01H) set to 00H or C9H, offset C0H (1DC0H) tested at 254BH.
241BH-241CH
2 bytes
SAVESP+1
0000H in the file; the Stack Pointer of the entry, stored at 2400H and loaded at 241AH.
245DH-245EH
2 bytes
DRIVE+1
0000H in the file; the value of DRIVE, stored by @PARAM, read at 245CH, 2535H and 25D2H.
256DH
1 byte
L256D
00H in the file; SFLAG$ as it was at the entry, stored at 240BH, the operand that L2568 stores back.
2600H-2601H
2 bytes
NPARM+1
0000H in the file; the value of OFF or NO, stored by @PARAM, read at 25FFH.
2607H-2608H
2 bytes
YPARM
0000H in the file; the value of ON or YES, stored by @PARAM and not read.
262FH-264EH
32 bytes
GENDCB
The file spec CONFIG/SYS.CCC:d, its drive digit at 263EH (CFGSPEC, stored at 2467H), then the FCB of CONFIG/SYS made by @INIT (249EH) or @OPEN (25EEH); 2640H-264EH are not in the file.
2684H
1 byte
ATRSPEC
The drive digit of ATRBIT, stored at 246AH.
2900H-29FFH
256 bytes
GENBUF (no bytes in the file)
The sector buffer of CONFIG/SYS, given to @INIT at 2497H.

Routines of Other Files Called by Member 2

AddressRoutine
0028HRST 28H, entered by a JP with Register A = 18H for @CMNDI (2562H).
0500H@LOGOT (BOOT/SYS), SVC 12: SYSGEN's messages (2448H, by a CALL; 2553H, 2559H, 25FDH).
0553H@CKBRKC (BOOT/SYS), SVC 106: BREAK at the entry (2411H) and at every exit but the end of a build (2422H).
0645H@PUT (BOOT/SYS), SVC 4: every byte of CONFIG/SYS (262AH).
1948H@HIGH$ (SYS0/SYS), SVC 100: HIGH$ (24DBH).
196AH@FLAGS (SYS0/SYS), SVC 101: Index Register IY = 006AH (245BH).
197EH@CMNDI (SYS1/SYS), SVC 24: the ATTRIB command at the end (2562H).
1987H@PARAM (the SYS0/SYS stub that loads SYS1/SYS, whose code is at 21D7H), SVC 17: ON, OFF, YES, NO and DRIVE (2455H).
198AH@OPEN (SYS2/SYS), SVC 59: CONFIG/SYS for OFF (25EEH).
198DH@INIT (SYS2/SYS), SVC 58: CONFIG/SYS for a build (249EH).
1990H@GTDCB (SYS2/SYS), SVC 82: the DCB of KI (260EH).
1993H@CKDRV (SYS2/SYS), SVC 33: write protection of the drive (246FH).
1999H@CLOSE (SYS3/SYS), SVC 60: CONFIG/SYS (252BH).
19A6H@REMOVE (SYS10/SYS), SVC 57: CONFIG/SYS for OFF (25F4H).
19E8H@WRSEC (SYS0/SYS), SVC 53: sector 2 of cylinder 0 (2545H, 25E3H).
19F4H@RDSEC (SYS0/SYS), SVC 49: sector 2 of cylinder 0 (253BH, 25D8H).
1A1EH@GTDCT (SYS0/SYS), SVC 81: Index Register IY = DCT$ (2505H).
1B0FH@ERROR (the SYS0/SYS stub that loads SYS4/SYS), SVC 26: the short error message (242EH).

Memory Used by Member 3 (FORMS)

Address
Size
Contents
0420H-046FH
80 bytes
INBUF$
The command line that SYS1 passes, read from 242EH and by @PARAM (2443H).
The module $FF
10 bytes
PFDATA$, the data area of FORMS/FLT, four bytes after the end of the name (2711H)
Copied to DUPDA by DOINIT (271BH), read by INITVAL (2633H), written by DEFAULT (2468H) and by STFPRMS (25EBH, 2612H) through Index Register IX: PAGE +00H, the line counter +01H, LINES +02H, the character counter +03H, XLATE From +04H and To +05H, INDENT +06H, the flags +07H, CHARS +08H, MARGIN +09H.
2423H-2424H
2 bytes
SAVESP+1
0000H in the file; the Stack Pointer of the entry, stored at 2400H and loaded at 2422H.
251CH-251DH
2 bytes
CALLINS+1
0000H in the file; the check routine of the entry of STRTAB, stored at 2518H, called at 251BH.
25B4H-25B5H
2 bytes
VALUE+1
0000H in the file; the value of an answer, stored by @PARAM through FAKETAB (25ACH), read at 25B3H.
25D1H-25D2H
2 bytes
DATAREA+2
0000H in the file; the address of the filter's data area, stored at 2712H, read at 245CH, 25CFH and 262FH.
25EDH
1 byte
IXINST+2
00H in the file; the offset of the setting to store, written at 25E8H.
2615H
1 byte
IXINST2+3
86H (RES 0) in the file; the SET or RES of the switch's bit, written at 260FH.
2769H-27C5H
1 byte each
The response bytes ARESP 2769H, CRESP 2772H, FRESP 277CH, IRESP 2786H, LRESP 278FH, MRESP 2799H, PRESP 27A1H, QRESP 27AAH, TRESP 27B1H, XTRESP 27BAH, DRESP 27C5H
00H in the file; set by @PARAM (2443H) and by STUFVAL (25C9H), IRESP also by CHNGIND (269CH), MRESP by RCHARS (2699H), LRESP by PQUERY (265FH); read by INITVAL, CKCOMM, STFPRMS and the checks.
27C9H-27DEH
2 bytes each
The values QPARM 27C9H, CPARM 27CBH, IPARM 27CDH, LPARM 27CFH, MPARM 27D1H, PPARM 27D3H, XTPARM 27D5H, APARM 27D7H, FPARM 27D9H, TPARM 27DBH, DPARM 27DDH
0000H in the file; stored by @PARAM, their low bytes also by INITVAL (2641H), STUFVAL (25BBH) and the checks; the high byte of XTPARM (27D6H) is cleared at 2451H; QPARM and DPARM are not read.
27DFH, 27E2H-27E3H
3 bytes
XFRESP and XFPARM
The response byte and the value of the From byte of XLATE, set at 244AH and 2453H or by STUFVAL, read by STFPRMS.
2802H-280DH
12 bytes
INBUFF$ (no bytes in the file)
The answer to a prompt, up to three keys and the 0DH, written by @KEYIN (274EH), read by @PARAM after the text (F= of FAKEPRM (25ACH).
2869H, 286BH
1 byte each
The type byte of FAKETAB and FAKERES
00H in the file; the type written by PROMPTL (2534H), the response set by @PARAM and read at 25B0H.
2897H-2918H
130 bytes
VALUES
The text of the settings: the numbers and switches written by DSFORMS (2489H-24F5H), the 0DH at 28FFH made a line feed at 24E9H; shown at 243AH and read by STUFDEF as the defaults of the prompts.
29DEH-29E2H
5 bytes
TEMBUF (after the member)
Five decimal characters written by @HEXDEC (272DH), the last three copied at 2736H.
29E3H-29ECH
10 bytes
DUPDA (after the member, Index Register IX)
The copy of the filter's data area made by DOINIT (271BH) and DEFAULT (246FH), shown by DSFORMS; LINES (29E5H, by PQUERY at 265CH), INDENT and MARGIN (29E9H, 29ECH, by RCHARS at 268CH-268FH with QUERY) changed by the checks; INDENT also by RMARGIN (26B8H), with or without QUERY.

Routines of Other Files Called by Member 3

AddressRoutine
0500H@LOGOT (BOOT/SYS), SVC 12: Forms Filter not Resident (241EH).
052DH@DSPLY (BOOT/SYS), SVC 10: the settings and the end of a prompt (26FAH).
0553H@CKBRKC (BOOT/SYS), SVC 106: clears a pending BREAK at every exit (2427H).
0585H@KEYIN (BOOT/SYS), SVC 9: an answer of up to three keys (274EH).
0642H@DSP (BOOT/SYS), SVC 2: the characters of a prompt (26F4H).
06F6H@HEXDEC (BOOT/SYS), SVC 97: a setting in decimal (272DH).
07C2H@HEX8 (BOOT/SYS), SVC 98: the bytes of XLATE in hex (2740H).
1987H@PARAM (the SYS0/SYS stub that loads SYS1/SYS, whose code is at 21D7H), SVC 17: the parameter list (2443H) and each answer (25ACH).
196AH@FLAGS (SYS0/SYS), SVC 101: called by DOINIT, its result not used (2703H).
19B2H@GTMOD (the SYS0/SYS stub that loads SYS12/SYS), SVC 83: the module $FF (2709H).
1B0FH@ERROR (the SYS0/SYS stub that loads SYS4/SYS), SVC 26: the short error message (2416H).

Memory Used by Member 4 (SETCOM)

Address
Size
Contents
0420H-046FH
80 bytes
INBUF$
The command line that SYS1 passes, read from 2449H and by @PARAM (2458H), and at 28E0H for PARITY="x" on the line.
The module $CL
8 bytes
CLDCB and CLDATA$ of COM/DVR, from the byte after the name (Index Register IX)
+00H-+01H the driver's DCB, read at 2523H and 2526H; MSMASK +04H, read at 2611H and 299CH, written at 26CCH and 29A7H; UCIMAGE +05H, read at 256CH, 2587H, 259AH, 25A4H, 25D1H, 25DDH and 2890H, written at 26D0H and 2965H; BAUDRT +06H, read at 253EH, written at 26D4H and 288DH; LOGBRK +07H, read at 25B6H, written at 26D8H and 293CH.
240BH-240CH
2 bytes
SAVESP+1
0000H in the file; the Stack Pointer of the entry, stored at 2400H and loaded at 240AH.
26A0H-26A1H
2 bytes
The operand of the LD HL at 269FH
0000H in the file; the address of the type byte of the entry being asked, stored by CKRSP (2663H), read at 269FH and 26B4H.
274AH-276BH
2 bytes each
The values BREAKP 274AH, QPARM 274CH, BAUDP 274EH, WORDP 2750H, STOPP 2752H, PARITYP 2754H, EVENP 2756H, ODDP 2758H, DTRP 275AH, RTSP 275CH, RIP 275EH, CDP 2760H, DSRP 2762H, CTSP 2764H, DFPARM 2766H, PORTD 2768H, FPARM 276AH
0000H in the file; stored by @PARAM and, for an answer, by GETRSP (26C6H, 26C8H); PORTD is not used.
276CH
1 byte
MSG1
00H in the file, made 0AH at 2535H after the display.
27F7H-27FCH, 27FFH-2800H
8 bytes
MSG20 and MSG21A
The baud rate in decimal, written by @HEXDEC (2555H), and the BREAK character in hex, written by @HEX8 (25BEH); 27FCH written (03H over 03H) at 2558H.
280EH-287BH
1 byte each
The response bytes BRRESP 280EH, QRESP 2817H, BRESP 281FH, WRESP 2827H, SRESP 282FH, PRESP 2839H, ERESP 2841H, ORESP 2848H, DTRESP 284FH, RTRESP 2856H, RIRESP 285CH, CDRESP 2862H, DSRESP 2869H, CTRESP 2870H, and DEFAULT's at 287BH
00H in the file; set by @PARAM and by GETRSP (26BDH), cleared for a new question at 247FH, 249BH, 24B6H and 24BCH, read by CKRSP and SETPARAM; PRESP also at 24CAH.
29E6H, 29E8H
1 byte each
FTYP and FRESP of PTBL2
The type written by GETRSP (26A7H) and read by @PARAM, the response cleared at 268DH, set by @PARAM and read at 26BAH.
29EFH-29F9H
11 bytes
INBUF (after the member)
An answer of up to ten keys and its 0DH, written by @KEYIN (2698H), read by @PARAM after the text (F= of FSTR (26B2H); its second byte, 29F0H, is also read at 24D5H and 28E0H through PARITYP for a quoted answer at Parity=.

Routines of Other Files Called by Member 4

AddressRoutine
0500H@LOGOT (BOOT/SYS), SVC 12: COM/DVR not installed (2430H).
052DH@DSPLY (BOOT/SYS), SVC 10: the texts of the display and of the prompts (241EH).
0553H@CKBRKC (BOOT/SYS), SVC 106: clears a pending BREAK at every exit (240FH).
0585H@KEYIN (BOOT/SYS), SVC 9: an answer of up to ten keys (2698H).
0623H@CTL (BOOT/SYS), SVC 5: function 2 to COM/DVR, the settings sent to the UART (252DH).
0642H@DSP (BOOT/SYS), SVC 2: the digits of the word length and stop bits (2418H).
06F6H@HEXDEC (BOOT/SYS), SVC 97: the baud rate in decimal (2555H).
07C2H@HEX8 (BOOT/SYS), SVC 98: the BREAK character in hex (25BEH).
0B99H@VDCTL (BOOT/SYS), SVC 15: functions 4 and 3, the cursor to column 20 for a prompt (267EH, 2685H).
1987H@PARAM (the SYS0/SYS stub that loads SYS1/SYS, whose code is at 21D7H), SVC 17: the parameter list (2458H) and each answer (26B2H).
19B2H@GTMOD (the SYS0/SYS stub that loads SYS12/SYS), SVC 83: the module $CL (2440H).
1B0FH@ERROR (the SYS0/SYS stub that loads SYS4/SYS), SVC 26: the short error message (2426H).

Memory Used by Member 5 (SETKI)

Address
Size
Contents
0420H-046FH
80 bytes
INBUF$
The command line that SYS1 passes, read from 243EH and by @PARAM (2467H).
08FEH
1 byte
KIDATA$+2 (Index Register IX + 06H)
The delay before a held key first repeats, in ticks of TIMER$: read by SETMSG (2450H), set to 22 by DEFAULT (2472H), by an answer of QUERY (249BH) and by WAIT (24C8H).
08FFH
1 byte
KIDATA$+3 (Index Register IX + 07H)
The time between repeats, in ticks of TIMER$: read by SETMSG (2459H), set to 2 by DEFAULT (2476H), by an answer of QUERY (24B5H) and by RATE (24DAH).
240BH-240CH
2 bytes
SAVESP+1
0000H in the file; the Stack Pointer of the entry, stored at 2400H and loaded at 240AH.
246CH-246DH
2 bytes
DFPARM
0000H in the file; the value of DEFAULT, stored by @PARAM, read at 246BH.
247EH-247FH
2 bytes
QPARM
0000H in the file; the value of QUERY, stored by @PARAM, read at 247DH.
24C0H-24C1H
2 bytes
WPARM
0000H in the file; the value of WAIT, stored by @PARAM, read at 24BFH.
24D2H-24D3H
2 bytes
RPARM
0000H in the file; the value of RATE, stored by @PARAM, read at 24D1H.
2527H-2529H
3 bytes
DDELAY
Spaces in the file; the delay in decimal, written by SETMSG (2456H), shown at 244DH and by SHOW (24F8H).
2535H-2537H
3 bytes
DRPEAT
Spaces in the file; the rate in decimal, written by SETMSG (245FH), shown at 244DH and by SHOW (24F8H).
2549H, 2551H, 2559H, 2562H
1 byte each
The response bytes of DEFAULT, RATE (RRESP), WAIT (WRESP) and QUERY
00H in the file; set by @PARAM; RRESP read at 249EH and 24CBH, WRESP at 2484H and 24B8H.
2596H-2599H
4 bytes
INBUF (no bytes in the file)
The keys of an answer to a QUERY prompt and their 0DH, written by @KEYIN (258AH) and read by @DECHEX (2590H).

Routines of Other Files Called by Member 5

AddressRoutine
03E1H@DECHEX (SYS0/SYS), SVC 96: the value of an answer (2590H, patch SETKI1).
052DH@DSPLY (BOOT/SYS), SVC 10: the line of values and the end of a prompt (241EH).
0553H@CKBRKC (BOOT/SYS), SVC 106: clears a pending BREAK at every exit (240FH).
0585H@KEYIN (BOOT/SYS), SVC 9: an answer of up to three keys (258AH).
0642H@DSP (BOOT/SYS), SVC 2: the characters of a prompt (2418H).
06F8H@HEXD (BOOT/SYS), SVC 95: a value in three decimal characters (2570H).
1987H@PARAM (the SYS0/SYS stub that loads SYS1/SYS, whose code is at 21D7H), SVC 17: DEFAULT, RATE, WAIT and QUERY (2467H).
19B2H@GTMOD (the SYS0/SYS stub that loads SYS12/SYS), SVC 83: the module $KI (2434H).
1B0FH@ERROR (the SYS0/SYS stub that loads SYS4/SYS), SVC 26: the short error message (242BH).

Disassembly

2400H - Member 1 (SYSTEM): the Jump, the Messages and the Parameter Table

SYS1/SYS runs SYSTEM with request A1H; its header (file offset 0021H: record 0000H, byte 57H) points at member 1, which the overlay loader reads to 2400H-2D19H, 2330 bytes in ten load blocks, and calls at 2400H with Register Pair HL at the text after the word SYSTEM. In 6.3.1 the member starts with a jump over its messages and its parameter table, which the 6.3.0 source kept at the end. PRMTBL$ is an old style table for @PARAM: each entry is a name of six characters, padded with spaces, and the address of the word where @PARAM puts the value, here always the operand of the LD BC or LD DE that tests the parameter; a 00H ends it. SYSTEM reads a value as given only in a few places: without a value a parameter word is FFFFH, ON, YES and Y give FFFFH, OFF, NO and N give 0000H, a number its value and a string the address of its first character.

2400
SYSTEM's entry (request A1H): jump to LSYSTEM at 25E5H, over the messages and PRMTBL$ (a 631 change: source, JP LSYSTEM).
2403-241CNOMEM$
DEFM "No memory space available" / DEFB 0DH 4E 6F 20 6D 65 6D 6F 72 79 20 73 70 61 63 65 20 61 76 61 69 6C 61 62 6C 65 0D
NOMEM$, 2403H-241CH: shown by NOMEM (2ADDH) when CFLAG$ bit 0 forbids a change of HIGH$, for ALIVE, SYSRES and DRIVER.
241D-242CPRMERR$
DEFM "Parameter error" / DEFB 0DH 50 61 72 61 6D 65 74 65 72 20 65 72 72 6F 72 0D
PRMERR$, 241DH-242CH: shown by PRMERR (2AE1H) for an @PARAM error, a DRIVE above 7 or a STEP above 3.
242D-2446NOCYL8$
DEFM "CYL=c invalid on 8" / DEFB 22H / DEFM " drive" / DEFB 0DH 43 59 4C 3D 63 20 69 6E 76 61 6C 69 64 20 6F 6E 20 38 22 20 64 72 69 76 65 0D
NOCYL8$, 242DH-2446H: CYL=c invalid on 8" drive, shown at 2977H when CYL is given for a drive whose default DCT says 8 inch, but not for DRIVE=0, and without DRIVE at the first such drive (B174).
2447-246ABADCYL$
DEFM "Cylinder count out of range <35-96>" / DEFB 0DH 43 79 6C 69 6E 64 65 72 20 63 6F 75 6E 74 20 6F 75 74 20 6F 66 20 72 61 6E 67 65 20 3C 33 35 2D 39 36 3E 0D
BADCYL$, 2447H-246AH: shown by BADCYL (2986H) for a CYL value whose low byte is below 35 or above 96; CYL=256 is refused, and CYL=296 is taken as 40.
246B-2488BADSYS$
DEFM "Can't SYSRES requested module" / DEFB 0DH 43 61 6E 27 74 20 53 59 53 52 45 53 20 72 65 71 75 65 73 74 65 64 20 6D 6F 64 75 6C 65 0D
BADSYS$, 246BH-2488H: shown by BADSYS (282BH) for a SYSRES value whose low byte is 0, 6, 7, 8 or 13 up, SYSRES=OFF and SYSRES=256 too.
2489-24A7MODRES$
DEFM "System module already resident" / DEFB 0DH 53 79 73 74 65 6D 20 6D 6F 64 75 6C 65 20 61 6C 72 65 61 64 79 20 72 65 73 69 64 65 6E 74 0D
MODRES$, 2489H-24A7H: shown at 2827H when RESTAB$ already holds an address for the overlay asked for.
24A8-24CBEIPMPT
DEFM "Enter DCT driver <BREAK=default> : " / DEFB 03H 45 6E 74 65 72 20 44 43 54 20 64 72 69 76 65 72 20 3C 42 52 45 41 4B 3D 64 65 66 61 75 6C 74 3E 20 3A 20 03
EIPMPT, 24A8H-24CBH: the prompt of DRIVER without a name (2A4CH); its 03H keeps the cursor after the colon and the space.
24CC-24E8BADBS$
DEFM "Boot step out of range <0-3>" / DEFB 0DH 42 6F 6F 74 20 73 74 65 70 20 6F 75 74 20 6F 66 20 72 61 6E 67 65 20 3C 30 2D 33 3E 0D
BADBS$, 24CCH-24E8H: shown at 26B4H for a BSTEP value above 3.
24E9-24EBDCTEXT
DEFM "DCT" 44 43 54
DCTEXT, 24E9H-24EBH: the extension that @FEXT gives the driver's file spec when it has none (2AA4H).
24EC-24F3
DEFM "ALIVE " / DEFW 2776H 41 4C 49 56 45 20 76 27
PRMTBL$, 24ECH-24F3H: the old style entry ALIVE, its word stored at 2776H, the operand of the LD BC at ALIVE (2775H); the table starts here (25EFH).
24F4-24FB
DEFM "AMPM " / DEFW 2640H 41 4D 50 4D 20 20 40 26
24F4H-24FBH: AMPM, its word stored at 2640H, the operand of the LD BC at AMPM (263FH); a 631 entry.
24FC-2503
DEFM "BSTEP " / DEFW 26AAH 42 53 54 45 50 20 AA 26
24FCH-2503H: BSTEP, its word stored at 26AAH, the operand of the LD BC at BSPARM (26A9H).
2504-250B
DEFM "DRIVER" / DEFW 2A1FH 44 52 49 56 45 52 1F 2A
2504H-250BH: DRIVER, its word stored at 2A1FH, the operand of the LD DE at DVRPARM (2A1EH).
250C-2513
DEFM "FAST " / DEFW 2603H 46 41 53 54 20 20 03 26
250CH-2513H: FAST, its word stored at 2603H, the operand of the LD BC at FPARM (2602H).
2514-251B
DEFM "SLOW " / DEFW 25FCH 53 4C 4F 57 20 20 FC 25
2514H-251BH: SLOW, its word stored at 25FCH, the operand of the LD BC at SLOW (25FBH).
251C-2523
DEFM "SWAP " / DEFW 2B08H 53 57 41 50 20 20 08 2B
251CH-2523H: SWAP, its word stored at 2B08H (SWAP$), the operand of the LD BC at SWAP (2B07H); a 631 entry.
2524-252B
DEFM "SYSRES" / DEFW 27E4H 53 59 53 52 45 53 E4 27
2524H-252BH: SYSRES, its word stored at 27E4H, the operand of the LD BC at SYSRES (27E3H).
252C-2533
DEFM "SYSTEM" / DEFW 2AF6H 53 59 53 54 45 4D F6 2A
252CH-2533H: SYSTEM, its word stored at 2AF6H, the operand of the LD BC at SYSPRM (2AF5H).
2534-253B
DEFM "TYPE " / DEFW 2713H 54 59 50 45 20 20 13 27
2534H-253BH: TYPE, its word stored at 2713H, the operand of the LD BC at TYPE (2712H).
253C-2543
DEFM "WP " / DEFW 294FH 57 50 20 20 20 20 4F 29
253CH-2543H: WP, its word stored at 294FH, the operand of the LD BC at WPARM (294EH).
2544-254B
DEFM "BLINK " / DEFW 26CBH 42 4C 49 4E 4B 20 CB 26
2544H-254BH: BLINK, its word stored at 26CBH, the operand of the LD BC at BLINK (26CAH).
254C-2553
DEFM "BREAK " / DEFW 2656H 42 52 45 41 4B 20 56 26
254CH-2553H: BREAK, its word stored at 2656H, the operand of the LD BC at BREAK (2655H).
2554-255B
DEFM "CYL " / DEFW 2964H 43 59 4C 20 20 20 64 29
2554H-255BH: CYL, its word stored at 2964H, the operand of the LD BC at CYLPRM (2963H).
255C-2563
DEFM "DATE " / DEFW 267CH 44 41 54 45 20 20 7C 26
255CH-2563H: DATE, its word stored at 267CH, the operand of the LD BC at DATE (267BH).
2564-256B
DEFM "DELAY " / DEFW 29CEH 44 45 4C 41 59 20 CE 29
2564H-256BH: DELAY, its word stored at 29CEH, the operand of the LD BC at DELAY (29CDH).
256C-2573
DEFM "CKDRV " / DEFW 29E6H 43 4B 44 52 56 20 E6 29
256CH-2573H: CKDRV, its word stored at 29E6H, the operand of the LD BC at CKDRV (29E5H).
2574-257B
DEFM "DISABL" / DEFW 2996H 44 49 53 41 42 4C 96 29
2574H-257BH: DISABL, its word stored at 2996H, the operand of the LD BC at DISABL (2995H); the word DISABLE matches it, since @FNDPRM compares only the six characters of an old style name (B11).
257C-2583
DEFM "DRIVE " / DEFW 292CH 44 52 49 56 45 20 2C 29
257CH-2583H: DRIVE, its word stored at 292CH, the operand of the LD BC at DRIVE (292BH), whose low byte 292CH is read as the drive number at 2970H, 299CH, 29FDH, 2A63H, 2A83H and 2B27H.
2584-258B
DEFM "ENABLE" / DEFW 29A7H 45 4E 41 42 4C 45 A7 29
2584H-258BH: ENABLE, its word stored at 29A7H, the operand of the LD BC at ENABLE (29A6H).
258C-2593
DEFM "GRAPHI" / DEFW 2761H 47 52 41 50 48 49 61 27
258CH-2593H: GRAPHI, its word stored at 2761H, the operand of the LD BC at GRAPHI (2760H); the word GRAPHIC matches it (B11).
2594-259B
DEFM "LARGE " / DEFW 26E4H 4C 41 52 47 45 20 E4 26
2594H-259BH: LARGE, its word stored at 26E4H, the operand of the LD BC at LARGE (26E3H).
259C-25A3
DEFM "RESTOR" / DEFW 26FCH 52 45 53 54 4F 52 FC 26
259CH-25A3H: RESTOR, its word stored at 26FCH, the operand of the LD BC at RPARM (26FBH); the word RESTORE matches it (B11).
25A4-25AB
DEFM "SMALL " / DEFW 26EEH 53 4D 41 4C 4C 20 EE 26
25A4H-25ABH: SMALL, its word stored at 26EEH, the operand of the LD BC at SMALPRM (26EDH).
25AC-25B3
DEFM "PRTIME" / DEFW 266AH 50 52 54 49 4D 45 6A 26
25ACH-25B3H: PRTIME, its word stored at 266AH, the operand of the LD BC at PRTIME (2669H); a 631 entry.
25B4-25BB
DEFM "STEP " / DEFW 29B3H 53 54 45 50 20 20 B3 29
25B4H-25BBH: STEP, its word stored at 29B3H, the operand of the LD BC at STEP (29B2H).
25BC-25C3
DEFM "TIME " / DEFW 2693H 54 49 4D 45 20 20 93 26
25BCH-25C3H: TIME, its word stored at 2693H, the operand of the LD BC at TIME (2692H).
25C4-25CB
DEFM "TRACE " / DEFW 2627H 54 52 41 43 45 20 27 26
25C4H-25CBH: TRACE, its word stored at 2627H, the operand of the LD BC at TRACE (2626H).
25CC-25D3
DEFM "SMOOTH" / DEFW 2728H 53 4D 4F 4F 54 48 28 27
25CCH-25D3H: SMOOTH, its word stored at 2728H, the operand of the LD BC at SMOOTH (2727H).
25D4-25DB
DEFM "HERTZ5" / DEFW 2747H 48 45 52 54 5A 35 47 27
25D4H-25DBH: HERTZ5, its word stored at 2747H, the operand of the LD BC at HERTZ50 (2746H); HERTZ50 typed in full matches it (B11).
25DC-25E3
DEFM "HERTZ6" / DEFW 2754H 48 45 52 54 5A 36 54 27
25DCH-25E3H: HERTZ6, its word stored at 2754H, the operand of the LD BC at HERTZ60 (2753H); HERTZ60 typed in full matches it (B11).
25E4
DEFB 00H 00
25E4H: the 00H where a next entry's name would begin, which ends PRMTBL$ for @PARAM (source: NOP).

25E5H - Member 1 (SYSTEM): the Entry, FAST and SLOW, TRACE, AMPM and BREAK

LSYSTEM keeps the Stack Pointer for LSAVESP, so that every exit through ABORT, IOERR or a message returns at the depth of the entry and clears a pending BREAK; the normal end (L2B7D, 2B7DH) returns with RET at that depth (one level higher for a DRIVE word FF00H-FF07H, B181). BREAK pending at the entry ends the command at once with FFFFH. @PARAM then stores every value into its LD BC or LD DE operand, and the parameters are carried out in the order of the code, whatever their order on the line: SLOW or FAST first, then TRACE, AMPM, BREAK, PRTIME, DATE, TIME, BSTEP, BLINK, RESTORE, TYPE, SMOOTH, HERTZ5 and HERTZ6, GRAPHIC, ALIVE, SYSRES, the drive parameters, DRIVER, SYSTEM and SWAP. A message or an error stops the rest, with whatever was done before it kept.

25E5LSYSTEM
LD (2AC7H),SP ED 73 C7 2A
LSYSTEM: store the Stack Pointer into 2AC7H-2AC8H, the operand of the LD SP at LSAVESP (2AC6H), before anything else (a 631 change: source, save the stack).
25E9
LD A,6AH 3E 6A
Load Register A with 6AH, SVC 106, @CKBRKC, which tests for a pending BREAK and clears it (source: check for BREAK).
25EB
RST 28H EF
Call @CKBRKC with RST 28H (BOOT/SYS): NZ when BREAK was pressed before the command started.
25EC
If BREAK was pending (NZ) jump to ABORT at 2AC3H, which returns with Register Pair HL = FFFFH (a 631 change: source, abort).
25EF
LD DE,24ECH 11 EC 24LD DE,PRMTBL$
Load Register Pair DE with 24ECH, PRMTBL$, the old style parameter table for @PARAM (source: get parms).
25F2
LD A,11H 3E 11
Load Register A with 11H, SVC 17, @PARAM, which reads a parameter list in parentheses against the table at Register Pair DE.
25F4
RST 28H EF
Call @PARAM with RST 28H (the SYS0/SYS stub 1987H, code in SYS1/SYS at 21D7H) on the text at Register Pair HL; without a parenthesis it reads nothing and returns Z.
25F5
If @PARAM returned NZ (an unknown word, a bad value) jump to PRMERR at 2AE1H: Parameter error, return code FFFFH (source: jump on parm error).
25F8
LD A,65H 3E 65
Load Register A with 65H, SVC 101, @FLAGS, which points Index Register IY at FLGTAB$ (source: get IY = flagtab).
25FA
RST 28H EF
Call @FLAGS with RST 28H (SYS0/SYS): Index Register IY = 006AH, the base of every IY+d below until DRIVE loads a DCT into it.
25FBSLOW
LD BC,0000H 01 00 00
SLOW: load Register Pair BC with the word of SLOW, this operand 25FCH-25FDH: 0000H in the file, FFFFH for SLOW alone (source: test SLOW parm).
25FE
LD A,B 78
Load Register A with Register B, the high byte of SLOW's word.
25FF
OR C B1
OR Register A with Register C, the low byte: Z when the word is 0000H, SLOW not given or SLOW=OFF.
2600
If SLOW was given (NZ) jump to SETSLOW at 2615H; SLOW is tested before FAST, so SLOW wins when both are given (source: jump if SLOW entered).
2602FPARM
LD BC,0000H 01 00 00
FPARM: load Register Pair BC with the word of FAST, this operand 2603H-2604H: 0000H in the file, FFFFH for FAST alone (source: p/u FAST parm).
2605
LD A,B 78
Load Register A with Register B, the high byte of FAST's word.
2606
OR C B1
OR Register A with Register C, the low byte: Z when FAST was not given, or given as FAST=OFF.
2607
If neither SLOW nor FAST was given (Z) jump to TRACE at 2626H (FPEND) (source: neither SLOW nor FAST?).
2609
SET 3,(IY+12H) FD CB 12 DE
Set bit 3 of SFLAG$ (IY+12H, 007CH), Index Register IY holding 006AH: the system runs at the fast clock (source: set fast in flag).
260D
SET 6,(IY+0CH) FD CB 0C F6
Set bit 6 of MODOUT$ (IY+0CH, 0076H), Index Register IY holding 006AH, the copy of port ECH whose bit 6 selects the 4 MHz clock (source: set bit 6 in port mask).
2611
LD B,55H 06 55
Load Register B with 55H, the value of TIMSL$ for the fast clock: TIMER$ steps on every second clock interrupt (source: init time slice byte).
2613
Jump to SETCLK at 261DH to store TIMSL$ and set the port (source: go set it).
2615SETSLOW
RES 3,(IY+12H) FD CB 12 9E
SETSLOW: reset bit 3 of SFLAG$ (IY+12H, 007CH), Index Register IY holding 006AH: the system runs at the slow clock (source: reset the FAST bit).
2619
RES 6,(IY+0CH) FD CB 0C B6
Reset bit 6 of MODOUT$ (IY+0CH, 0076H), Index Register IY holding 006AH: the 2 MHz clock (source: reset bit in port mask).
261DSETCLK
LD A,B 78
SETCLK: load Register A with Register B: 55H for FAST; for SLOW the high byte of SLOW's word, FFH for SLOW alone or SLOW=ON but 00H for SLOW=1 (B172).
261E
LD (002BH),A 32 2B 00LD (TIMSL$),A
Store Register A into 002BH, TIMSL$, the bit pattern that the clock interrupt rotates; TIMER$ and the timed tasks step only when a 1 comes out (source: set 55H=fast, FFH=slow).
2621
LD A,(IY+0CH) FD 7E 0C
Load Register A with MODOUT$ (IY+0CH, 0076H), Index Register IY holding 006AH, the port ECH copy with the new bit 6 (source: update the port).
2624
OUT (0ECH),A D3 EC
Output Register A to port 0ECH, the Model 4's options port: bit 6 sets the processor clock to 4 MHz or 2 MHz.
2626TRACE
LD BC,0001H 01 01 00
TRACE: load Register Pair BC with the word of TRACE, this operand 2627H-2628H: 0001H in the file, which means not given (source: init to pass by).
2629
LD A,B 78
Load Register A with Register B, the high byte of TRACE's word.
262A
OR C B1
OR Register A with Register C: 00H for TRACE=OFF, FFH for TRACE alone or TRACE=ON, 01H when TRACE was not given.
262B
If the result is 00H, TRACE=OFF, jump to TROFF at 263AH (source: go if Trace off).
262D
INC A 3C
Increment Register A: Z only when the two bytes ORed to FFH, TRACE alone or with ON.
262E
Otherwise (NZ: not given, or a number) jump to AMPM at 263FH (TREND) with nothing done (source: go if not entered).
2630
LD DE,07B1H 11 B1 07LD DE,TRACE_INT
Load Register Pair DE with 07B1H, TRACE_INT in BOOT/SYS: a task control block whose word 07B3H leads to the code that shows the saved program counter (source: pt to trace SYSRES rtn).
2633
LD C,07H 0E 07
Load Register C with 07H, task slot 7 (source: init to task 7).
2635
LD A,1DH 3E 1D
Load Register A with 1DH, SVC 29, @ADTSK, which puts the task control block at Register Pair DE into the slot in Register C.
2637
RST 28H EF
Call @ADTSK with RST 28H (SYS0/SYS): slot 7 of TCB$ now points at 07B1H, and the task shows the saved program counter at the right of the top line (source: turn TRACE (ON)).
2638
Jump to AMPM at 263FH, over TROFF, with TRACE turned on.
263ATROFF
LD C,07H 0E 07
TROFF: load Register C with 07H, task slot 7 (source: init to task 7).
263C
LD A,1EH 3E 1E
Load Register A with 1EH, SVC 30, @RMTSK, which empties the task slot in Register C.
263E
RST 28H EF
Call @RMTSK with RST 28H (SYS0/SYS): slot 7 points at NOTASK (1CE9H) again; the last address shown stays on the screen (source: remove TRACE task).
263FAMPM
LD BC,0001H 01 01 00
AMPM: load Register Pair BC with the word of AMPM, this operand 2640H-2641H: 0001H in the file, not given (a 631 parameter).
2642
LD A,B 78
Load Register A with Register B, the high byte of AMPM's word.
2643
OR C B1
OR Register A with Register C: 00H for AMPM=OFF, =N, =NO or =0, a word of 0000H.
2644
If AMPM=OFF (Z) jump to L2651 at 2651H, which selects 24 hour times.
2646
LD A,B 78
Load Register A with Register B, the high byte again.
2647
AND C A1
AND Register A with Register C: FFH only when both bytes are FFH, AMPM alone or AMPM=ON.
2648
INC A 3C
Increment Register A: Z for a word of FFFFH, AMPM alone or AMPM=ON.
2649
If AMPM was not given, or given a number (NZ), jump to BREAK at 2655H with nothing done.
264B
RES 4,(IY+08H) FD CB 08 A6
Reset bit 4 of IFLAG$ (IY+08H, 0072H), Index Register IY holding 006AH: DIR shows the times of files in 12 hour form with a or p (AMPM=ON).
264F
Jump to BREAK at 2655H, over L2651, with 12 hour times selected.
2651L2651
SET 4,(IY+08H) FD CB 08 E6
L2651: set bit 4 of IFLAG$ (IY+08H, 0072H), Index Register IY holding 006AH: DIR shows the times of files in 24 hour form (AMPM=OFF).
2655BREAK
LD BC,0001H 01 01 00
BREAK: load Register Pair BC with the word of BREAK, this operand 2656H-2657H: 0001H in the file, not given (source: init BREAK=ON).
2658
LD A,B 78
Load Register A with Register B, the high byte of BREAK's word.
2659
OR C B1
OR Register A with Register C: 00H for BREAK=OFF, =N, =NO or =0, a word of 0000H.
265A
If BREAK=OFF (Z) jump to BRKOFF at 2665H (source: jump if BREAK=OFF).
265C
INC A 3C
Increment Register A: Z only when the bytes ORed to FFH, BREAK alone or BREAK=ON (source: check Break=ON).
265D
If BREAK was not given, or given a number (NZ), jump to PRTIME at 2669H (BRKEND) (source: go if no parm used).
265F
RES 4,(IY+12H) FD CB 12 A6
Reset bit 4 of SFLAG$ (IY+12H, 007CH), Index Register IY holding 006AH: the BREAK key works again, also after AUTO has disabled it (source: correct system flag).
2663
Jump to PRTIME at 2669H (BRKEND), over BRKOFF.
2665BRKOFF
SET 4,(IY+12H) FD CB 12 E6
BRKOFF: set bit 4 of SFLAG$ (IY+12H, 007CH), Index Register IY holding 006AH: the keyboard driver no longer sets the BREAK bit (source: disable BREAK key).

2669H - Member 1 (SYSTEM): PRTIME, DATE, TIME, BSTEP and BLINK

PRTIME patches the printer driver in memory: the DEC DE at @PRTIMO (0E29H) counts down the wait of about ten seconds for a printer that is not ready, and a NOP there makes the wait endless. DATE, TIME and BSTEP change the system information sector, sector 2 of cylinder 0 of drive 0 (GETCFG and PUTCFG), which BOOT/SYS loads at 0400H at every start-up: offsets C2H and C3H (DTPMT$, TMPMT$: FFH skips the prompt for the date or the time) and offset 73H, DCT+3 of the default DCT of drive 0, whose bits 1-0 are the default step rate that FORMAT offers for the boot track. They change nothing in memory, so they act from the next start-up. BLINK sets the cursor: blinking or solid, and the character, standard, large, small or one given as a number.

2669PRTIME
LD BC,0001H 01 01 00
PRTIME: load Register Pair BC with the word of PRTIME, this operand 266AH-266BH: 0001H in the file, not given (source: init to pass by).
266C
LD HL,0E29H 21 29 0ELD HL,@PRTIMO
Load Register Pair HL with 0E29H, @PRTIMO, the DEC DE that counts down the printer driver's wait in BOOT/SYS (a 631 change: source, DEC DE opcode in printer driver).
266F
LD A,B 78
Load Register A with Register B, the high byte of PRTIME's word.
2670
OR C B1
OR Register A with Register C: 00H for PRTIME=OFF, =N, =NO or =0, a word of 0000H.
2671
If PRTIME=OFF (Z) jump to DISTIMO at 267AH with Register A = 00H, a NOP (source: load a NOP over DEC DE).
2673
LD A,B 78
Load Register A with Register B, the high byte again.
2674
AND C A1
AND Register A with Register C: FFH only for PRTIME alone or PRTIME=ON.
2675
INC A 3C
Increment Register A: Z for a word of FFFFH, PRTIME alone or PRTIME=ON.
2676
If PRTIME was not given, or given a number (NZ), jump to DATE at 267BH with the byte at 0E29H unchanged.
2678
LD A,1BH 3E 1B
Load Register A with 1BH, the opcode of DEC DE: the wait counts down and ends with error 8, Device not available (source: DEC DE opcode (default)).
267ADISTIMO
LD (HL),A 77
DISTIMO: store Register A into the byte at Register Pair HL, 0E29H: 1BH (DEC DE, the time-out; the release has it) or 00H (NOP, the driver waits for ever).
267BDATE
LD BC,0001H 01 01 00
DATE: load Register Pair BC with the word of DATE, this operand 267CH-267DH: 0001H in the file, not given.
267E
LD A,B 78
Load Register A with Register B, the high byte of DATE's word.
267F
OR C B1
OR Register A with Register C: 00H for DATE=OFF, =N, =NO or =0, a word of 0000H.
2680
LD B,0FFH 06 FF
Load Register B with FFH, the byte that suppresses the date prompt; the flags of the OR stay (source: init to DATE suppress).
2682
If DATE=OFF (Z) jump to DOFF at 2688H to store FFH (source: go if suppress).
2684
INC A 3C
Increment Register A: Z only when the bytes ORed to FFH, DATE alone or DATE=ON.
2685
If DATE was not given, or given a number (NZ), jump to TIME at 2692H (DATEND) (source: go if not entered).
2687
LD B,A 47
Load Register B with Register A, 00H: the byte that leaves the date prompt on (source: B=0 on no suppress).
2688DOFF
DOFF: call GETCFG at 2BF5H, which reads sector 2 of cylinder 0 of drive 0 into SBUFF$ (1D00H); a read error ends SYSTEM through IOERR (source: get track 0, sector 2).
268B
LD A,B 78
Load Register A with Register B, FFH or 00H (source: get back the code byte).
268C
LD (1DC2H),A 32 C2 1D
Store Register A into 1DC2H, offset C2H of the sector: DTPMT$, which is 04C2H once BOOT/SYS has loaded the sector.
268F
Call PUTCFG at 2BF2H, which writes SBUFF$ back to sector 2 of cylinder 0 of drive 0; a write protected diskette ends SYSTEM with error 15 (source: write it back).
2692TIME
LD BC,0001H 01 01 00
TIME: load Register Pair BC with the word of TIME, this operand 2693H-2694H: 0001H in the file, not given (source: init to pass by).
2695
LD A,B 78
Load Register A with Register B, the high byte of TIME's word.
2696
OR C B1
OR Register A with Register C: 00H for TIME=OFF, =N, =NO or =0, a word of 0000H.
2697
LD B,0FFH 06 FF
Load Register B with FFH, the byte that suppresses the time prompt; the flags of the OR stay (source: init to TIME suppress).
2699
If TIME=OFF (Z) jump to TOFF at 269FH to store FFH (source: go if suppress).
269B
INC A 3C
Increment Register A: Z only when the bytes ORed to FFH, TIME alone or TIME=ON.
269C
If TIME was not given, or given a number (NZ), jump to BSPARM at 26A9H (TIMEND) (source: go if not entered).
269E
LD B,A 47
Load Register B with Register A, 00H: the byte that leaves the time prompt on (source: B=0 on no suppress).
269FTOFF
TOFF: call GETCFG at 2BF5H, which reads sector 2 of cylinder 0 of drive 0 into SBUFF$ (1D00H) (source: get track 0, sector 2).
26A2
LD A,B 78
Load Register A with Register B, FFH or 00H (source: get back the code byte).
26A3
LD (1DC3H),A 32 C3 1D
Store Register A into 1DC3H, offset C3H of the sector: TMPMT$, which is 04C3H once BOOT/SYS has loaded the sector.
26A6
Call PUTCFG at 2BF2H, which writes SBUFF$ back to sector 2 of cylinder 0 of drive 0 (source: write it back).
26A9BSPARM
LD BC,0FFFFH 01 FF FF
BSPARM: load Register Pair BC with the word of BSTEP, this operand 26AAH-26ABH: FFFFH in the file, not given (source: p/u parm).
26AC
INC B 04
Increment Register B: Z when the high byte of the word is FFH, BSTEP not given, or given alone or as ON (source: user entry?).
26AD
If BSTEP was not given (Z) jump to BLINK at 26CAH (BSPEND) (source: go if not entered).
26AF
LD A,C 79
Load Register A with Register C, the low byte of the value; a high byte other than FFH is not looked at (source: transfer parm).
26B0
CP 04H FE 04
Compare Register A with 04H, one more than the slowest step rate 3.
26B2
If the step rate is below 4 (Carry) jump to GUDBS at 26BCH (source: ok if < 4).
26B4
LD HL,24CCH 21 CC 24LD HL,BADBS$
Load Register Pair HL with 24CCH, BADBS$, Boot step out of range <0-3> (source: else bad step rate).
26B7
Call SETERR at 2AE4H, which shows the message at Register Pair HL with @LOGOT and ends SYSTEM through ABORT with FFFFH; it does not return.
26BA
Jump to BLINK at 26CAH (BSPEND): never run, since SETERR does not return; 6.3.0's SETERR did not return either (it fell into FRCERR and SAVESP), so this jump was dead there too.
26BCGUDBS
LD B,A 47
GUDBS: load Register B with Register A, the step rate 0-3 (source: save step).
26BD
Call GETCFG at 2BF5H, which reads sector 2 of cylinder 0 of drive 0 into SBUFF$ (1D00H) (source: get System Info Sector).
26C0
LD L,73H 2E 73
Load Register L with 73H: Register Pair HL = 1D73H, offset 73H, DCT+3 of the default DCT of drive 0 (0473H after start-up) (source: offset to data).
26C2
LD A,(HL) 7E
Load Register A with the byte at Register Pair HL, 1D73H, the flags of drive 0's default DCT (source: p/u DCT+3 parms).
26C3
AND 0FCH E6 FC
AND Register A with FCH to clear bits 1-0, the step rate (source: strip off boot step).
26C5
OR B B0
OR Register A with Register B, the new step rate (source: merge new).
26C6
LD (HL),A 77
Store Register A into the byte at Register Pair HL, 1D73H (source: stuff back).
26C7
Call PUTCFG at 2BF2H, which writes SBUFF$ back to sector 2 of cylinder 0 of drive 0 (source: write it back).
26CABLINK
LD BC,0001H 01 01 00
BLINK: load Register Pair BC with the word of BLINK, this operand 26CBH-26CCH: 0001H in the file, not given (source: p/u parm).
26CD
LD A,B 78
Load Register A with Register B, the high byte of BLINK's word.
26CE
OR C B1
OR Register A with Register C, the low byte: the two bytes ORed.
26CF
DEC A 3D
Decrement Register A: Z when the bytes ORed to 01H, BLINK not given (also BLINK=1, 256 or 257) (source: specified?).
26D0
If BLINK was not given (Z) jump to RPARM at 26FBH (BLIEND) (source: go if not).
26D2
INC A 3C
Increment Register A back to the ORed bytes: Z for BLINK=OFF, and also for BLINK=0 or BLINK=N, whose word is 0000H as well.
26D3
If BLINK is not OFF (NZ) jump to BLNKON at 26DBH (source: go if BLINK=ON).
26D5
SET 6,(IY+15H) FD CB 15 F6
Set bit 6 of VFLAG$ (IY+15H, 007FH), Index Register IY holding 006AH: the cursor stops blinking and stays solid (source: turn off blinking).
26D9
Jump to RPARM at 26FBH (BLIEND): the cursor character is left as it is (source: continue).
26DBBLNKON
RES 6,(IY+15H) FD CB 15 B6
BLNKON: reset bit 6 of VFLAG$ (IY+15H, 007FH), Index Register IY holding 006AH: the cursor blinks (source: turn on blinking).
26DF
CP 0FFH FE FF
Compare Register A, the ORed bytes, with FFH, the value of BLINK alone or BLINK=ON, and also of BLINK=255, which so gives the standard underline and not character 255 (source: if not just BLINK).
26E1
If not (NZ) jump to SETBLK at 26F5H with the ORed bytes in Register A as the cursor character: BLINK=42 gives 2AH, an asterisk (source: set user cursor).
26E3LARGE
LD BC,0000H 01 00 00
LARGE: load Register Pair BC with the word of LARGE, this operand 26E4H-26E5H: 0000H in the file (source: else test if large).
26E6
INC C 0C
Increment Register C: Z when the low byte was FFH, LARGE given alone or as ON (source: small, or default).
26E7
LD A,5FH 3E 5F
Load Register A with 5FH, the underline, the standard cursor; the flags of the INC stay (source: standard cursor).
26E9
If LARGE was not given (NZ) jump to SMALPRM at 26EDH with the underline.
26EB
LD A,8FH 3E 8F
Load Register A with 8FH, the large cursor, character 143 (source: to large).
26EDSMALPRM
LD BC,0000H 01 00 00
SMALPRM: load Register Pair BC with the word of SMALL, this operand 26EEH-26EFH: 0000H in the file.
26F0
INC C 0C
Increment Register C: Z when the low byte was FFH, SMALL given alone or as ON.
26F1
If SMALL was not given (NZ) jump to SETBLK at 26F5H with the character chosen so far.
26F3
LD A,88H 3E 88
Load Register A with 88H, the small cursor, character 136: SMALL wins over LARGE (source: small).
26F5SETBLK
LD C,A 4F
SETBLK: load Register C with Register A, the cursor character (source: xfer cursor char to C).
26F6
LD B,08H 06 08
Load Register B with 08H, @VDCTL function 8, which puts the character in Register C into CRSCHAR (0B98H) (source: cursor update function).
26F8
LD A,0FH 3E 0F
Load Register A with 0FH, SVC 15, @VDCTL, the video control functions of BOOT/SYS.
26FA
RST 28H EF
Call @VDCTL with RST 28H (BOOT/SYS 0B99H): the new cursor character, shown at the next blink or cursor move.

26FBH - Member 1 (SYSTEM): RESTORE, TYPE, SMOOTH, HERTZ5 and HERTZ6, GRAPHIC and ALIVE

RESTORE writes offset C4H of the system information sector (RSTOR$, 04C4H after start-up): 00H makes the start-up restore floppy drives 1-7 to cylinder 0, AFH leaves them. TYPE, SMOOTH and GRAPHIC set bits 1, 3 and 7 of DFLAG$; SMOOTH also puts DI or NOP into FDDINT$ (000EH), the byte the floppy driver calls before each read or write command (0F3FH) and that @CKDRV reads to choose its index count. HERTZ5 and HERTZ6 set the count of ticks in a second of the clock task (HERTZ$, 0750H). ALIVE=ON copies a module of 41 bytes below HIGH$, a header named ALIVE and a task that every time it runs swaps the character at row 0, column 79 between A3H and 93H, and adds it as task 3; ALIVE=OFF removes the task and leaves the module in memory.

26FBRPARM
LD BC,0001H 01 01 00
RPARM: load Register Pair BC with the word of RESTORE, this operand 26FCH-26FDH: 0001H in the file, not given (source: p/u parm).
26FE
LD A,B 78
Load Register A with Register B, the high byte of RESTORE's word.
26FF
OR C B1
OR Register A with Register C, the low byte: the two bytes ORed.
2700
DEC A 3D
Decrement Register A: Z when the bytes ORed to 01H, RESTORE not given (source: specified?).
2701
If RESTORE was not given (Z) jump to TYPE at 2712H (source: go if not).
2703
INC A 3C
Increment Register A back to the ORed bytes: Z for RESTORE=OFF (also =N, =NO or =0, a word of 0000H).
2704
If RESTORE is not OFF (NZ) jump to RSTRON at 2707H, which clears Register A (source: go if RESTORE=on).
2706
DEFB 3EH 3E
2706H: the opcode of LD A,n, which takes the XOR A at 2707H as its operand: for RESTORE=OFF Register A = AFH (source: make LD A,n).
2707RSTRON
XOR A AF
RSTRON: clear Register A, 00H for RESTORE=ON; for OFF this byte is the operand AFH of the LD A at 2706H.
2708
LD B,A 47
Load Register B with Register A, 00H for ON or AFH for OFF (source: save step, a comment copied from BSTEP).
2709
Call GETCFG at 2BF5H, which reads sector 2 of cylinder 0 of drive 0 into SBUFF$ (1D00H) (source: get config sector).
270C
LD L,0C4H 2E C4
Load Register L with C4H: Register Pair HL = 1DC4H, offset C4H, RSTOR$ (04C4H after start-up) (source: pt to RESTORE flag).
270E
LD (HL),B 70
Store Register B into the byte at Register Pair HL, 1DC4H: 00H restores the drives at start-up, AFH does not (source: stuff back).
270F
Call PUTCFG at 2BF2H, which writes SBUFF$ back to sector 2 of cylinder 0 of drive 0 (source: put it back).
2712TYPE
LD BC,0001H 01 01 00
TYPE: load Register Pair BC with the word of TYPE, this operand 2713H-2714H: 0001H in the file, not given (source: p/u Type parm value).
2715
LD A,B 78
Load Register A with Register B, the high byte of TYPE's word.
2716
OR C B1
OR Register A with Register C, the low byte: the two bytes ORed.
2717
DEC A 3D
Decrement Register A: Z when the bytes ORed to 01H, TYPE not given (source: was Type used?).
2718
If TYPE was not given (Z) jump to SMOOTH at 2727H (source: jump if TYPE not entered).
271A
INC A 3C
Increment Register A back to the ORed bytes: Z for TYPE=OFF (also =N, =NO or =0, a word of 0000H).
271B
If TYPE is not OFF (NZ) jump to TYPEON at 2723H (source: jump if TYPE=ON).
271D
RES 1,(IY+03H) FD CB 03 8E
Reset bit 1 of DFLAG$ (IY+03H, 006DH), Index Register IY holding 006AH: the type-ahead task stops filling its buffer (source: turn TYPE off).
2721
Jump to SMOOTH at 2727H, over TYPEON, with type-ahead turned off.
2723TYPEON
SET 1,(IY+03H) FD CB 03 CE
TYPEON: set bit 1 of DFLAG$ (IY+03H, 006DH), Index Register IY holding 006AH: type-ahead on (source: turn TYPE on).
2727SMOOTH
LD BC,0001H 01 01 00
SMOOTH: load Register Pair BC with the word of SMOOTH, this operand 2728H-2729H: 0001H in the file, not given (source: p/u Smooth parm value).
272A
LD A,B 78
Load Register A with Register B, the high byte of SMOOTH's word.
272B
OR C B1
OR Register A with Register C, the low byte: the two bytes ORed.
272C
DEC A 3D
Decrement Register A: Z when the bytes ORed to 01H, SMOOTH not given (source: was Smooth used?).
272D
If SMOOTH was not given (Z) jump to HERTZ50 at 2746H (source: skip if not entered).
272F
INC A 3C
Increment Register A back to the ORed bytes: Z for SMOOTH=OFF (also =N, =NO or =0, a word of 0000H).
2730
If SMOOTH is not OFF (NZ) jump to 273DH to turn it on (source: go if Smooth=ON).
2732
RES 3,(IY+03H) FD CB 03 9E
Reset bit 3 of DFLAG$ (IY+03H, 006DH), Index Register IY holding 006AH: SMOOTH off (source: show OFF in DFLAG$).
2736
LD A,00H 3E 00
Load Register A with 00H, the opcode of NOP (source: set to store NOP).
2738
LD (000EH),A 32 0E 00LD (FDDINT$),A
Store Register A into 000EH, FDDINT$, the byte the floppy driver calls at 0F3FH (RWINIT) before it sends each read or write command: a NOP leaves the interrupts on (source: put it there).
273B
Jump to HERTZ50 at 2746H, over the SMOOTH=ON code.
273D
SET 3,(IY+03H) FD CB 03 DE
Set bit 3 of DFLAG$ (IY+03H, 006DH), Index Register IY holding 006AH: SMOOTH on (source: show ON in DFLAG$).
2741
LD A,0F3H 3E F3
Load Register A with F3H, the opcode of DI (source: DI opcode).
2743
LD (000EH),A 32 0E 00LD (FDDINT$),A
Store Register A into 000EH, FDDINT$: the floppy driver turns the interrupts off before each sector transfer, and @CKDRV, which reads the byte, halves its index count and runs it with interrupts off (source: put it there).
2746HERTZ50
LD BC,0001H 01 01 00
HERTZ50: load Register Pair BC with the word of HERTZ5, this operand 2747H-2748H: 0001H in the file, not given (source: p/u H50 parm value).
2749
LD A,B 78
Load Register A with Register B, the high byte of HERTZ5's word.
274A
OR C B1
OR Register A with Register C, the low byte: the two bytes ORed.
274B
DEC A 3D
Decrement Register A: Z only when the bytes ORed to 01H, so HERTZ5=OFF counts as given (source: check if parm entered).
274C
If HERTZ5 was not given (Z) jump to HERTZ60 at 2753H (source: go if not).
274E
LD A,19H 3E 19
Load Register A with 19H, 25 ticks to a second, for a 50 Hz mains clock (source: init 25 ints/sec).
2750
LD (0750H),A 32 50 07LD (HERTZ$),A
Store Register A into 0750H, HERTZ$, the operand of the LD (IX+3),1EH with which the clock task starts each second's count (source: put value in timer code).
2753HERTZ60
LD BC,0001H 01 01 00
HERTZ60: load Register Pair BC with the word of HERTZ6, this operand 2754H-2755H: 0001H in the file, not given (source: p/u H60 parm value).
2756
LD A,B 78
Load Register A with Register B, the high byte of HERTZ6's word.
2757
OR C B1
OR Register A with Register C, the low byte: the two bytes ORed.
2758
DEC A 3D
Decrement Register A: Z only when the bytes ORed to 01H; HERTZ6 is tested after HERTZ5 and wins when both are given (source: check if parm entered).
2759
If HERTZ6 was not given (Z) jump to GRAPHI at 2760H (source: go if not).
275B
LD A,1EH 3E 1E
Load Register A with 1EH, 30 ticks to a second, for 60 Hz, the value in the release (source: init 30 ints/sec).
275D
LD (0750H),A 32 50 07LD (HERTZ$),A
Store Register A into 0750H, HERTZ$, the clock task's count of ticks in a second (source: and load it to timer).
2760GRAPHI
LD BC,0001H 01 01 00
GRAPHI: load Register Pair BC with the word of GRAPHIC, this operand 2761H-2762H: 0001H in the file, not given (source: init for bypass).
2763
LD A,B 78
Load Register A with Register B, the high byte of GRAPHIC's word.
2764
OR C B1
OR Register A with Register C, the low byte: the two bytes ORed.
2765
DEC A 3D
Decrement Register A: Z when the bytes ORed to 01H, GRAPHIC not given (source: check if parm entered).
2766
If GRAPHIC was not given (Z) jump to ALIVE at 2775H (source: go if not entered).
2768
INC A 3C
Increment Register A back to the ORed bytes: Z for GRAPHIC=OFF (also =N, =NO or =0, a word of 0000H) (source: test of GRAPHIC=off).
2769
If GRAPHIC=OFF (Z) jump to GROFF at 2771H (source: go if off).
276B
SET 7,(IY+03H) FD CB 03 FE
Set bit 7 of DFLAG$ (IY+03H, 006DH), Index Register IY holding 006AH: the screen print sends graphics characters to the printer as they are (source: else turn on).
276F
Jump to ALIVE at 2775H, over GROFF, with the graphics printer selected.
2771GROFF
RES 7,(IY+03H) FD CB 03 BE
GROFF: reset bit 7 of DFLAG$ (IY+03H, 006DH), Index Register IY holding 006AH: the printer has no graphics (source: turn graphic off).
2775ALIVE
LD BC,0001H 01 01 00
ALIVE: load Register Pair BC with the word of ALIVE, this operand 2776H-2777H: 0001H in the file, not given (source: p/u Alive parm value).
2778
LD A,B 78
Load Register A with Register B, the high byte of ALIVE's word.
2779
OR C B1
OR Register A with Register C, the low byte: the two bytes ORed.
277A
DEC A 3D
Decrement Register A: Z when the bytes ORed to 01H, ALIVE not given (source: check if entered).
277B
If ALIVE was not given (Z) jump to SYSRES at 27E3H (source: bypass if parm omitted).
277D
INC A 3C
Increment Register A back to the ORed bytes: Z for ALIVE=OFF (also =N, =NO or =0, a word of 0000H).
277E
If ALIVE is not OFF (NZ) jump to 2787H to install it (source: jump if ALIVE=ON).
2780
LD C,03H 0E 03
Load Register C with 03H, task slot 3 (source: slot alive).
2782
LD A,1EH 3E 1E
Load Register A with 1EH, SVC 30, @RMTSK, which empties the task slot in Register C.
2784
RST 28H EF
Call @RMTSK with RST 28H (SYS0/SYS): slot 3 points at NOTASK (1CE9H); the module stays below HIGH$ (source: remove it if OFF).
2785
Jump to SYSRES at 27E3H with the ALIVE task removed.
2787
Call GOTMEM? at 2C0CH: the Carry flag when CFLAG$ bit 0 forbids a change of HIGH$ (source: is HIGH$ frozen?).
278A
If HIGH$ may not change (Carry) jump to NOMEM at 2ADDH: No memory space available, return code FFFFH (source: quit if so).
278D
Call GETHI$ at 2C04H: Register Pair HL = HIGH$, the last free byte below the modules; nothing tests whether an ALIVE module is there already (B173) (source: get address for Alive).
2790
LD (27BCH),HL 22 BC 27
Store Register Pair HL into 27BCH-27BDH, the module header's word for its last byte, the old HIGH$ (source: stuff last byte used).
2793
LD BC,0029H 01 29 00
Load Register Pair BC with 0029H, the 41 bytes of the module ALVBGN-27E2H (source: get len of code).
2796
XOR A AF
Clear Register A and the Carry flag for the SBC.
2797
SBC HL,BC ED 42
Subtract Register Pair BC from Register Pair HL: HIGH$ less 41, the new HIGH$ (source: calc new HIGH$).
2799
LD B,00H 06 00
Load Register B with 00H, @HIGH$ function 0, HIGH$ rather than LOW$.
279B
LD A,64H 3E 64
Load Register A with 64H, SVC 100, @HIGH$, which sets HIGH$ to Register Pair HL when it is not 0000H (source: stuff new HIGH$).
279D
RST 28H EF
Call @HIGH$ with RST 28H (SYS0/SYS): HIGH$ (040EH) = Register Pair HL.
279E
INC HL 23
Increment Register Pair HL to the new HIGH$ + 1, where the module begins (source: point to module start).
279F
PUSH HL E5
Push Register Pair HL, the start of the module (source: save start).
27A0
LD C,10H 0E 10
Load Register C with 10H: Register Pair BC = 0010H, the offset of the task's code in the module.
27A2
ADD HL,BC 09
Add Register Pair BC to Register Pair HL: the address the task's code will have in high memory (source: point to alive task).
27A3
LD (27C8H),HL 22 C8 27LD (ALVTCB),HL
Store Register Pair HL into 27C8H-27C9H, ALVTCB, the module's task control block word, which @ADTSK's slot will point at (source: and stuff ALIVE TCB).
27A6
EX (SP),HL E3
Exchange Register Pair HL with the word at the Stack Pointer: Register Pair HL = the module's start, the task's code address on the stack (source: rcvr start of module).
27A7
EX DE,HL EB
Exchange Register Pairs DE and HL: Register Pair DE = the module's start in high memory (source: into DE).
27A8
LD HL,27BAH 21 BA 27LD HL,ALVBGN
Load Register Pair HL with 27BAH, ALVBGN, the module as it is in this member.
27AB
LD BC,0029H 01 29 00
Load Register Pair BC with 0029H, the 41 bytes of the module.
27AE
LDIR ED B0
Copy the module from Register Pair HL, 27BAH-27E2H, to Register Pair DE, below the old HIGH$, with LDIR (Register Pair BC = 0029H) (source: move to high memory).
27B0
POP DE D1
Pop Register Pair DE, the task's code address in high memory (source: rcvr start of task).
27B1
DEC DE 1B
Decrement Register Pair DE (source: back up to TCB).
27B2
DEC DE 1B
Decrement Register Pair DE again: Register Pair DE = the copy of ALVTCB, the task control block.
27B3
LD C,03H 0E 03
Load Register C with 03H, task slot 3 (source: add as task 3).
27B5
LD A,1DH 3E 1D
Load Register A with 1DH, SVC 29, @ADTSK, which puts the task control block at Register Pair DE into the slot in Register C.
27B7
RST 28H EF
Call @ADTSK with RST 28H (SYS0/SYS): slot 3 of TCB$ points at the module's task, which runs from the next tick of slot 3.
27B8
Jump to SYSRES at 27E3H with the ALIVE module installed and running.
27BAALVBGN
ALVBGN: the module's first bytes, JR 27BAH, a jump to itself: the standard header of a module that is not entered, which @GTMOD and MEMORY read (source: JR $).
27BC-27BD
DEFW 0000H 00 00
27BCH-27BDH: the module's last byte, written at 2790H: the HIGH$ the module was put below.
27BE-27C3
DEFB 05H / DEFM "ALIVE" 05 41 4C 49 56 45
27BEH-27C3H: the length 5 and the name ALIVE of the module, as MEMORY shows it.
27C4-27C7
DEFW 0000H, 0000H 00 00 00 00
27C4H-27C7H: two words 0000H of the header, the places of a DCB address and a spare word.
27C8-27C9ALVTCB
DEFW 0000H 00 00
ALVTCB, 27C8H-27C9H: the task control block, written at 27A3H with the address that the task's code will have in high memory.
27CA
LD HL,004FH 21 4F 00
The task (at module + 10H): load Register Pair HL with 004FH, Register H = row 0 and Register L = column 79, the top right corner (source: get character at 0,79).
27CD
PUSH HL E5
Push Register Pair HL, the row and column, for the second call.
27CE
LD B,01H 06 01
Load Register B with 01H, @VDCTL function 1, which returns in Register A the character at row Register H, column Register L (source: set function 1).
27D0
Call @VDCTL at 0B99H in BOOT/SYS directly, not through RST 28H: Register A = the character now at row 0, column 79 (source: p/u character currently).
27D3
CP 0A3H FE A3
Compare Register A with A3H, one of the two graphics characters the task alternates (source: on the screen and).
27D5
LD A,93H 3E 93
Load Register A with 93H, the other graphics character; the flags of the compare stay (source: exchange it).
27D7
If the character was A3H (Z) jump to ALIVE1 at 27DBH to put 93H.
27D9
LD A,0A3H 3E A3
Load Register A with A3H: any other character, 93H too, is replaced by A3H.
27DBALIVE1
POP HL E1
ALIVE1: pop Register Pair HL, row 0 and column 79.
27DC
LD B,02H 06 02
Load Register B with 02H, @VDCTL function 2, which puts the character in Register C at row Register H, column Register L (source: function to put char).
27DE
LD C,A 4F
Load Register C with Register A, A3H or 93H, the character to put on the screen.
27DF
Call @VDCTL at 0B99H in BOOT/SYS: the character at row 0, column 79 is swapped (source: at row,col).
27E2
RET C9
Return to the task processor of SYS0/SYS; this is the last of the module's 41 bytes.

27E3H - Member 1 (SYSTEM): SYSRES and the Resident Overlay Handler

SYSRES=n keeps SYSn/SYS in high memory, for n from 1 to 5 and 9 to 12. The first time, PUTDVR moves RESBGN, a module of 110 bytes (header SYSRES, the table RESTAB$ of 16 words, one for each overlay number, and the handler RESDVR), below HIGH$ and hooks it into HKRES$, the CALL at 1A6CH in RST28 that otherwise calls CKMOD@ (1A7FH). MOVITIN then has CKMOD@ load SYSn at 1E00H, copies it with the length word at 23FEH (the overlay's own length) below HIGH$ behind a header named SYSn, and enters the length word's address in RESTAB$. From then on RESDVR, called for every overlay request, copies a resident overlay to 1E00H when it is not there already, sets the entry address to 1E00H and returns to RST28; any other request goes on to CKMOD@. Every refusal shows its message and ends SYSTEM with FFFFH.

27E3SYSRES
LD BC,0FFFFH 01 FF FF
SYSRES: load Register Pair BC with the word of SYSRES, this operand 27E4H-27E5H: FFFFH in the file, not given (source: p/u Sysres parm value).
27E6
INC B 04
Increment Register B: Z when the high byte of the word is FFH, SYSRES not given, or given alone or as ON (source: test if parm entered).
27E7
If SYSRES was not given (Z) jump to GETSEC2 at 2924H, the drive parameters (source: go if not).
27EA
Call GOTMEM? at 2C0CH: the Carry flag when CFLAG$ bit 0 forbids a change of HIGH$ (source: is high memory available).
27ED
If HIGH$ may not change (Carry) jump to NOMEM at 2ADDH: No memory space available, return code FFFFH (source: quit if not).
27F0
LD A,C 79
Load Register A with Register C, the low byte of the value, the overlay number (source: get module to reside).
27F1
OR A B7
OR Register A with itself to test the overlay number for 0.
27F2
If the number is 0 (Z) jump to BADSYS at 282BH: SYS0 is the resident system itself (source: cannot sysres 0).
27F4
CP 02H FE 02
Compare Register A with 02H, SYS2 (source: check if it is SYS2).
27F6
If it is not SYS2 (NZ) jump to TEST6 at 27FDH (source: go if not).
27F8
LD HL,0474H 21 74 04
Load Register Pair HL with 0474H, DCT+4 of drive 0 in DCT$ (source: point to SYSTEM DCT).
27FB
RES 7,(HL) CB BE
Reset bit 7 of the byte at Register Pair HL, 0474H: @CKDRV no longer skips the index test of drive 0, even if SYSRES then refuses (source: and allow CKDRV now).
27FDTEST6
CP 06H FE 06
TEST6: compare Register A, the overlay number, with 06H.
27FF
If the number is below 6 (Carry: 1-5) jump to GUDSYS at 2809H (source: can sysres 1-5).
2801
CP 09H FE 09
Compare Register A, the overlay number, with 09H.
2803
If the number is 6, 7 or 8 (Carry) jump to BADSYS at 282BH: the libraries SYS6, SYS7 and SYS8 (source: cannot sysres 6-8).
2805
CP 0DH FE 0D
Compare Register A, the overlay number, with 0DH, 13.
2807
If the number is 13 or more (No Carry) jump to BADSYS at 282BH (source: nothing > 12 yet).
2809GUDSYS
PUSH AF F5
GUDSYS: push Register Pair AF, the overlay number in Register A; PUTDVR comes back here after installing the handler (source: save sysres req).
280A
LD HL,1A6DH 21 6D 1A
Load Register Pair HL with 1A6DH, the operand of the CALL at HKRES$ (1A6CH) in RST28 (source: check if the driver).
280D
LD E,(HL) 5E
Load Register E with the byte at Register Pair HL, 1A6DH, the low byte of the call's address (source: is already resident).
280E
INC HL 23
Increment Register Pair HL to 1A6EH, the high byte of the operand.
280F
LD D,(HL) 56
Load Register D with the byte at Register Pair HL, 1A6EH: Register Pair DE = the address HKRES$ calls.
2810
LD HL,1A7FH 21 7F 1ALD HL,CKMOD@
Load Register Pair HL with 1A7FH, CKMOD@, the address in the release (source: standard address).
2813
OR A B7
OR Register A with itself to clear the Carry flag for the SBC (source: reset carry).
2814
SBC HL,DE ED 52
Subtract Register Pair DE from Register Pair HL: Z when HKRES$ still calls CKMOD@ (source: no driver if =).
2816
If no handler is installed (Z) jump to PUTDVR at 2889H to install RESDVR first (source: go and install driver).
2818
LD HL,0FFE0H 21 E0 FF
Load Register Pair HL with FFE0H, minus 20H: RESTAB$ lies 20H bytes before RESDVR's entry (source: find restab$ pos).
281B
ADD HL,DE 19
Add Register Pair DE, RESDVR's address, to Register Pair HL: Register Pair HL = RESTAB$ in high memory (source: pt to vector table).
281C
RLCA 07
Rotate Register A left: the overlay number times 2, the offset of its word in RESTAB$ (source: request x 2).
281D
ADD A,L 85
Add Register L to Register A, the low byte of RESTAB$.
281E
LD L,A 6F
Load Register L with Register A, the low byte of RESTAB$ + 2n.
281F
If the add did not carry (No Carry) jump to 2822H.
2821
INC H 24
Increment Register H: Register Pair HL = RESTAB$ + 2n (source: RESTAB$ + entry index).
2822
INC HL 23
Increment Register Pair HL to the high byte of the word (source: pt to hi order).
2823
LD A,(HL) 7E
Load Register A with the byte at Register Pair HL, the high byte of the overlay's entry (source: p/u hi order).
2824
OR A B7
OR Register A with itself: Z when the high byte is 00H, the overlay not resident.
2825
If the overlay is not resident (Z) jump to MOVITIN at 2842H with Register A = 00H (source: go if not there).
2827
LD HL,2489H 21 89 24LD HL,MODRES$
Load Register Pair HL with 2489H, MODRES$, System module already resident (source: else show already res'ed).
282A
DEFB 0DDH DD
282AH: the DDH that makes the next LD HL,246BH an LD IX,246BH, so that Register Pair HL keeps MODRES$; Index Register IX is not used after.
282BBADSYS
LD HL,246BH 21 6B 24LD HL,BADSYS$
BADSYS: load Register Pair HL with 246BH, BADSYS$, Can't SYSRES requested module.
282E
Call SETERR at 2AE4H, which shows the message at Register Pair HL with @LOGOT and ends SYSTEM through ABORT with FFFFH; it does not return (source: log and set error).
2831
POP AF F1
Pop Register Pair AF, the overlay number: never run, since SETERR does not return.
2832
Jump to GETSEC2 at 2924H: never run, like the POP before it.
2835RES1
RES1: the header put before each resident overlay, JR 2835H, a jump to itself, since the module has no entry of its own (source: no real entry).
2837-2838
DEFW 0000H 00 00
2837H-2838H: the header's last byte, written at 2852H with the HIGH$ the overlay was put below (source: last used).
2839-283D
DEFB 04H / DEFM "SYS " 04 53 59 53 20
2839H-283DH: the length 4 and the name SYSn; 283DH, a space in the file, gets the overlay's number as 1-9 or A-C at 2878H.
283E-2841
DEFW 0000H, 0000H 00 00 00 00
283EH-2841H: two words 0000H of the header; LDDR copies the 13 bytes 2835H-2841H at 2880H.
2842MOVITIN
LD (0069H),A 32 69 00LD (OVRLY$),A
MOVITIN: store Register A, 00H, into 0069H, OVRLY$, so that the next overlay request loads its overlay again, SYS1 too, which is overwritten at 1E00H now (source: show no overlay res).
2845
POP AF F1
Pop Register Pair AF, the overlay number n in Register A (source: rcvr requested SYS).
2846
PUSH AF F5
Push Register Pair AF again, the overlay number for 286CH.
2847
ADD A,02H C6 02
Add 02H to Register A: overlay requests number SYS0-SYS5 as 2-7 and SYS9-SYS12 as 11-14 (source: adjust for dec).
2849
OR 80H F6 80
OR Register A with 80H, the mark of an overlay request, function 0 (source: set Sys request).
284B
PUSH HL E5
Push Register Pair HL, the address of the high byte of the overlay's word in RESTAB$ (source: save restab$ addr).
284C
Call CKMOD@ at 1A7FH in SYS0/SYS directly: it reads SYSn/SYS from drive 0 to 1E00H, since OVRLY$ is 00H, and does not run it; a missing overlay ends in SYSERR (source: load SYSn, no exec).
284F
Call GETHI$ at 2C04H: Register Pair HL = HIGH$ (source: p/u HIGH$).
2852
LD (2837H),HL 22 37 28
Store Register Pair HL into 2837H-2838H, the last byte of the RES1 header (source: save in header).
2855
EX DE,HL EB
Exchange Register Pairs DE and HL: Register Pair DE = HIGH$, where the overlay's last byte goes.
2856
LD BC,(23FEH) ED 4B FE 23
Load Register Pair BC with the word at 23FEH-23FFH, the length of the overlay just loaded, which every SYS overlay but SYS13 carries there (source: p/u length of SYSx).
285A
LD HL,1E00H 21 00 1E
Load Register Pair HL with 1E00H, the start of the overlay area (source: pt to start of overlay).
285D
ADD HL,BC 09
Add Register Pair BC to Register Pair HL: one past the overlay's last byte.
285E
DEC HL 2B
Decrement Register Pair HL to the overlay's last byte (source: point to last byte).
285F
PUSH BC C5
Push Register Pair BC, the length (source: save length).
2860
LDDR ED B8
Copy the overlay downwards from Register Pair HL to Register Pair DE, HIGH$ and below, with LDDR (Register Pair BC = the length): it ends at HIGH$; Register Pair DE ends one below its first byte.
2862
POP BC C1
Pop Register Pair BC, the length (source: rcvr length of SYSx).
2863
LD A,B 78
Load Register A with Register B, the high byte of the length (source: and stuff in front).
2864
LD (DE),A 12
Store Register A into the byte at Register Pair DE, just below the overlay (source: of SYSRESed module).
2865
DEC DE 1B
Decrement Register Pair DE to the byte below the high byte of the length.
2866
LD A,C 79
Load Register A with Register C, the low byte of the length.
2867
LD (DE),A 12
Store Register A into the byte at Register Pair DE: the word below the overlay is its length, and Register Pair DE its address.
2868
POP HL E1
Pop Register Pair HL, the high byte of the overlay's word in RESTAB$ (source: rcvr RESTAB ptr).
2869
LD (HL),D 72
Store Register D into the byte at Register Pair HL (source: save hi order addr).
286A
DEC HL 2B
Decrement Register Pair HL to the low byte of the overlay's RESTAB$ word.
286B
LD (HL),E 73
Store Register E into the byte at Register Pair HL: RESTAB$ now holds the address of the length word (source: save low order addr).
286C
POP AF F1
Pop Register Pair AF, the overlay number in Register A (source: rcvr module requested).
286D
CP 0AH FE 0A
Compare Register A with 0AH (source: convert to ASCII).
286F
If the number is below 10 (Carry) jump to 2873H.
2871
ADD A,07H C6 07
Add 07H to Register A, so that 10-12 become the letters A-C.
2873
ADD A,30H C6 30
Add 30H to Register A: the digit or letter of the overlay.
2875
LD HL,283DH 21 3D 28
Load Register Pair HL with 283DH, the last character of the header's name SYS.
2878
LD (HL),A 77
Store Register A into the byte at Register Pair HL, 283DH: the name becomes SYS1 to SYS5, SYS9, SYSA, SYSB or SYSC (source: stuff module name).
2879
DEC DE 1B
Decrement Register Pair DE to the byte below the length word (source: pt to 1st free byte).
287A
LD BC,000DH 01 0D 00
Load Register Pair BC with 000DH, the 13 bytes of the RES1 header (source: linkage protocol).
287D
LD HL,2841H 21 41 28LD HL,RES1E
Load Register Pair HL with 2841H, the last byte of the header.
2880
LDDR ED B8
Copy the header downwards from Register Pair HL, 2841H-2835H, to Register Pair DE with LDDR (Register Pair BC = 000DH): it ends just below the length word; Register Pair DE ends one below it.
2882
EX DE,HL EB
Exchange Register Pairs DE and HL: Register Pair HL = the byte below the header, the new HIGH$.
2883
LD A,64H 3E 64
Load Register A with 64H, SVC 100, @HIGH$; Register B is 00H after the LDDR, function 0, HIGH$ (source: stuff new HIGH$ (B=0)).
2885
RST 28H EF
Call @HIGH$ with RST 28H (SYS0/SYS): HIGH$ (040EH) = Register Pair HL, below the header.
2886
Jump to GETSEC2 at 2924H, the drive parameters.
2889PUTDVR
PUTDVR: call GETHI$ at 2C04H: Register Pair HL = HIGH$, with the Carry flag clear (source: p/u high mem).
288C
LD (28B8H),HL 22 B8 28
Store Register Pair HL into 28B8H-28B9H, the RESBGN header's last byte (source: stuff last used).
288F
LD BC,006EH 01 6E 00
Load Register Pair BC with 006EH, the 110 bytes of RESBGN-2923H.
2892
SBC HL,BC ED 42
Subtract Register Pair BC from Register Pair HL, the Carry flag clear after GETHI$: HIGH$ less 110 (source: make space for driver).
2894
LD B,00H 06 00
Load Register B with 00H, @HIGH$ function 0, HIGH$; Register Pair BC = 006EH again.
2896
LD A,64H 3E 64
Load Register A with 64H, SVC 100, @HIGH$ (source: stuff new value).
2898
RST 28H EF
Call @HIGH$ with RST 28H (SYS0/SYS): HIGH$ (040EH) = Register Pair HL.
2899
PUSH HL E5
Push Register Pair HL, the new HIGH$ (source: save new HIGH$).
289A
LD DE,000DH 11 0D 00
Load Register Pair DE with 000DH (source: pt to RESTAB$-3).
289D
ADD HL,DE 19
Add Register Pair DE to Register Pair HL: the new HIGH$ + 13, which will be RESTAB$ less 3 in high memory.
289E
LD (28F1H),HL 22 F1 28
Store Register Pair HL into 28F1H-28F2H, the operand of the LD HL at RESD1 (28F0H), before the copy (source: stuff ptr to RESTAB$-3).
28A1
POP HL E1
Pop Register Pair HL, the new HIGH$ pushed at 2899H.
28A2
INC HL 23
Increment Register Pair HL to the new HIGH$ + 1, where RESBGN goes (source: resbgn).
28A3
PUSH HL E5
Push Register Pair HL, the module's start in high memory.
28A4
EX DE,HL EB
Exchange Register Pairs DE and HL: Register Pair DE = the module's start in high memory (source: where it goes to DE).
28A5
LD HL,28B6H 21 B6 28LD HL,RESBGN
Load Register Pair HL with 28B6H, RESBGN in this member (source: where it's now).
28A8
LDIR ED B0
Copy the module from Register Pair HL, 28B6H-2923H, to Register Pair DE with LDIR (Register Pair BC = 006EH) (source: move up to high).
28AA
POP HL E1
Pop Register Pair HL, the module's start in high memory (source: rcvr where it got to).
28AB
LD DE,002FH 11 2F 00
Load Register Pair DE with 002FH, the offset of RESDVR in the module (source: index start of dvr).
28AE
ADD HL,DE 19
Add Register Pair DE to Register Pair HL: RESDVR's address in high memory (source: pt to driver entry).
28AF
LD (1A6DH),HL 22 6D 1A
Store Register Pair HL into 1A6DH-1A6EH, the operand of HKRES$: RST28 now calls RESDVR for every overlay request (source: hook into SYS0).
28B2
POP AF F1
Pop Register Pair AF, the overlay number pushed at GUDSYS (source: rcvr code and loop).
28B3
Jump back to GUDSYS at 2809H, which now finds the handler and RESTAB$ (source: to get the request).
28B6RESBGN
RESBGN: the handler module's header, JR 28B6H, a jump to itself, since it is not entered at its start (source: no real entry).
28B8-28B9
DEFW 0000H 00 00
28B8H-28B9H: the module's last byte, written at 288CH with the HIGH$ it was put below.
28BA-28C0
DEFB 06H / DEFM "SYSRES" 06 53 59 53 52 45 53
28BAH-28C0H: the length 6 and the name SYSRES of the module, as MEMORY shows it.
28C1-28C4
DEFW 0000H, 0000H 00 00 00 00
28C1H-28C4H: two words 0000H of the module header, after its name.
28C5-28D4RESTAB$
DEFW 0001H, 0000H, 0000H, 0000H, 0000H, 0000H, 0001H, 0001H 01 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00
RESTAB$, 28C5H-28D4H: the words of overlays 0-7; the high byte 00H means not resident, so the 0001H of SYS0, SYS6 and SYS7 count as not resident too.
28D5-28E4
DEFW 0000H, 0000H, 0000H, 0000H, 0000H, 0000H, 0000H, 0000H 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
28D5H-28E4H: the words of overlays 8-15; MOVITIN writes the address of the length word of each overlay made resident.
28E5RESDVR
PUSH HL E5
RESDVR: the handler that HKRES$ calls with Register A = the overlay request: push Register Pair HL.
28E6
PUSH AF F5
Push Register Pair AF, the request in Register A (source: save SYS needed).
28E7
LD HL,0069H 21 69 00LD HL,OVRLY$
Load Register Pair HL with 0069H, OVRLY$, the request of the overlay now at 1E00H (source: check if already in).
28EA
XOR (HL) AE
Exclusive OR Register A with the byte at Register Pair HL, 0069H (source: overlay area).
28EB
AND 0FH E6 0F
AND Register A with 0FH, the overlay number of the two requests (source: strip garbage).
28ED
If the overlay is already at 1E00H (Z) jump to NOTRES at 291FH, which passes the request on to CKMOD@.
28EF
POP AF F1
Pop Register Pair AF, the request in Register A, before RESD1.
28F0RESD1
LD HL,28C6H 21 C6 28
RESD1: load Register Pair HL with the address stored at 289EH, RESTAB$ less 3 in the copy (28C6H in the file) (source: p/u table ptr).
28F3
PUSH AF F5
Push Register Pair AF again, the request in Register A.
28F4
AND 0FH E6 0F
AND Register A with 0FH, the overlay number of the request, 2 more than the SYS number (source: check if in high mem).
28F6
RLCA 07
Rotate Register A left: times 2 (source: X 2).
28F7
ADD A,L 85
Add Register L to Register A: with RESTAB$ less 3, the high byte of the word of SYS(nibble less 2).
28F8
LD L,A 6F
Load Register L with Register A, the low byte of the entry's address.
28F9
If the add did not carry (No Carry) jump to 28FCH.
28FB
INC H 24
Increment Register H when the add crossed a page.
28FC
LD A,(HL) 7E
Load Register A with the byte at Register Pair HL, the high byte of the overlay's word (source: p/u hi order).
28FD
OR A B7
OR Register A with itself: Z when the overlay is not resident.
28FE
If it is not resident (Z) jump to NOTRES at 291FH (source: go if not in high).
2900
DEC HL 2B
Decrement Register Pair HL to the low byte (source: pt to low).
2901
LD L,(HL) 6E
Load Register L with the byte at Register Pair HL, the low byte of the address (source: p/u lo order vector).
2902
LD H,A 67
Load Register H with Register A: Register Pair HL = the address of the overlay's length word (source: xfer hi order).
2903
PUSH DE D5
Push Register Pair DE (source: save these regs).
2904
PUSH BC C5
Push Register Pair BC for the caller of RST 28H.
2905
LD C,(HL) 4E
Load Register C with the byte at Register Pair HL, the low byte of the overlay's length (source: p/u module length).
2906
INC HL 23
Increment Register Pair HL (source: into BC).
2907
LD B,(HL) 46
Load Register B with the byte at Register Pair HL: Register Pair BC = the length.
2908
INC HL 23
Increment Register Pair HL to the overlay's first byte (source: point to module start).
2909
LD DE,1E00H 11 00 1E
Load Register Pair DE with 1E00H, the overlay area (source: point to overlay region).
290C
LD (1A75H),DE ED 53 75 1A
Store Register Pair DE, 1E00H, into 1A75H-1A76H, the operand of the CALL at TRANSFR in RST28: the overlay is entered at 1E00H (source: upd TRAADR).
2910
PUSH BC C5
Push Register Pair BC, the length (source: save the length).
2911
LDIR ED B0
Copy the overlay from Register Pair HL to Register Pair DE, 1E00H, with LDIR (Register Pair BC = the length).
2913
POP HL E1
Pop Register Pair HL, the length (source: rcvr the length).
2914
LD (23FEH),HL 22 FE 23
Store Register Pair HL into 23FEH-23FFH, where the overlay keeps its length, for a later SYSRES (source: stuff pointer).
2917
POP BC C1
Pop Register Pair BC, the caller's value (source: restore regs).
2918
POP DE D1
Pop Register Pair DE, the caller's value pushed at 2903H.
2919
POP AF F1
Pop Register Pair AF, the request in Register A.
291A
LD (1A70H),A 32 70 1A
Store Register A into 1A70H, the operand of the LD A at 1A6FH, which RST28 stores into OVRLY$ next (source: show its resident).
291D
POP HL E1
Pop Register Pair HL (source: in tempy loc'n).
291E
RET C9
Return to RST28 at 1A6FH, which records the overlay and calls it at 1E00H.
291FNOTRES
POP AF F1
NOTRES: pop Register Pair AF, the request in Register A.
2920
POP HL E1
Pop Register Pair HL, the caller's value pushed at 28E5H.
2921
Jump to CKMOD@ at 1A7FH in SYS0/SYS, which loads the overlay if needed and returns to RST28; this is the module's last byte (2923H).

2924H - Member 1 (SYSTEM): DRIVE, WP, CYL, DISABLE and ENABLE, STEP, DELAY and CKDRV

With DRIVE=d the drive parameters act on that drive alone; without DRIVE they act on all eight drives, one DCT after the other, and CYL then changes all eight default DCTs. Index Register IY points at the drive's DCT in DCT$ (0470H, ten bytes a drive), where WP, ENABLE and DISABLE, STEP, DELAY and CKDRV act at once; Index Register IX points at the same drive's default DCT in the system information sector (1D70H on), where CYL goes, and the sector is read before and written after only when CYL is given with a low byte other than 00H. Without DRIVE, DISABLE is passed over and ENABLE enables all eight drives.

2924GETSEC2
LD A,(2964H) 3A 64 29
GETSEC2: load Register A with the byte at 2964H, the low byte of CYL's word (source: if CYL=c entered).
2927
OR A B7
OR Register A with itself: NZ when CYL was given with a low byte other than 00H.
2928
If so (NZ) call GETCFG at 2BF5H, which reads sector 2 of cylinder 0 of drive 0 into SBUFF$ (1D00H) for CYL (source: get config sector).
292BDRIVE
LD BC,0FFFFH 01 FF FF
DRIVE: load Register Pair BC with the word of DRIVE, this operand 292CH-292DH: FFFFH in the file, not given; its low byte is read again later as the drive.
292E
LD IX,1D70H DD 21 70 1D
Load Index Register IX with 1D70H, the default DCT of drive 0 in the sector buffer, offset 70H of sector 2 (source: pt to DCT sector fields).
2932
LD IY,0470H FD 21 70 04LD IY,DCT$
Load Index Register IY with 0470H, DCT$, the DCT of drive 0, for the loop over all drives (source: init to do all DCT$'s).
2936
INC B 04
Increment Register B: Z when the high byte of DRIVE's word is FFH, DRIVE not given, or given alone or as ON, and also for FF00H-FF07H, which the later tests of the low byte take as a drive (B181).
2937
If DRIVE was not given (Z) jump to ADJEI at 2944H with the DCT of drive 0; a word from FF00H to FF07H counts as not given here too, though the later tests of its low byte take it as a drive (B181) (source: go if Drive not entered).
2939
LD A,C 79
Load Register A with Register C, the drive number; the high byte is not looked at.
293A
CP 08H FE 08
Compare Register A, the drive number, with 08H.
293C
If the drive is 8 or more (No Carry) jump to PRMERR at 2AE1H: Parameter error, return code FFFFH (source: go if > 7).
293F
LD A,51H 3E 51
Load Register A with 51H, SVC 81, @GTDCT, which points Index Register IY at the DCT of drive Register C (source: get its DCT).
2941
RST 28H EF
Call @GTDCT with RST 28H (SYS0/SYS): Index Register IY = 0470H + 10 x the drive; the drive need not be enabled.
2942
PUSH IY FD E5
Push Index Register IY, the DCT's address, for DRIVER and DVR4 (source: save the DCT address).
2944ADJEI
PUSH IY FD E5
ADJEI: push Index Register IY, the DCT's address (source: calc IY offset into).
2946
POP HL E1
Pop it into Register Pair HL (source: DCTs to adjust IX).
2947
LD DE,0FB90H 11 90 FB
Load Register Pair DE with FB90H, minus 0470H (source: without affecting IY).
294A
ADD HL,DE 19
Add Register Pair DE to Register Pair HL: the DCT's offset from DCT$, 10 x the drive.
294B
EX DE,HL EB
Exchange Register Pairs DE and HL: Register Pair DE = the offset.
294C
ADD IX,DE DD 19
Add Register Pair DE to Index Register IX: the same drive's default DCT in the sector buffer.
294EWPARM
LD BC,0001H 01 01 00
WPARM: load Register Pair BC with the word of WP, this operand 294FH-2950H: 0001H in the file, not given (source: p/u WP parm value).
2951
LD A,B 78
Load Register A with Register B, the high byte of WP's word.
2952
OR C B1
OR Register A with Register C, the low byte: the two bytes ORed.
2953
DEC A 3D
Decrement Register A: Z when the bytes ORed to 01H, WP not given (source: check if entered).
2954
If WP was not given (Z) jump to CYLPRM at 2963H (source: and go if not).
2956
INC A 3C
Increment Register A back to the ORed bytes: Z for WP=OFF (also =N, =NO or =0, a word of 0000H).
2957
If WP=OFF (Z) jump to WPOFF at 295FH (source: go if OFF).
2959WPON
SET 7,(IY+03H) FD CB 03 FE
WPON: set bit 7 of DCT+3 (IY+03H), Index Register IY holding the DCT's address: the drive is write protected by software (source: turn on write protect).
295D
Jump to CYLPRM at 2963H, over WPOFF, with the drive protected.
295FWPOFF
RES 7,(IY+03H) FD CB 03 BE
WPOFF: reset bit 7 of DCT+3 (IY+03H), Index Register IY holding the DCT's address: the software write protection ends; a tab on the diskette still protects it (source: turn off write protect).
2963CYLPRM
LD BC,0000H 01 00 00
CYLPRM: load Register Pair BC with the word of CYL, this operand 2964H-2965H: 0000H in the file, not given (source: p/u Cyl parm value).
2966
LD A,B 78
Load Register A with Register B, the high byte of CYL's word.
2967
OR C B1
OR Register A with Register C: Z when the word is 0000H.
2968
If CYL was not given (Z) jump to DISABL at 2995H (source: go if parm not entered).
296A
BIT 5,(IX+03H) DD CB 03 6E
Test bit 5 of DCT+3 (IX+03H) of the default DCT, Index Register IX holding its address in the sector buffer: set for an 8 inch drive (source: if drive is 8 inch).
296E
If the default DCT is not 8 inch (Z) jump to CYL1 at 297CH (source: can't do it).
2970
LD A,(292CH) 3A 2C 29
Load Register A with the byte at 292CH, the low byte of DRIVE's word: the drive, or FFH when DRIVE was not given (source: if drive entered).
2973
OR A B7
OR Register A with itself: NZ for FFH and for drives 1-7, Z only for DRIVE=0; the INC A of the other tests is missing (B174) (source: give error msg).
2974
LD HL,242DH 21 2D 24LD HL,NOCYL8$
Load Register Pair HL with 242DH, NOCYL8$, CYL=c invalid on 8" drive; the flags of the OR stay (source: can't CYL on 8 inch drive).
2977
If Register A was not 00H (NZ) call SETERR at 2AE4H, which shows the message and ends SYSTEM with FFFFH: for drives 1-7 and for the loop without DRIVE (source: msg if DRIVE=d).
297A
Jump to DISABL at 2995H, leaving the cylinder count of the 8 inch drive unchanged: reached only for DRIVE=0, with no message.
297CCYL1
LD A,C 79
CYL1: load Register A with Register C, the low byte of the count; the high byte is not looked at (source: p/u user entry).
297D
DEC A 3D
Decrement Register A: the highest cylinder number, as DCT+6 holds it.
297E
CP 22H FE 22
Compare Register A with 22H, 34: a count below 35 is refused (source: not < 35 allowed).
2980
If the count is below 35 (Carry) jump to BADCYL at 2986H (source: go if bad).
2982
CP 60H FE 60
Compare Register A with 60H, 96 (source: max for 5-1/4 inch floppy).
2984
If the count is 96 or less (Carry) jump to GUDCYL at 2992H (source: good if < 96).
2986BADCYL
LD HL,2447H 21 47 24LD HL,BADCYL$
BADCYL: load Register Pair HL with 2447H, BADCYL$, Cylinder count out of range <35-96> (source: cyl out of range).
2989
Call SETERR at 2AE4H, which shows the message and ends SYSTEM with FFFFH; it does not return (source: dsply and quit).
298C
XOR A AF
Clear Register A: never run, since SETERR does not return.
298D
LD (2964H),A 32 64 29
Store Register A into 2964H, the low byte of CYL's word, so that PUTSEC2 would not write the sector: never run.
2990
Jump to DISABL at 2995H: never run, since SETERR does not return.
2992GUDCYL
LD (IX+06H),A DD 77 06
GUDCYL: store Register A, the count less one, into DCT+6 (IX+06H) of the default DCT, Index Register IX holding its address in the sector buffer: FORMAT's default (source: stuff default DCT).
2995DISABL
LD BC,0000H 01 00 00
DISABL: load Register Pair BC with the word of DISABLE, this operand 2996H-2997H: 0000H in the file, not given (source: p/u parm value).
2998
LD A,B 78
Load Register A with Register B, the high byte of DISABLE's word.
2999
OR C B1
OR Register A with Register C: Z when the word is 0000H (also DISABLE=OFF).
299A
If DISABLE was not given (Z) jump to ENABLE at 29A6H (source: go if not DISABLE).
299C
LD A,(292CH) 3A 2C 29
Load Register A with the byte at 292CH, the low byte of DRIVE's word (source: don't permit disable).
299F
INC A 3C
Increment Register A: Z when it was FFH, DRIVE not given (source: if DRIVE parm not).
29A0
If DRIVE was not given (Z) jump to STEP at 29B2H: DISABLE is passed over with no message, and so is ENABLE (source: entered).
29A2
LD A,0C9H 3E C9
Load Register A with C9H, the opcode of RET, the first byte of a disabled DCT (source: init disable byte).
29A4
Jump to ENADIS at 29AFH: DISABLE wins over ENABLE.
29A6ENABLE
LD BC,0000H 01 00 00
ENABLE: load Register Pair BC with the word of ENABLE, this operand 29A7H-29A8H: 0000H in the file, not given (source: p/u parm value).
29A9
LD A,B 78
Load Register A with Register B, the high byte of ENABLE's word.
29AA
OR C B1
OR Register A with Register C: Z when the word is 0000H (also ENABLE=OFF).
29AB
If ENABLE was not given (Z) jump to STEP at 29B2H (source: go if not ENABLE).
29AD
LD A,0C3H 3E C3
Load Register A with C3H, the opcode of JP: the DCT's driver is called again (source: init enable byte).
29AFENADIS
LD (IY+00H),A FD 77 00
ENADIS: store Register A into DCT+0 (IY+00H), Index Register IY holding the DCT's address: JP or RET before the driver's address in DCT+1 and DCT+2 (source: stuff Ena or Dis byte).
29B2STEP
LD BC,0FFFFH 01 FF FF
STEP: load Register Pair BC with the word of STEP, this operand 29B3H-29B4H: FFFFH in the file, not given (source: p/u Step parm value).
29B5
INC B 04
Increment Register B: Z when the high byte of STEP's word is FFH, STEP not given, or given alone or as ON.
29B6
If STEP was not given (Z) jump to DELAY at 29CDH (source: go if STEP not entered).
29B8
LD A,C 79
Load Register A with Register C, the step rate; the high byte is not looked at.
29B9
CP 04H FE 04
Compare Register A with 04H (source: step must be < 4).
29BB
If the rate is 4 or more (No Carry) jump to PRMERR at 2AE1H: Parameter error, return code FFFFH (source: quit if out of range).
29BE
BIT 4,(IY+04H) FD CB 04 66
Test bit 4 of DCT+4 (IY+04H), Index Register IY holding the DCT's address: set for an alien drive, a hard drive or a MemDISK (source: alien controller?).
29C2
If the drive is alien (NZ) jump to WDESD at 29FDH, past DELAY and CKDRV too, so those two are not set for that drive (B175) (source: bypass if alien).
29C4
LD A,(IY+03H) FD 7E 03
Load Register A with DCT+3 (IY+03H), Index Register IY holding the DCT's address (source: p/u DCT byte and).
29C7
AND 0FCH E6 FC
AND Register A with FCH to clear bits 1-0, the step rate (source: mask out old step).
29C9
OR C B1
OR Register A with Register C, the new rate 0-3 (source: or in the new value).
29CA
LD (IY+03H),A FD 77 03
Store Register A into DCT+3 (IY+03H), Index Register IY holding the DCT's address (source: and put back in DCT).
29CDDELAY
LD BC,0001H 01 01 00
DELAY: load Register Pair BC with the word of DELAY, this operand 29CEH-29CFH: 0001H in the file, not given (source: p/u the parm value).
29D0
LD A,B 78
Load Register A with Register B, the high byte of DELAY's word.
29D1
OR C B1
OR Register A with Register C, the low byte: the two bytes ORed.
29D2
DEC A 3D
Decrement Register A: Z when the bytes ORed to 01H, DELAY not given (source: check if entered).
29D3
If DELAY was not given (Z) jump to CKDRV at 29E5H (source: go if no delay entered).
29D5
INC A 3C
Increment Register A back to the ORed bytes: Z for DELAY=OFF (also =N, =NO or =0, a word of 0000H) (source: check if OFF).
29D6
LD B,00H 06 00
Load Register B with 00H, bit 2 clear, the delay of 1 second for DELAY=ON; the flags stay (source: init delay=on).
29D8
If DELAY is not OFF (NZ) jump to DELAY1 at 29DCH (source: go if ON).
29DA
LD B,04H 06 04
Load Register B with 04H, bit 2 set, the delay of 0.5 second for DELAY=OFF (source: init delay=off).
29DCDELAY1
LD A,(IY+03H) FD 7E 03
DELAY1: load Register A with DCT+3 (IY+03H), Index Register IY holding the DCT's address (source: update delay).
29DF
AND 0FBH E6 FB
AND Register A with FBH to clear bit 2 (source: in DCT).
29E1
OR B B0
OR Register A with Register B, 00H or 04H, the new bit 2.
29E2
LD (IY+03H),A FD 77 03
Store Register A into DCT+3 (IY+03H), Index Register IY holding the DCT's address.
29E5CKDRV
LD BC,0001H 01 01 00
CKDRV: load Register Pair BC with the word of CKDRV, this operand 29E6H-29E7H: 0001H in the file, not given (source: p/u Ckdrv parm value).
29E8
LD A,B 78
Load Register A with Register B, the high byte of CKDRV's word.
29E9
OR C B1
OR Register A with Register C, the low byte: the two bytes ORed.
29EA
DEC A 3D
Decrement Register A: Z when the bytes ORed to 01H, CKDRV not given (source: check if entered).
29EB
If CKDRV was not given (Z) jump to WDESD at 29FDH (source: go if not entered).
29ED
INC A 3C
Increment Register A back to the ORed bytes: Z for CKDRV=OFF (also =N, =NO or =0, a word of 0000H) (source: see if OFF or ON).
29EE
LD B,00H 06 00
Load Register B with 00H, bit 7 clear: @CKDRV tests the index pulses of the drive; the flags stay (source: init ckdrv=on).
29F0
If CKDRV is not OFF (NZ) jump to CKDRV1 at 29F4H (source: go if ON).
29F2
LD B,80H 06 80
Load Register B with 80H, bit 7 set: @CKDRV skips the index test (source: set bit 7, ckdrv off).
29F4CKDRV1
LD A,(IY+04H) FD 7E 04
CKDRV1: load Register A with DCT+4 (IY+04H), Index Register IY holding the DCT's address (source: update ckdrv bit).
29F7
AND 7FH E6 7F
AND Register A with 7FH to clear bit 7 (source: by removing old state).
29F9
OR B B0
OR Register A with Register B, 00H or 80H (source: merging 0 or 80H).
29FA
LD (IY+04H),A FD 77 04
Store Register A into DCT+4 (IY+04H), Index Register IY holding the DCT's address (source: and putting back in DCT).
29FDWDESD
LD A,(292CH) 3A 2C 29
WDESD: load Register A with the byte at 292CH, the low byte of DRIVE's word (source: drive parm used prev?).
2A00
INC A 3C
Increment Register A: NZ when DRIVE was given (the low byte was not FFH).
2A01
If DRIVE was given (NZ) jump to PUTSEC2 at 2A17H, with its DCT's address on the stack; for a DRIVE word FF00H-FF07H nothing was pushed, and the loop ends here after drive 0 (B181) (source: go if DRIVE entered).
2A03
LD DE,000AH 11 0A 00
Load Register Pair DE with 000AH, the ten bytes of a DCT (source: else loop thru all DCTs).
2A06
ADD IX,DE DD 19
Add Register Pair DE to Index Register IX: the next default DCT in the sector buffer (source: advance to next DCT).
2A08
ADD IY,DE FD 19
Add Register Pair DE to Index Register IY: the next DCT in DCT$.
2A0A
PUSH IY FD E5
Push Index Register IY, the next DCT's address.
2A0C
POP HL E1
Pop it into Register Pair HL (source: xfer DCT start to HL).
2A0D
LD A,L 7D
Load Register A with Register L, the low byte of the DCT's address (source: ck on end of DCTs).
2A0E
CP 0C0H FE C0
Compare Register A with C0H: 04C0H is the byte after the eighth DCT (source: offset is 70H).
2A10
If there are DCTs left (Carry) jump back to WPARM at 294EH for the next drive (source: loop until done).
2A13
LD HL,0000H 21 00 00
Load Register Pair HL with 0000H, the DCT address for DRIVER when no drive was given (source: show no DCT given).
2A16
PUSH HL E5
Push Register Pair HL, 0000H, where DRIVE=d pushed its DCT's address.
2A17PUTSEC2
LD A,(2964H) 3A 64 29
PUTSEC2: load Register A with the byte at 2964H, the low byte of CYL's word (source: if CYL=c entered).
2A1A
OR A B7
OR Register A with itself: NZ when GETSEC2 read the sector.
2A1B
If so (NZ) call PUTCFG at 2BF2H, which writes SBUFF$ back to sector 2 of cylinder 0 of drive 0 (source: put config sector).

2A1EH - Member 1 (SYSTEM): DRIVER, and the Exits

DRIVER="filespec" loads a drive driver program (default extension /DCT) and calls it at its transfer address with Register Pair DE = the DCT of DRIVE=d (0000H without DRIVE), SFLAG$ bit 2 and CFLAG$ bit 3 (a system request) set; it returns to DVR4. While CFLAG$ bit 0 freezes HIGH$ a name gives No memory space available before anything is loaded. DRIVER without a name prompts for one; ENTER alone does nothing, and BREAK puts the default DCT of the drive back, from the system information sector, into DCT+3 to DCT+9 (DDCT1). After DRIVER the exits of SYSTEM follow: ABORT (FFFFH) and LSAVESP, which restores the Stack Pointer of the entry and clears a pending BREAK, the messages (a DDH chain into SETERR, which shows the message with @LOGOT and aborts) and IOERR, which shows the short text of an error and returns its number (C0H plus the number after a failed @LOAD, B180).

2A1EDVRPARM
LD DE,0000H 11 00 00
DVRPARM: load Register Pair DE with the word of DRIVER, this operand 2A1FH-2A20H: 0000H in the file; FFFFH for DRIVER alone, or the address of the first character of DRIVER="filespec" (source: p/u parm value).
2A21
LD A,D 7A
Load Register A with Register D, the high byte of DRIVER's word.
2A22
OR E B3
OR Register A with Register E: Z when the word is 0000H, DRIVER not given.
2A23
If DRIVER was not given (Z) jump to DVR4 at 2AF4H, which pops the DCT address (source: go if DRIVER not entered).
2A26
INC A 3C
Increment Register A: Z when the bytes ORed to FFH, DRIVER given without a name (source: full name given?).
2A27
If no name was given (Z) jump to GETN3 at 2A4CH to prompt for it (source: go if not and prompt).
2A29
LD HL,2CFBH 21 FB 2C
Load Register Pair HL with 2CFBH, FCB1 + 1, where the name is copied (source: else pick it up).
2A2C
PUSH HL E5
Push Register Pair HL, the start of the copy (source: save ptr to start).
2A2DGETN1
LD A,(DE) 1A
GETN1: load Register A with the byte at Register Pair DE, the next character after the opening quote (source: p/u name char).
2A2E
CP 0DH FE 0D
Compare Register A with 0DH, the end of the line.
2A30
If it is the end of the line (Z) jump to GETN2 at 2A47H (source: exit on eol).
2A32
CP 2CH FE 2C
Compare Register A with 2CH, a comma, the end of the parameter.
2A34
If it is a comma (Z) jump to GETN2 at 2A47H (source: exit on end of parm).
2A36
CP 22H FE 22
Compare Register A with 22H, the closing quotation mark.
2A38
If it is the closing quote (Z) jump to GETN2 at 2A47H (source: exit on closing quote).
2A3A
CP 29H FE 29
Compare Register A with 29H, the closing parenthesis.
2A3C
If it is a parenthesis (Z) jump to GETN2 at 2A47H (source: exit on end of parms).
2A3E
CP 03H FE 03
Compare Register A with 03H, the end of a line from a JCL file.
2A40
If it is 03H (Z) jump to GETN2 at 2A47H (source: exit on JCL line end).
2A42
LD (HL),A 77
Store Register A into the byte at Register Pair HL; nothing limits the length of the copy (source: else xfer the char).
2A43
INC DE 13
Increment Register Pair DE to the next character of the line.
2A44
INC HL 23
Increment Register Pair HL to the next byte of the copy.
2A45
Jump back to GETN1 at 2A2DH for the next character (source: loop).
2A47GETN2
LD (HL),0DH 36 0D
GETN2: store 0DH into the byte at Register Pair HL, after the last character (source: end with CR).
2A49
POP HL E1
Pop Register Pair HL, 2CFBH, the start of the name (source: recover name ptr).
2A4A
Jump to DVR2 at 2A91H with Register Pair HL at the name.
2A4CGETN3
LD HL,24A8H 21 A8 24LD HL,EIPMPT
GETN3: load Register Pair HL with 24A8H, EIPMPT, Enter DCT driver <BREAK=default> : and 03H.
2A4F
LD A,0AH 3E 0A
Load Register A with 0AH, SVC 10, @DSPLY, which shows the text at Register Pair HL up to its 0DH or 03H.
2A51
RST 28H EF
Call @DSPLY with RST 28H (BOOT/SYS): the prompt, with the cursor left after it; its result is not tested (source: Enter dct dvr name).
2A52
LD HL,2CFBH 21 FB 2C
Load Register Pair HL with 2CFBH, FCB1 + 1, the buffer for the answer (source: pt to buffer).
2A55
LD BC,1800H 01 00 18
Load Register Pair BC with 1800H: Register B = 24 characters at most, Register C = 00H (source: 24 char max).
2A58
LD A,09H 3E 09
Load Register A with 09H, SVC 9, @KEYIN, which reads a line of up to Register B characters into the buffer at Register Pair HL (source: get filespec).
2A5A
RST 28H EF
Call @KEYIN with RST 28H (BOOT/SYS): the name and a 0DH at 2CFBH; the Carry flag for BREAK.
2A5B
If BREAK was not pressed (No Carry) jump to DVR2 at 2A91H (source: go if not BREAK).
2A5D
BREAK: call GETCFG at 2BF5H, which reads sector 2 of cylinder 0 of drive 0 into SBUFF$ (1D00H), the default DCTs at 1D70H-1DBFH (source: get SIS).
2A60
LD HL,1900H 21 00 19
Load Register Pair HL with 1900H, SBUFF$ less DCT$ plus 70H, so that adding a DCT's address gives its default in the buffer (source: pt to tables offset).
2A63DDCT1
LD A,(292CH) 3A 2C 29
DDCT1: load Register A with the byte at 292CH, the low byte of DRIVE's word (source: was Drive entered?).
2A66
INC A 3C
Increment Register A: Z when it was FFH, DRIVE not given.
2A67
POP DE D1
Pop Register Pair DE, the DCT's address pushed by DRIVE, or 0000H; the flags stay. For a DRIVE word FF00H-FF07H it pops 1A77H, RST28's return address, which DDCT2 then takes as the DCT (B181) (source: rcvr drive #).
2A68
If DRIVE was given (NZ) jump to DDCT2 at 2A6DH with that DCT.
2A6A
LD DE,0470H 11 70 04LD DE,DCT$
Load Register Pair DE with 0470H, DCT$, the DCT of drive 0, to do all eight (source: else use all 8).
2A6DDDCT2
ADD HL,DE 19
DDCT2: add Register Pair DE to Register Pair HL: the drive's default DCT in the buffer, 1D70H + 10 x the drive (source: index the specific DCT).
2A6EDVRA
LD A,E 7B
DVRA: load Register A with Register E, the low byte of the DCT's address.
2A6F
CP 98H FE 98
Compare Register A with 98H, the low byte of the DCT of drive 4.
2A71
LD A,0C9H 3E C9
Load Register A with C9H, RET, the first byte for drives 4-7; the flags of the compare stay (source: disable drives 4-7).
2A73
If the drive is 4-7 (No Carry) jump to DVRB at 2A77H.
2A75
LD A,0C3H 3E C3
Load Register A with C3H, JP, the first byte for drives 0-3.
2A77DVRB
LD (HL),A 77
DVRB: store Register A into the byte at Register Pair HL, the copy in the sector buffer, not into the DCT at Register Pair DE: the drive's JP or RET and driver address are not put back (B176) (source: stuff vector (JP/RET)).
2A78
INC L 2C
Increment Register L (source: pt to default DCT+3).
2A79
INC L 2C
Increment Register L again, to DCT+2 of the default.
2A7A
INC L 2C
Increment Register L again: Register Pair HL at DCT+3 of the default.
2A7B
INC E 1C
Increment Register E (source: pt to resident DCT+3).
2A7C
INC E 1C
Increment Register E again, to DCT+2 of the drive.
2A7D
INC E 1C
Increment Register E again: Register Pair DE at DCT+3 of the drive.
2A7E
LD BC,0007H 01 07 00
Load Register Pair BC with 0007H, the bytes DCT+3 to DCT+9 (source: shift defaults to).
2A81
LDIR ED B0
Copy DCT+3 to DCT+9 of the default from Register Pair HL to the drive's DCT at Register Pair DE with LDIR (Register Pair BC = 0007H); both end at the next DCT (source: resident DCT).
2A83DVRC
LD A,(292CH) 3A 2C 29
DVRC: load Register A with the byte at 292CH, the low byte of DRIVE's word (source: test if drive entered).
2A86
INC A 3C
Increment Register A: NZ when DRIVE was given.
2A87
If DRIVE was given (NZ) jump to SYSPRM$ at 2A8EH, done (a 631 change: the jump goes through SYSPRM$).
2A89
LD A,E 7B
Load Register A with Register E, the low byte of the next DCT's address (source: ck on end of DCTs).
2A8A
CP 0C0H FE C0
Compare Register A with C0H, the byte after the eighth DCT.
2A8C
If it is C0H or more (No Carry) jump back to DVRA at 2A6EH; the test is the wrong way round, so after drive 0 (7AH, Carry) the loop ends: only drive 0 is reset (B177) (source: loop until all 8).
2A8ESYSPRM$
SYSPRM$: jump to SYSPRM at 2AF5H, past DVR4, since the DCT address has been popped already (a 631 change).
2A91DVR2
LD A,(HL) 7E
DVR2: load Register A with the byte at Register Pair HL, 2CFBH, the first character of the name (source: is first char ENTER?).
2A92
CP 0DH FE 0D
Compare Register A with 0DH, the end of the name.
2A94
If the name is empty, ENTER alone or DRIVER="" (Z), jump to DVR4 at 2AF4H with nothing done (source: bypass if default).
2A96
Call GOTMEM? at 2C0CH: the Carry flag when CFLAG$ bit 0 forbids a change of HIGH$.
2A99
POP DE D1
Pop Register Pair DE, the DCT's address; the flags stay (source: pop to keep stack).
2A9A
If HIGH$ may not change (Carry) jump to NOMEM at 2ADDH: No memory space available, return code FFFFH (source: straight if error).
2A9D
PUSH DE D5
Push Register Pair DE again, the DCT's address, for 2AB4H.
2A9E
LD DE,2CFAH 11 FA 2CLD DE,FCB1
Load Register Pair DE with 2CFAH, FCB1: the file spec is parsed from 2CFBH into the bytes from 2CFAH, each one written after it is read (source: else fetch spec).
2AA1
LD A,4EH 3E 4E
Load Register A with 4EH, SVC 78, @FSPEC, which parses the file spec at Register Pair HL into the FCB at Register Pair DE.
2AA3
RST 28H EF
Call @FSPEC with RST 28H (the SYS0/SYS stub that loads SYS1/SYS); its result is not tested, and @LOAD reports a bad spec.
2AA4
LD HL,24E9H 21 E9 24LD HL,DCTEXT
Load Register Pair HL with 24E9H, DCTEXT, the extension DCT (source: use /DCT as the).
2AA7
LD A,4FH 3E 4F
Load Register A with 4FH, SVC 79, @FEXT, which gives the FCB at Register Pair DE the extension at Register Pair HL if it has none.
2AA9
RST 28H EF
Call @FEXT with RST 28H (the SYS0/SYS stub that loads SYS1/SYS) (source: default extension).
2AAA
LD A,65H 3E 65
Load Register A with 65H, SVC 101, @FLAGS, which points Index Register IY at FLGTAB$.
2AAC
RST 28H EF
Call @FLAGS with RST 28H (SYS0/SYS): Index Register IY = 006AH again, after the DCTs.
2AAD
SET 2,(IY+12H) FD CB 12 D6
Set bit 2 of SFLAG$ (IY+12H, 007CH), Index Register IY holding 006AH, as @RUN does: a file of protection EXECUTE may be loaded (source: set RUN bit).
2AB1
LD A,4CH 3E 4C
Load Register A with 4CH, SVC 76, @LOAD, which loads the program file of the FCB at Register Pair DE (source: load the prog).
2AB3
RST 28H EF
Call @LOAD with RST 28H (SYS0/SYS): Register Pair HL = the transfer address of the driver program.
2AB4
POP DE D1
Pop Register Pair DE, the DCT's address, or 0000H; the flags of @LOAD stay (source: recover drive table).
2AB5
If @LOAD failed (NZ) jump to IOERR at 2AE9H; @LOAD returns Register A = the error number with bits 7 and 6 set (C0H plus n, error 24 made 31), so the return code becomes 00C0H plus n, 00DFH for Program not found (B180) (source: quit on load error).
2AB8
PUSH DE D5
Push Register Pair DE, the DCT's address, for DVR4.
2AB9
PUSH HL E5
Push Register Pair HL, the program's transfer address (source: save prog's traadr).
2ABA
LD HL,2AF4H 21 F4 2ALD HL,DVR4
Load Register Pair HL with 2AF4H, DVR4 (source: pt to our return).
2ABD
EX (SP),HL E3
Exchange Register Pair HL with the word at the Stack Pointer: DVR4 becomes the return address, Register Pair HL = the transfer address (source: exch with his).
2ABE
SET 3,(IY+02H) FD CB 02 DE
Set bit 3 of CFLAG$ (IY+02H, 006CH), Index Register IY holding 006AH: a system request, which a /DCT program tests to know that SYSTEM called it; CLEANUP clears it at @EXIT (source: set system request).
2AC2
JP (HL) E9
Jump to the address in Register Pair HL, the driver program, with Register Pair DE = the DCT's address; its RET goes to DVR4 (source: go to prog).
2AC3ABORT
LD HL,0FFFFH 21 FF FF
ABORT: load Register Pair HL with FFFFH, the return code after a message of SYSTEM's own or a BREAK (a 631 change).
2AC6LSAVESP
LD SP,0000H 31 00 00
LSAVESP: load the Stack Pointer with the word at 2AC7H-2AC8H, stored at 25E5H (0000H in the file): the depth of the entry (source: p/u original stack).
2AC9
LD A,6AH 3E 6A
Load Register A with 6AH, SVC 106, @CKBRKC, which clears a pending BREAK (source: clear any BREAK).
2ACB
RST 28H EF
Call @CKBRKC with RST 28H (BOOT/SYS); its result is not looked at.
2ACC
RET C9
Return through the tail of RST28 (1A77H) to @EXIT or to the caller of @CMNDR, with Register Pair HL = FFFFH or the error number (source: ret to DOS).
2ACDMANABT
LD HL,2CC4H 21 C4 2CLD HL,MANABT$
MANABT: load Register Pair HL with 2CC4H, MANABT$, Manual <BREAK> abort! (a 631 change).
2AD0
DEFB 0DDH DD
2AD0H: the DDH that makes the next LD HL,2C11H an LD IX,2C11H, so that Register Pair HL keeps MANABT$; Index Register IX is not used after.
2AD1JCLON
LD HL,2C11H 21 11 2CLD HL,JCLON$
JCLON: load Register Pair HL with 2C11H, JCLON$, Can't prompt for SYSTEM disk during JCL! (a 631 change).
2AD4
DEFB 0DDH DD
2AD4H: the DDH that makes the next LD HL,2CA3H an LD IX,2CA3H, so that the messages above keep Register Pair HL at theirs.
2AD5SPCERR
LD HL,2CA3H 21 A3 2CLD HL,SPCERR$
SPCERR: load Register Pair HL with 2CA3H, SPCERR$, Drive specification error <0-7>! (a 631 change).
2AD8
DEFB 0DDH DD
2AD8H: the DDH that makes the next LD HL,2C7AH an LD IX,2C7AH, so that the messages above keep Register Pair HL at theirs.
2AD9SAMDRV
LD HL,2C7AH 21 7A 2CLD HL,SAMDRV$
SAMDRV: load Register Pair HL with 2C7AH, SAMDRV$, Source & Destination are the same drive! (a 631 change).
2ADC
DEFB 0DDH DD
2ADCH: the DDH that makes the next LD HL,2403H an LD IX,2403H, so that the messages above keep Register Pair HL at theirs.
2ADDNOMEM
LD HL,2403H 21 03 24LD HL,NOMEM$
NOMEM: load Register Pair HL with 2403H, NOMEM$, No memory space available (source: No memory available).
2AE0
DEFB 0DDH DD
2AE0H: the DDH that makes the next LD HL,241DH an LD IX,241DH, so that the messages above keep Register Pair HL at theirs.
2AE1PRMERR
LD HL,241DH 21 1D 24LD HL,PRMERR$
PRMERR: load Register Pair HL with 241DH, PRMERR$, Parameter error.
2AE4SETERR
LD A,0CH 3E 0C
SETERR: load Register A with 0CH, SVC 12, @LOGOT, which shows the text at Register Pair HL and writes it to the job log.
2AE6
RST 28H EF
Call @LOGOT with RST 28H (BOOT/SYS) to show the message at Register Pair HL.
2AE7
Jump to ABORT at 2AC3H: every message ends SYSTEM with FFFFH, also when SETERR was called (source: exit).
2AE9IOERR
LD L,A 6F
IOERR: load Register L with Register A, the error number; after a failed @LOAD Register A already has bits 7 and 6 set, so Register L = C0H plus the number (B180) (source: error # to HL).
2AEA
LD H,00H 26 00
Load Register H with 00H: Register Pair HL = the command's return code, the error number for a disk error of GETCFG, PUTCFG or SYSP1, C0H plus the number after a failed @LOAD.
2AEC
OR 0C0H F6 C0
OR Register A with C0H: bit 7 asks @ERROR to return, bit 6 for the short message (source: set brief to return).
2AEE
LD C,A 4F
Load Register C with Register A, the error number with bits 7 and 6 set, for @ERROR.
2AEF
LD A,1AH 3E 1A
Load Register A with 1AH, SVC 26, @ERROR, which shows an error message.
2AF1
RST 28H EF
Call @ERROR with RST 28H (the SYS0/SYS stub that loads SYS4/SYS) to show the short message (source: display the error).
2AF2
Jump to LSAVESP at 2AC6H, which restores the Stack Pointer and returns with Register Pair HL = the error number, or 00C0H plus the number after @LOAD (source: exit).
2AF4DVR4
POP DE D1
DVR4: pop Register Pair DE, the DCT's address that DRIVE pushed, or 0000H, so that the stack is at the entry's depth again; for a DRIVE word FF00H-FF07H nothing was pushed and this pops RST28's return address (B181) (source: rcvr drive table).

2AF5H - Member 1 (SYSTEM): SYSTEM and SWAP

6.3.1 replaces SYSTEM=d with SWAP (a 631 change): SYSTEM=d stores d as SWAP's value and 0 as DRIVE's, so it is SWAP=d with DRIVE=0. SWAP=s with DRIVE=d exchanges the ten bytes of the two DCTs, so that each drive number reaches the other physical drive. When drive 0 is one of the two, the other drive must hold a system diskette first (L2BA3, SYSP1): a diskette whose GAT says system and whose directory sector 5 starts with a system file in use; otherwise SYSTEM prompts Insert SYSTEM diskette in drive n, n being the drive that is to become drive 0, and waits for ENTER, or refuses under JCL. A JCL file open on one of the drives has the drive number in its FCB changed with it (L2B81). Bit 7 of DCT+4 (skip the index test of @CKDRV) stays with the first of the two drive numbers. The end shows Drives :s and :d now swapped and returns 0000H.

2AF5SYSPRM
LD BC,0FFFFH 01 FF FF
SYSPRM: load Register Pair BC with the word of SYSTEM, this operand 2AF6H-2AF7H: FFFFH in the file, not given (source: p/u parm value).
2AF8
LD A,B 78
Load Register A with Register B, the high byte of SYSTEM's word.
2AF9
AND C A1
AND Register A with Register C: FFH only for FFFFH, SYSTEM not given or given alone (a 631 change).
2AFA
INC A 3C
Increment Register A: Z for a word of FFFFH, SYSTEM=d not given.
2AFB
If SYSTEM=d was not given (Z) jump to SWAP at 2B07H.
2AFD
LD (2B08H),BC ED 43 08 2BLD (SWAP$),BC
Store Register Pair BC, the drive of SYSTEM=d, into 2B08H-2B09H, SWAP$, the operand of the LD BC at SWAP: SYSTEM=d replaces any SWAP value.
2B01
LD HL,0000H 21 00 00
Load Register Pair HL with 0000H, drive 0, for DRIVE's word.
2B04
LD (292CH),HL 22 2C 29
Store Register Pair HL, 0000H, into 292CH-292DH, DRIVE's word: the other drive is drive 0, whatever DRIVE said.
2B07SWAP
LD BC,0FFFFH 01 FF FF
SWAP: load Register Pair BC with the word of SWAP, this operand 2B08H-2B09H (SWAP$): FFFFH in the file, not given.
2B0A
LD A,B 78
Load Register A with Register B, the high byte of SWAP's word.
2B0B
AND C A1
AND Register A with Register C: FFH only for FFFFH.
2B0C
INC A 3C
Increment Register A: Z for a word of FFFFH, SWAP not given.
2B0D
If neither SWAP nor SYSTEM was given (Z) jump to L2B7D at 2B7DH, the normal end.
2B0F
LD A,C 79
Load Register A with Register C, the drive to swap, s; the high byte is not looked at.
2B10
CP 08H FE 08
Compare Register A, the SWAP drive s, with 08H.
2B12
If the drive is 8 or more (No Carry) jump to SPCERR at 2AD5H: Drive specification error <0-7>!, return code FFFFH.
2B15
LD (2B48H),A 32 48 2BLD (L2B48),A
Store Register A into 2B48H, L2B48, the operand of the LD C at 2B47H: the first drive of the swap, for now s.
2B18
LD HL,2B58H 21 58 2BLD HL,L2B58
Load Register Pair HL with 2B58H, L2B58, the operand of the LD C at 2B57H, the second drive of the swap.
2B1B
OR A B7
OR Register A with itself to test s for drive 0.
2B1C
If s is drive 0 (Z) jump to L2B22 at 2B22H: the first drive stays 0 and the other goes into L2B58.
2B1E
LD (HL),A 77
Store Register A, s, into the byte at Register Pair HL, 2B58H: the second drive.
2B1F
LD HL,2B48H 21 48 2BLD HL,L2B48
Load Register Pair HL with 2B48H, L2B48: the drive of DRIVE becomes the first drive.
2B22L2B22
ADD A,30H C6 30
L2B22: add 30H to Register A, the digit of s.
2B24
LD (2C65H),A 32 65 2CLD (SRCDRV$),A
Store Register A into 2C65H, SRCDRV$, the S of the message Drives :S and :D now swapped.
2B27
LD A,(292CH) 3A 2C 29
Load Register A with the byte at 292CH, the low byte of DRIVE's word: the other drive, d, or FFH when DRIVE was not given.
2B2A
CP 08H FE 08
Compare Register A, the DRIVE drive d, with 08H.
2B2C
If there is no drive 0-7 (No Carry: SWAP without DRIVE) jump to SPCERR at 2AD5H: Drive specification error <0-7>!
2B2F
LD (HL),A 77
Store Register A, d, into the byte at Register Pair HL: L2B58 when s is 0, L2B48 otherwise; drive 0, when it is one of the two, is always the first.
2B30
ADD A,30H C6 30
Add 30H to Register A, the digit of d for the message.
2B32
LD (2C6CH),A 32 6C 2CLD (DSTDRV$),A
Store Register A into 2C6CH, DSTDRV$, the D of the message.
2B35
LD A,(HL) 7E
Load Register A with the byte at Register Pair HL, d.
2B36
XOR C A9
Exclusive OR Register A with Register C, s: Z when the two drives are the same.
2B37
If s and d are the same drive (Z) jump to SAMDRV at 2AD9H: Source & Destination are the same drive!, return code FFFFH.
2B3AL2B3A
LD A,(2B48H) 3A 48 2BLD A,(L2B48)
L2B3A: load Register A with the byte at 2B48H, the first drive.
2B3D
OR A B7
OR Register A with itself: Z when the first drive is 0, drive 0 is in the swap.
2B3E
LD A,(2B58H) 3A 58 2BLD A,(L2B58)
Load Register A with the byte at 2B58H, the second drive, the one that will be drive 0; the flags of the OR stay.
2B41
If drive 0 is in the swap (Z) call L2BA3 at 2BA3H, which returns only when the drive in Register A holds a system diskette.
2B44
Call L2B81 at 2B81H, which changes the drive of a JCL file open on one of the two drives.
2B47
LD C,00H 0E 00
Load Register C with the first drive, this operand 2B48H (L2B48), stored at 2B15H or 2B2FH.
2B49
LD A,51H 3E 51
Load Register A with 51H, SVC 81, @GTDCT, which points Index Register IY at the DCT of drive Register C.
2B4B
RST 28H EF
Call @GTDCT with RST 28H (SYS0/SYS): Index Register IY = the first drive's DCT.
2B4C
BIT 7,(IY+04H) FD CB 04 7E
Test bit 7 of DCT+4 (IY+04H), Index Register IY holding the first DCT: Z when @CKDRV tests the index pulses of that drive.
2B50
RES 7,(IY+04H) FD CB 04 BE
Reset bit 7 of DCT+4 (IY+04H) of the first DCT, Index Register IY holding its address; the Zero flag of the BIT stays.
2B54
PUSH AF F5
Push Register Pair AF, with the Zero flag of the test of the first DCT's bit 7.
2B55
PUSH IY FD E5
Push Index Register IY, the first DCT's address.
2B57
LD C,00H 0E 00
Load Register C with the second drive, this operand 2B58H (L2B58).
2B59
LD A,51H 3E 51
Load Register A with 51H, SVC 81, @GTDCT, for the second drive.
2B5B
RST 28H EF
Call @GTDCT with RST 28H (SYS0/SYS): Index Register IY = the second drive's DCT.
2B5C
POP HL E1
Pop Register Pair HL, the first DCT's address.
2B5D
POP AF F1
Pop Register Pair AF, with the Zero flag of the test of the first DCT's bit 7.
2B5E
RES 7,(IY+04H) FD CB 04 BE
Reset bit 7 of DCT+4 (IY+04H) of the second DCT, Index Register IY holding its address: the second drive's own bit is lost (B178).
2B62
If the first DCT's bit 7 was clear (Z) jump to L2B68 at 2B68H.
2B64
SET 7,(IY+04H) FD CB 04 FE
Set bit 7 of DCT+4 (IY+04H) of the second DCT, Index Register IY holding its address: the bit goes with the first drive number once the DCTs are exchanged.
2B68L2B68
PUSH IY FD E5
L2B68: push Index Register IY, the second DCT's address.
2B6A
POP DE D1
Pop it into Register Pair DE, the second DCT's address.
2B6B
LD BC,000AH 01 0A 00
Load Register Pair BC with 000AH, the ten bytes of a DCT.
2B6EL2B6E
LD A,(DE) 1A
L2B6E: load Register A with the byte at Register Pair DE, a byte of the second DCT.
2B6F
LDI ED A0
Copy the byte at Register Pair HL, the first DCT, to the byte at Register Pair DE with LDI: Register Pairs HL and DE step on, Register Pair BC counts down, the P/V flag clear at 0000H.
2B71
DEC HL 2B
Decrement Register Pair HL back to the byte just copied.
2B72
LD (HL),A 77
Store Register A, the second DCT's byte, into the byte at Register Pair HL, the first DCT.
2B73
INC HL 23
Increment Register Pair HL to the next byte of the first DCT.
2B74
While Register Pair BC is not 0000H (P/V set, Parity Even) jump back to L2B6E at 2B6EH: the ten bytes are exchanged.
2B77
LD HL,2C5DH 21 5D 2CLD HL,ARESWP$
Load Register Pair HL with 2C5DH, ARESWP$, Drives :s and :d now swapped.
2B7A
LD A,0AH 3E 0A
Load Register A with 0AH, SVC 10, @DSPLY, which shows the text at Register Pair HL up to its 0DH.
2B7C
RST 28H EF
Call @DSPLY with RST 28H (BOOT/SYS) to show the message; its result is not tested.
2B7DL2B7D
LD HL,0000H 21 00 00
L2B7D: load Register Pair HL with 0000H, the return code of a command that ended without an error.
2B80
RET C9
Return with the Stack Pointer at the depth of the entry, through the tail of RST28 (1A77H), to @EXIT or to the caller of @CMNDR; no @CKBRKC on this exit.
2B81L2B81
LD HL,007CH 21 7C 00LD HL,SFLAG$
L2B81: load Register Pair HL with 007CH, SFLAG$.
2B84
BIT 5,(HL) CB 6E
Test bit 5 of the byte at Register Pair HL, 007CH: set while a JCL file runs (DO).
2B86
RET Z C8
If no JCL file runs (Z) return to 2B47H with nothing changed.
2B87
LD HL,00C6H 21 C6 00
Load Register Pair HL with 00C6H, JFCB$+6, the drive number in the FCB of the JCL file.
2B8A
LD A,(2B48H) 3A 48 2BLD A,(L2B48)
Load Register A with the byte at 2B48H, the first drive.
2B8D
LD B,A 47
Load Register B with Register A, the first drive.
2B8E
XOR (HL) AE
Exclusive OR Register A with the byte at Register Pair HL, 00C6H, the JCL file's drive.
2B8F
AND 07H E6 07
AND Register A with 07H, the drive bits: Z when the JCL file is on the first drive (the source's comment says 731).
2B91
LD A,(2B58H) 3A 58 2BLD A,(L2B58)
Load Register A with the byte at 2B58H, the second drive; the flags of the AND stay.
2B94
If the JCL file is not on the first drive (NZ) jump to L2B9D at 2B9DH.
2B96
LD B,A 47
Load Register B with Register A, the second drive: the JCL file moves to it.
2B97L2B97
LD A,(HL) 7E
L2B97: load Register A with the byte at Register Pair HL, 00C6H.
2B98
AND 0F8H E6 F8
AND Register A with F8H to clear the drive bits.
2B9A
OR B B0
OR Register A with Register B, the new drive.
2B9B
LD (HL),A 77
Store Register A into the byte at Register Pair HL, 00C6H: the JCL file's FCB names the drive number that now reaches its diskette.
2B9C
RET C9
Return to 2B47H with the JCL file's drive changed.
2B9DL2B9D
XOR (HL) AE
L2B9D: exclusive OR Register A, the second drive, with the byte at Register Pair HL, 00C6H.
2B9E
AND 07H E6 07
AND Register A with 07H: Z when the JCL file is on the second drive.
2BA0
If it is (Z) jump to L2B97 at 2B97H with Register B = the first drive.
2BA2
RET C9
Return: the JCL file is on neither drive; other open files are not changed.
2BA3L2BA3
LD (2BACH),A 32 AC 2BLD (L2BAC),A
L2BA3: store Register A, the drive that will become drive 0, into 2BACH, L2BAC, the operand of the LD C at L2BAB (2BABH).
2BA6
ADD A,30H C6 30
Add 30H to Register A, the digit of the drive.
2BA8
LD (2C5AH),A 32 5A 2CLD (NDRIVE$),A
Store Register A into 2C5AH, NDRIVE$, the X of Insert SYSTEM diskette in drive X.
2BABL2BAB
LD C,00H 0E 00
L2BAB: load Register C with the drive, this operand 2BACH (L2BAC); ENTER at the prompt comes back here.
2BAD
LD A,21H 3E 21
Load Register A with 21H, SVC 33, @CKDRV, which tests whether drive Register C is ready (source: check on diskette in place).
2BAF
RST 28H EF
Call @CKDRV with RST 28H (the SYS0/SYS stub that loads SYS2/SYS): NZ when there is no diskette or no drive; a write protected one is accepted.
2BB0
If the drive is not ready (NZ) jump to SYSP2 at 2BD6H to prompt (source: prompt if no diskette).
2BB2
LD A,51H 3E 51
Load Register A with 51H, SVC 81, @GTDCT (source: get its DCT).
2BB4
RST 28H EF
Call @GTDCT with RST 28H (SYS0/SYS): Index Register IY = the drive's DCT.
2BB5SYSP1
LD D,(IY+09H) FD 56 09
SYSP1: load Register D with DCT+9 (IY+09H), Index Register IY holding the DCT's address: the directory cylinder (source: p/u the dir cyl).
2BB8
LD HL,1D00H 21 00 1DLD HL,SBUFF$
Load Register Pair HL with 1D00H, SBUFF$, for the GAT.
2BBB
LD E,L 5D
Load Register E with Register L, 00H: sector 0 of the directory cylinder, the GAT (source: init for GAT read).
2BBC
LD A,55H 3E 55
Load Register A with 55H, SVC 85, @RDSSC, which reads the directory sector Register D, Register E of drive Register C into the buffer at Register Pair HL (source: read the sector).
2BBE
RST 28H EF
Call @RDSSC with RST 28H (SYS0/SYS): the GAT in SBUFF$ (source: read the sector).
2BBF
If the read failed (NZ) jump to IOERR at 2AE9H with the error number in Register A (source: quit on read error).
2BC2
LD L,0CDH 2E CD
Load Register L with CDH: Register Pair HL = 1DCDH, GAT+CDH, the format byte (source: check the SYSTEM bit).
2BC4
BIT 7,(HL) CB 7E
Test bit 7 of the byte at Register Pair HL, 1DCDH: set for a data diskette.
2BC6
If it is a data diskette (NZ) jump to SYSP2 at 2BD6H to prompt (source: not system? go prompt).
2BC8
LD HL,1D00H 21 00 1DLD HL,SBUFF$
Load Register Pair HL with 1D00H, SBUFF$ (source: point to buffer).
2BCB
LD E,05H 1E 05
Load Register E with 05H, directory sector 5, whose first entry is SYS1/SYS on a system diskette (source: point to dir sec #5).
2BCD
LD A,55H 3E 55
Load Register A with 55H, SVC 85, @RDSSC (source: read the sector).
2BCF
RST 28H EF
Call @RDSSC with RST 28H (SYS0/SYS) for sector 5; its result is not tested. After a failed read @RDSSC has read the boot sector (cylinder 0, sector 1) into SBUFF$ and tried sector 5 again, so the test below sees the damaged sector after a CRC error, or the boot sector's 00H (B179) (source: read the sector).
2BD0
LD A,(HL) 7E
Load Register A with the byte at Register Pair HL, 1D00H, the attributes of the sector's first entry (source: p/u the byte).
2BD1
AND 50H E6 50
AND Register A with 50H, bits 6 (a system file) and 4 (in use) (source: check for a system file).
2BD3
CP 50H FE 50
Compare Register A with 50H (source: and not killed).
2BD5
RET Z C8
If both bits are set (Z) return to 2B44H: the drive holds a system diskette.
2BD6SYSP2
LD HL,007CH 21 7C 00LD HL,SFLAG$
SYSP2: load Register Pair HL with 007CH, SFLAG$.
2BD9
BIT 5,(HL) CB 6E
Test bit 5 of the byte at Register Pair HL, 007CH: set while a JCL file runs.
2BDB
If a JCL file runs (NZ) jump to JCLON at 2AD1H: Can't prompt for SYSTEM disk during JCL!, return code FFFFH; nothing has been swapped yet.
2BDE
LD HL,2C3AH 21 3A 2CLD HL,NDSYS$
Load Register Pair HL with 2C3AH, NDSYS$, Insert SYSTEM diskette in drive X, which runs on into NDRIVE$.
2BE1
LD A,0AH 3E 0A
Load Register A with 0AH, SVC 10, @DSPLY, which shows the text at Register Pair HL up to its 0DH.
2BE3
RST 28H EF
Call @DSPLY with RST 28H (BOOT/SYS) to show the prompt; its result is not tested.
2BE4
LD HL,2CFAH 21 FA 2CLD HL,FCB1
Load Register Pair HL with 2CFAH, FCB1, as the buffer for @KEYIN.
2BE7
LD BC,0000H 01 00 00
Load Register Pair BC with 0000H: Register B = 0 characters, so @KEYIN takes only ENTER or BREAK; Register C = 00H.
2BEA
LD A,09H 3E 09
Load Register A with 09H, SVC 9, @KEYIN, which reads a line of up to Register B characters into the buffer at Register Pair HL.
2BEC
RST 28H EF
Call @KEYIN with RST 28H (BOOT/SYS): the Carry flag for BREAK.
2BED
If ENTER was pressed (No Carry) jump back to L2BAB at 2BABH to test the drive again.
2BEF
Jump to MANABT at 2ACDH: Manual <BREAK> abort!, return code FFFFH, nothing swapped.

2BF2H - Member 1 (SYSTEM): the System Information Sector, HIGH$, and the Texts of 6.3.1

PUTCFG and GETCFG write and read sector 2 of cylinder 0 of drive 0, the system information sector, through SBUFF$ (1D00H); an error ends SYSTEM through IOERR. GETHI$ returns HIGH$, and GOTMEM? the Carry flag when CFLAG$ bit 0 forbids a program to move HIGH$. The texts that 6.3.1 added for SWAP and SYSTEM=d follow, then 32 bytes of patch space and FCB1.

2BF2PUTCFG
LD A,35H 3E 35
PUTCFG: load Register A with 35H, SVC 53, @WRSEC, which writes a sector (source: @WRSEC).
2BF4
DEFB 21H 21
2BF4H: the first byte of an LD HL,nnnn that takes GETCFG's LD A,31H (2BF5H-2BF6H) as its operand, so that PUTCFG keeps @WRSEC in Register A (source: ignore next with LD HL,).
2BF5GETCFG
LD A,31H 3E 31
GETCFG: load Register A with 31H, SVC 49, @RDSEC, which reads a sector (source: @RDSEC).
2BF7
LD DE,0002H 11 02 00
Load Register Pair DE with 0002H: Register D = cylinder 0, Register E = sector 2 (source: config sector).
2BFAPUTGETC
LD HL,1D00H 21 00 1DLD HL,SBUFF$
PUTGETC: load Register Pair HL with 1D00H, SBUFF$, the system's sector buffer (source: system buffer).
2BFD
LD C,L 4D
Load Register C with Register L, 00H: drive 0, whatever drive the command named (a 631 change, 6.3.0 had LD C,0).
2BFE
RST 28H EF
Call @RDSEC or @WRSEC with RST 28H (SYS0/SYS) for sector 2 of cylinder 0 of drive 0 at Register Pair HL (source: read or write).
2BFF
RET Z C8
If the read or write worked (Z) return (source: back if good i/o).
2C00PUTGETE
POP HL E1
PUTGETE: pop Register Pair HL, the caller's return address.
2C01
Jump to IOERR at 2AE9H with the error number in Register A, error 15 for a write protected diskette (source: else abort).
2C04GETHI$
LD B,00H 06 00
GETHI$: load Register B with 00H, @HIGH$ function 0, HIGH$ rather than LOW$ (source: init to get HIGH$).
2C06
LD H,B 60
Load Register H with Register B, 00H, the high byte of 0000H.
2C07
LD L,B 68
Load Register L with Register B: Register Pair HL = 0000H asks @HIGH$ for the value.
2C08
LD A,64H 3E 64
Load Register A with 64H, SVC 100, @HIGH$, which gets or sets HIGH$ or LOW$ (source: get current HIGH$).
2C0A
RST 28H EF
Call @HIGH$ with RST 28H (SYS0/SYS): Register Pair HL = HIGH$ (040EH), the Carry flag clear.
2C0B
RET C9
Return with HIGH$ in Register Pair HL to the caller.
2C0CGOTMEM?
LD A,(006CH) 3A 6C 00LD A,(CFLAG$)
GOTMEM?: load Register A with the byte at 006CH, CFLAG$ (source: check if memory can).
2C0F
RRCA 0F
Rotate Register A right: bit 0 of CFLAG$, set while HIGH$ may not be changed, goes into the Carry flag (source: be altered).
2C10
RET C9
Return with the Carry flag set when HIGH$ is frozen.
2C11-2C39JCLON$
DEFM "Can't prompt for SYSTEM disk during JCL!" / DEFB 0DH 43 61 6E 27 74 20 70 72 6F 6D 70 74 20 66 6F 72 20 53 59 53 54 45 4D 20 64 69 73 6B 20 64 75 72 69 6E 67 20 4A 43 4C 21 0D
JCLON$, 2C11H-2C39H: shown by JCLON (2AD1H) when the drive to become drive 0 holds no system diskette and a JCL file runs (a 631 text).
2C3A-2C59NDSYS$
DEFM "Insert SYSTEM diskette in drive " 49 6E 73 65 72 74 20 53 59 53 54 45 4D 20 64 69 73 6B 65 74 74 65 20 69 6E 20 64 72 69 76 65 20
NDSYS$, 2C3AH-2C59H: the prompt of SYSP2 (2BDEH), which runs on into NDRIVE$ (a 631 text).
2C5A-2C5CNDRIVE$
DEFM "X " / DEFB 0DH 58 20 0D
NDRIVE$, 2C5AH-2C5CH: the X becomes the drive's digit at 2BA8H, and the 0DH ends the prompt.
2C5D-2C64ARESWP$
DEFM "Drives :" 44 72 69 76 65 73 20 3A
ARESWP$, 2C5DH-2C64H: the start of the message shown at 2B77H after a swap (a 631 text).
2C65-2C6BSRCDRV$
DEFM "S and :" 53 20 61 6E 64 20 3A
SRCDRV$, 2C65H-2C6BH: the S becomes the digit of the SWAP drive at 2B24H.
2C6C-2C79DSTDRV$
DEFM "D now swapped" / DEFB 0DH 44 20 6E 6F 77 20 73 77 61 70 70 65 64 0D
DSTDRV$, 2C6CH-2C79H: the D becomes the digit of the DRIVE drive (0 for SYSTEM=d) at 2B32H.
2C7A-2CA2SAMDRV$
DEFM "Source & Destination are the same drive!" / DEFB 0DH 53 6F 75 72 63 65 20 26 20 44 65 73 74 69 6E 61 74 69 6F 6E 20 61 72 65 20 74 68 65 20 73 61 6D 65 20 64 72 69 76 65 21 0D
SAMDRV$, 2C7AH-2CA2H: shown by SAMDRV (2AD9H) when SWAP names the drive of DRIVE (a 631 text).
2CA3-2CC3SPCERR$
DEFM "Drive specification error <0-7>!" / DEFB 0DH 44 72 69 76 65 20 73 70 65 63 69 66 69 63 61 74 69 6F 6E 20 65 72 72 6F 72 20 3C 30 2D 37 3E 21 0D
SPCERR$, 2CA3H-2CC3H: shown by SPCERR (2AD5H) for a SWAP drive above 7 or SWAP without DRIVE (a 631 text).
2CC4-2CD9MANABT$
DEFM "Manual <BREAK> abort!" / DEFB 0DH 4D 61 6E 75 61 6C 20 3C 42 52 45 41 4B 3E 20 61 62 6F 72 74 21 0D
MANABT$, 2CC4H-2CD9H: shown by MANABT (2ACDH) for BREAK at the system diskette prompt (a 631 text).
2CDA-2CF9
DEFM "SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS" 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53
2CDAH-2CF9H: 32 bytes of patch space filled with the letter S (source: DC 32,'S', patch space (Roys special edition?)); nothing reads them.
2CFA-2D19FCB1
DEFB 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
FCB1, 2CFAH-2D19H: 32 bytes 00H, the last of the member: the FCB of the driver's file spec (2A9EH), whose name is put from 2CFBH on (2A29H, 2A52H), and the buffer of the system diskette prompt (2BE4H).

2400H - Member 2 (SYSGEN): Entry and Exits

SYS1/SYS runs SYSGEN with the library request 8AH and the member code 1CH in Register B; its header (file offset 0029H: record 0009H, byte 9CH) points at member 2, which the overlay loader reads to 2400H-263FH and 264FH-2829H and calls at 2400H with Register Pair HL at the text after the word SYSGEN. SYSGEN writes the present state of the system into CONFIG/SYS, which SYS0/SYS loads at every start-up, or with OFF switches that off and removes the file. 631 changes: the Stack Pointer is kept before BREAK is tested, and SFLAG$ is kept in the operand at 256DH and its bit 5 (a JCL file running) is cleared, so that SYSGEN works under DO and the configuration is saved without that bit; every exit and the end of the build put SFLAG$ back (L2568).

2400SYSGEN
LD (241BH),SP ED 73 1B 24
SYSGEN: SYSGEN's entry (member code 1CH): store the Stack Pointer into 241BH-241CH, the operand of the LD SP at SAVESP (241AH), so that every exit returns at the depth of the entry (631: before the BREAK test).
2404
PUSH HL E5
Save Register Pair HL, the command line after the word SYSGEN, on the stack (631 change).
2405
LD HL,007CH 21 7C 00LD HL,SFLAG$
Load Register Pair HL with 007CH, SFLAG$, the system flags (631 change).
2408
LD A,(HL) 7E
Load Register A with the byte at Register Pair HL, SFLAG$ as it is when SYSGEN starts (631 change).
2409
RES 5,(HL) CB AE
Reset bit 5 of SFLAG$ at Register Pair HL, JCL active, so that the copy saved in CONFIG/SYS does not say a DO file is running; 6.3.0 refused SYSGEN under DO by this bit (source: JCL is not active, even if it is).
240B
LD (256DH),A 32 6D 25LD (L256D),A
Store Register A, SFLAG$ as it was, into 256DH, the operand of the LD (HL) at L2568 (256CH), which puts it back (source: save original state).
240E
POP HL E1
Restore Register Pair HL, the command line, from the stack (631 change).
240F
LD A,6AH 3E 6A
Load Register A with 6AH, SVC 106, @CKBRKC, which tests for BREAK and clears it (source: Break key down?).
2411
RST 28H EF
Call @CKBRKC with RST 28H (BOOT/SYS): NZ when BREAK was pending.
2412
If BREAK was pending jump to ABORT at 244BH, which returns FFFFH through SAVESP (source: abort).
2414
Call SYSGEN1 at 2450H, which does the command; it returns here after SYSGEN (OFF) and the errors that go through IOERR do not (source: do the SYSGEN).
2417EXIT
LD HL,0000H 21 00 00
EXIT: load Register Pair HL with 0000H, the return code for no error (source: set for no error).
241ASAVESP
LD SP,0000H 31 00 00
SAVESP: load the Stack Pointer with the word at 241BH-241CH, the value stored at 2400H (0000H in the file); ABORT and IOERR jump here too (source: p/u original SP).
241D
Call L2568 at 2568H, which puts SFLAG$ back as it was at the entry, bit 5 included (631 change).
2420
LD A,6AH 3E 6A
Load Register A with 6AH, SVC 106, @CKBRKC, which clears a BREAK still pending (source: clear pending BREAK).
2422
RST 28H EF
Call @CKBRKC with RST 28H (BOOT/SYS); its result is not looked at, the exit goes on in every case.
2423
RET C9
Return through the tail of RST28 (1A77H) to @EXIT or to the caller of @CMNDR, with Register Pair HL = 0000H, FFFFH or the error number (source: back to DOS).
2424PRMERR
LD A,2CH 3E 2C
PRMERR: load Register A with 2CH, error 44, Parameter error (source: parameter error).
2426IOERR
LD L,A 6F
IOERR: load Register L with Register A, the error number (source: error # to HL).
2427
LD H,00H 26 00
Load Register H with 00H: Register Pair HL = the error number, the command's return code.
2429
OR 0C0H F6 C0
OR Register A with C0H: bit 7 asks @ERROR to return, bit 6 for the short message alone (source: abbrev, return).
242B
LD C,A 4F
Load Register C with Register A, the error number with bits 7 and 6 set, for @ERROR.
242C
LD A,1AH 3E 1A
Load Register A with 1AH, SVC 26, @ERROR, which shows an error message (source: display error).
242E
RST 28H EF
Call @ERROR with RST 28H (the SYS0/SYS stub that loads SYS4/SYS) to show the short error message.
242F
Jump to SAVESP at 241AH, which restores the Stack Pointer of the entry and returns with Register Pair HL = the error number (source: exit).

2431H - The Messages of SYSGEN's Own

Each entry loads Register Pair HL with its message; the DDH after it makes the next LD HL,nnnn an LD IX,nnnn, so the chain falls through to the @LOGOT at 2448H with Register Pair HL unchanged; then ABORT returns FFFFH. 631: ISWP (Specified drive is write protected) takes the place of 6.3.0's NOINDO (Command invalid during DO processing).

2431NOMDSK
LD HL,274DH 21 4D 27LD HL,NOMDSK$
NOMDSK: load Register Pair HL with 274DH, NOMDSK$, Can't while MEMDISK is active (source: Memdisk active).
2434
DEFB 0DDH DD
2434H: the DDH that makes the next LD HL,276BH an LD IX,276BH, so that NOMDSK keeps Register Pair HL at its own message; Index Register IX is changed and not used after.
2435NORTES
LD HL,276BH 21 6B 27LD HL,NORTES$
NORTES: load Register Pair HL with 276BH, NORTES$, Can't while route-to-file is active (source: file routes active).
2438
DEFB 0DDH DD
2438H: the DDH that makes the next LD HL,26A5H an LD IX,26A5H, so that the messages above keep Register Pair HL at theirs.
2439NOTFND
LD HL,26A5H 21 A5 26LD HL,NOTFND$
NOTFND: load Register Pair HL with 26A5H, NOTFND$, No user configuration found (source: no config found).
243C
DEFB 0DDH DD
243CH: the DDH that makes the next LD HL,2731H an LD IX,2731H, so that the messages above keep Register Pair HL at theirs.
243DNOSPL
LD HL,2731H 21 31 27LD HL,NOSPL$
NOSPL: load Register Pair HL with 2731H, NOSPL$, Can't while SPOOL is active (source: spooler active).
2440
DEFB 0DDH DD
2440H: the DDH that makes the next LD HL,26EAH an LD IX,26EAH, so that the messages above keep Register Pair HL at theirs.
2441ISWP
LD HL,26EAH 21 EA 26LD HL,ISWP$
ISWP: load Register Pair HL with 26EAH, ISWP$, Specified drive is write protected (631 change; source: drive is write protected).
2444
DEFB 0DDH DD
2444H: the DDH that makes the next LD HL,270DH an LD IX,270DH, so that the messages above keep Register Pair HL at theirs.
2445NOCANDO
LD HL,270DH 21 0D 27LD HL,NOCANDO$
NOCANDO: load Register Pair HL with 270DH, NOCANDO$, SYSGEN inhibited at this time between two pairs of stars (source: sysgen inhibit set).
2448
Call @LOGOT at 0500H directly, not through RST 28H, to show the message at Register Pair HL and send it to the JL device too.
244BABORT
LD HL,0FFFFH 21 FF FF
ABORT: load Register Pair HL with FFFFH, the return code after a message of SYSGEN's own or a BREAK at the entry (source: set abort code).
244E
Jump to SAVESP at 241AH, which restores the Stack Pointer, puts SFLAG$ back and returns with Register Pair HL = FFFFH (source: exit).

2450H - SYSGEN1: The Parameters and the Tests

@PARAM reads ON, YES or Y (stored where nothing reads them), OFF, NO or N, and DRIVE or D. The drive, 0 by default, must be below 8 and goes into the file spec of CONFIG/SYS and into the ATTRIB command at the end; @CKDRV refuses a write protected diskette (631), for OFF as well, but its NZ for a drive that is not ready is not tested. OFF goes to CFGOFF; for a build, SYSGEN refuses while the spooler (DFLAG$ bit 0) or MemDISK (DFLAG$ bit 4) is active, while CFLAG$ bit 5 (SYSGEN inhibited) is set, and while any device is routed to a file. Then @INIT opens CONFIG/SYS with the password CCC, or makes it.

2450SYSGEN1
LD DE,278FH 11 8F 27LD DE,PRMTBL$
SYSGEN1: load Register Pair DE with 278FH, PRMTBL$, the parameter table (source: check for user parameters).
2453
LD A,11H 3E 11
Load Register A with 11H, SVC 17, @PARAM, which reads the parameter list at Register Pair HL.
2455
RST 28H EF
Call @PARAM with RST 28H (the SYS0/SYS stub 1987H, code in SYS1/SYS at 21D7H): it stores each value at the address of its entry.
2456
If @PARAM returned NZ (an unknown word, a bad value, or any space inside the list, B165) jump to PRMERR at 2424H: Parameter error (source: quit on parm error).
2459
LD A,65H 3E 65
Load Register A with 65H, SVC 101, @FLAGS, which points Index Register IY to the flag table.
245B
RST 28H EF
Call @FLAGS with RST 28H (SYS0/SYS): Index Register IY = 006AH, FLGTAB$.
245CDRIVE
LD BC,0000H 01 00 00
DRIVE: load Register Pair BC with the value of DRIVE; the operand at 245DH-245EH (0000H in the file) is stored by @PARAM, and Register C is the drive (source: drive parm response).
245F
LD A,C 79
Load Register A with Register C, the low byte of DRIVE's value; Register B is not looked at, so DRIVE=256 means drive 0.
2460
CP 08H FE 08
Compare Register A with 08H, one more than the last drive (source: drive in range?).
2462
If Register A is 8 or more jump to PRMERR at 2424H: Parameter error (source: go if > 7).
2465
OR 30H F6 30
OR Register A with 30H, the digit 0: the drive as an ASCII digit (source: make it ASCII).
2467
LD (263EH),A 32 3E 26LD (CFGSPEC),A
Store Register A, the digit, into 263EH, CFGSPEC, the drive of CONFIG/SYS.CCC:0 in GENDCB (source: stuff drive spec).
246A
LD (2684H),A 32 84 26LD (ATRSPEC),A
Store Register A, the digit, into 2684H, ATRSPEC, the d of the ATTRIB command at 266EH.
246D
LD A,21H 3E 21
Load Register A with 21H, SVC 33, @CKDRV, which tests the drive in Register C (631 change).
246F
RST 28H EF
Call @CKDRV with RST 28H (the SYS0/SYS stub that loads SYS2/SYS) for drive Register C: the Carry flag for a write protected diskette, NZ for a drive that is not ready (not tested here).
2470
If @CKDRV returned the Carry flag jump to ISWP at 2441H: Specified drive is write protected, FFFFH (631 change).
2473
Call NPARM at 25FFH, which returns Z when OFF, NO or N was given (source: ck on yes or no entry).
2476
If Register A is 00H (OFF) jump to CFGOFF at 25CCH, which switches the configuration off and removes CONFIG/SYS (source: jump if SYSGEN=OFF).
2479
BIT 0,(IY+03H) FD CB 03 46
Test bit 0 of DFLAG$, (IY+03H, 006DH) with Index Register IY holding 006AH: the spooler is active (source: can't sysgen if spooler is active).
247D
If the spooler is active (NZ) jump to NOSPL at 243DH: Can't while SPOOL is active, FFFFH.
2480
BIT 4,(IY+03H) FD CB 03 66
Test bit 4 of DFLAG$, (IY+03H, 006DH) with Index Register IY holding 006AH: MemDISK is active (source: can't sysgen if memdisk is active).
2484
If MemDISK is active (NZ) jump to NOMDSK at 2431H: Can't while MEMDISK is active, FFFFH.
2487
BIT 5,(IY+02H) FD CB 02 6E
Test bit 5 of CFLAG$, (IY+02H, 006CH) with Index Register IY holding 006AH, which a program sets to forbid SYSGEN (source: ck user sysgen inhibit).
248B
If the bit is set (NZ) jump to NOCANDO at 2445H: the SYSGEN inhibited at this time message, FFFFH (source: quit if set).
248E
Call CKRTES at 2609H, which returns NZ when a device is routed to a file (source: ck if any route to file).
2491
If a device is routed to a file (NZ) jump to NORTES at 2435H: Can't while route-to-file is active, FFFFH (source: can't if so).
2494
LD DE,262FH 11 2F 26LD DE,GENDCB
Load Register Pair DE with 262FH, GENDCB, the FCB that holds CONFIG/SYS.CCC:d (source: CONFIG/SYS.CCC).
2497
LD HL,2900H 21 00 29LD HL,GENBUF
Load Register Pair HL with 2900H, GENBUF, the file's sector buffer after the member (source: config I/O buffer).
249A
LD B,00H 06 00
Load Register B with 00H: a logical record length of 256 (source: set LRL=256).
249C
LD A,3AH 3E 3A
Load Register A with 3AH, SVC 58, @INIT, which opens a file or makes it if it does not exist (source: create config file).
249E
RST 28H EF
Call @INIT with RST 28H (the SYS0/SYS stub that loads SYS2/SYS) for CONFIG/SYS with the password CCC on drive d.
249F
If @INIT returned NZ jump to IOERR at 2426H with Register A = its error number (source: quit on init error).

24A2H - Write the Configuration as a Load Module

CONFIG/SYS is a load module for @LOAD: a name record CONFIG; a block that puts C9H (RET) at 0038H, so that an interrupt while the file loads does no harm and leaves the interrupts off; the low memory driver zone from DVREND$ (0FF4H) to the byte below DVRHI$; high memory from HIGH$+1 to PHIGH$; the system areas listed in ADRTBL$; the 80 bytes of DCT$ to load at 4300H, which SYS0's STUB copies into DCT$; a block that puts C3H (JP) back at 0038H; and the transfer address 0000H. Each byte goes out by @PUT (PUTOUT), and an error of @PUT ends SYSGEN through IOERR.

24A2
LD A,05H 3E 05
Load Register A with 05H, the type of a module name record (source: put file header).
24A4
Call PUTOUT at 2627H, which writes the byte in Register A to the file.
24A7
LD A,06H 3E 06
Load Register A with 06H, the length of the record: the six characters of the name (source: put header length).
24A9
Call PUTOUT at 2627H to write the length in Register A.
24AC
LD B,06H 06 06
Load Register B with 06H, the characters of the name to write (source: put header name).
24AE
LD HL,264FH 21 4F 26LD HL,CFGNAM$
Load Register Pair HL with 264FH, CFGNAM$, the name CONFIG (source: CONFIG).
24B1WRNAM
LD A,(HL) 7E
WRNAM: load Register A with the byte at Register Pair HL, the next character of the name (source: write name to config file header).
24B2
INC HL 23
Increment Register Pair HL to the next character of CFGNAM$.
24B3
Call PUTOUT at 2627H to write the character in Register A.
24B6
Decrement Register B and jump back to WRNAM at 24B1H until the six characters are written.
24B8
LD B,01H 06 01
Load Register B with 01H, the bytes in the next block (source: set block length).
24BA
LD DE,0038H 11 38 00LD DE,@RST38
Load Register Pair DE with 0038H, @RST38, the load address of the block: the interrupt vector (source: set load address).
24BD
LD HL,25A8H 21 A8 25LD HL,C9FLD
Load Register Pair HL with 25A8H, C9FLD, the RET of DUMP used as the byte C9H (source: point to block X'C9').
24C0
Call WRBLCK at 25AAH, which writes a block of Register B bytes from Register Pair HL to load at Register Pair DE (source: write the block).
24C3
LD HL,(0206H) 2A 06 02LD HL,(DVRHI$)
Load Register Pair HL with the word at 0206H, DVRHI$, the next free byte of the low memory driver zone (source: point to max memory).
24C6
LD DE,0FF4H 11 F4 0FLD DE,DVREND$
Load Register Pair DE with 0FF4H, DVREND$, the first byte of the driver zone after the resident drivers (source: point to start).
24C9
XOR A AF
Clear Register A and the Carry flag for the SBC.
24CA
SBC HL,DE ED 52
Subtract Register Pair DE from Register Pair HL: the bytes of the drivers added to the zone, 0000H when there are none (source: how much to save).
24CC
LD B,H 44
Load Register B with Register H, the high byte of the count, into Register Pair BC (source: into BC).
24CD
LD C,L 4D
Load Register C with Register L: Register Pair BC = the count of bytes from 0FF4H.
24CE
If the count is not 0000H (NZ) call DUMP at 2570H, which writes Register Pair BC bytes from Register Pair DE, 0FF4H, as load blocks (source: file DVREND$ to top).
24D1
LD DE,(001CH) ED 5B 1C 00LD DE,(PHIGH$)
Load Register Pair DE with the word at 001CH, PHIGH$, the physical top of memory (source: point to max memory).
24D5
LD HL,0000H 21 00 00
Load Register Pair HL with 0000H, which asks @HIGH$ to return HIGH$ (source: set up to get current HIGH$).
24D8
LD B,L 45
Load Register B with Register L, 00H: @HIGH$ function 0, HIGH$ rather than LOW$.
24D9
LD A,64H 3E 64
Load Register A with 64H, SVC 100, @HIGH$, which gets or sets HIGH$ or LOW$.
24DB
RST 28H EF
Call @HIGH$ with RST 28H (SYS0/SYS): Register Pair HL = HIGH$, the last byte free below the modules in high memory.
24DC
EX DE,HL EB
Exchange Register Pairs DE and HL: Register Pair DE = HIGH$, Register Pair HL = PHIGH$ (source: HIGH$ to DE).
24DD
XOR A AF
Clear Register A and the Carry flag for the SBC (source: PHIGH to HL).
24DE
SBC HL,DE ED 52
Subtract Register Pair DE from Register Pair HL: PHIGH$ less HIGH$, the bytes of the modules above HIGH$ (source: how much to save?).
24E0
LD B,H 44
Load Register B with Register H, the high byte of the count, into Register Pair BC.
24E1
LD C,L 4D
Load Register C with Register L: Register Pair BC = the count of bytes above HIGH$.
24E2
INC DE 13
Increment Register Pair DE to HIGH$+1, the first byte in use (source: first byte in use).
24E3
If the count is not 0000H (NZ) call DUMP at 2570H, which writes the bytes from HIGH$+1 to PHIGH$ as load blocks (source: file HIGH$+1 to top).
24E6
LD HL,27B4H 21 B4 27LD HL,ADRTBL$
Load Register Pair HL with 27B4H, ADRTBL$, the table of system areas to save: words of length and address (source: point to grab table).
24E9WRTBL
LD C,(HL) 4E
WRTBL: load Register C with the byte at Register Pair HL, the low byte of the length (source: p/u lo order length).
24EA
INC HL 23
Increment Register Pair HL to the high byte of the length.
24EB
LD B,(HL) 46
Load Register B with the byte at Register Pair HL, the high byte: Register Pair BC = the length (source: p/u hi order length).
24EC
INC HL 23
Increment Register Pair HL to the address of the entry.
24ED
LD A,B 78
Load Register A with Register B, the high byte of the length, to test it for zero.
24EE
OR C B1
OR Register A with Register C, the low byte: Z for a length of 0000H, the end of the entries in use.
24EF
If the length is 0000H jump to GENDCT at 24FCH: the first DW 0,0 (27F4H) ends the table (source: exit on zero length).
24F1
LD E,(HL) 5E
Load Register E with the byte at Register Pair HL, the low byte of the address (source: p/u lo order address).
24F2
INC HL 23
Increment Register Pair HL to the high byte of the address.
24F3
LD D,(HL) 56
Load Register D with the byte at Register Pair HL: Register Pair DE = the address of the area (source: p/u hi order address).
24F4
INC HL 23
Increment Register Pair HL to the next entry of ADRTBL$.
24F5
PUSH HL E5
Save Register Pair HL, the place in the table, on the stack (source: save table pointer).
24F6
Call DUMP at 2570H, which writes Register Pair BC bytes from Register Pair DE as load blocks to load there (source: p/u the code & file it).
24F9
POP HL E1
Restore Register Pair HL, the place in the table, from the stack (source: restore table pointer).
24FA
Jump back to WRTBL at 24E9H for the next entry.
24FCGENDCT
LD B,50H 06 50
GENDCT: load Register B with 50H (80), the bytes of DCT$, ten for each of eight drives (source: table is 80 bytes).
24FE
LD DE,4300H 11 00 43LD DE,MOD3BUF
Load Register Pair DE with 4300H, MOD3BUF, where the block loads: STUB (run at 4350H) copies it into DCT$ (source: place to stuff DCT$).
2501
LD C,00H 0E 00
Load Register C with 00H, drive 0, the first DCT of DCT$.
2503
LD A,51H 3E 51
Load Register A with 51H, SVC 81, @GTDCT, which points Index Register IY to the DCT of drive Register C (source: write out the DCTs).
2505
RST 28H EF
Call @GTDCT with RST 28H (SYS0/SYS): Index Register IY = 0470H, DCT$.
2506
PUSH IY FD E5
Save Index Register IY, 0470H, on the stack (source: handled by SYS0).
2508
POP HL E1
Pull it into Register Pair HL: Register Pair HL = 0470H, where the bytes are read.
2509
Call WRBLCK at 25AAH, which writes the 80 bytes from 0470H as a block that loads at 4300H.
250CINTVEC
LD B,01H 06 01
INTVEC: load Register B with 01H, the bytes in the last block (source: file the interrupt vector address).
250E
LD DE,0038H 11 38 00LD DE,@RST38
Load Register Pair DE with 0038H, @RST38, where the block loads (source: vector address).
2511
LD HL,25A9H 21 A9 25LD HL,JPINST
Load Register Pair HL with 25A9H, JPINST, the byte C3H, a JP: 0038H gets its JP back; its address at 0039H-003AH is not in the file and keeps the 1BFFH that SYS0/SYS loads (source: with a JP).
2514
Call WRBLCK at 25AAH to write the block of one byte for 0038H (source: write the block).
2517
LD A,02H 3E 02
Load Register A with 02H, the type of the transfer record (source: transfer address).
2519
Call PUTOUT at 2627H to write the type in Register A.
251C
LD A,02H 3E 02
Load Register A with 02H, the length of the transfer record, two bytes.
251E
Call PUTOUT at 2627H to write the length in Register A.
2521
XOR A AF
Clear Register A, the low byte of the transfer address 0000H (source: xfer address is 0000).
2522
Call PUTOUT at 2627H to write the low byte in Register A.
2525
XOR A AF
Clear Register A, the high byte of the transfer address 0000H.
2526
Call PUTOUT at 2627H to write the high byte in Register A.
2529
LD A,3CH 3E 3C
Load Register A with 3CH, SVC 60, @CLOSE, which closes the file of the FCB at Register Pair DE, GENDCB (source: close config file).
252B
RST 28H EF
Call @CLOSE with RST 28H (the SYS0/SYS stub that loads SYS3/SYS) for CONFIG/SYS.
252C
If @CLOSE returned NZ jump to IOERR at 2426H with Register A = its error number (source: quit on close error).
252F
LD HL,1D00H 21 00 1DLD HL,SBUFF$
Load Register Pair HL with 1D00H, SBUFF$, the system sector buffer, for sector 2 (source: use this as disk buffer).
2532
LD DE,0002H 11 02 00
Load Register Pair DE with 0002H: Register D = cylinder 0, Register E = sector 2, the system information sector (source: trk 0, sect 2 SIS).
2535
LD A,(245DH) 3A 5D 24
Load Register A with the byte at 245DH, the low byte of DRIVE's value, the drive (source: p/u logical drive #).
2538
LD C,A 4F
Load Register C with Register A, the drive, for @RDSEC.
2539
LD A,31H 3E 31
Load Register A with 31H, SVC 49, @RDSEC, which reads a sector (source: read system info sector).
253B
RST 28H EF
Call @RDSEC with RST 28H (SYS0/SYS): sector 2 of cylinder 0 of drive Register C into 1D00H-1DFFH.
253C
If @RDSEC returned NZ jump to IOERR at 2426H with Register A = its error number (source: quit on read error).
253F
XOR A AF
Clear Register A: 00H, the mark that a configuration is to be loaded (source: turn on standard config).
2540
LD (1D01H),A 32 01 1D
Store Register A, 00H, into 1D01H, offset 01H of the sector, which BOOT/SYS loads to 0401H, ZERO$, the byte SYS0's start-up tests.
2543
LD A,35H 3E 35
Load Register A with 35H, SVC 53, @WRSEC, which writes the sector back from Register Pair HL, 1D00H (source: write it back).
2545
RST 28H EF
Call @WRSEC with RST 28H (SYS0/SYS) to write sector 2 of drive Register C.
2546
If @WRSEC returned NZ jump to IOERR at 2426H with Register A = its error number (source: quit on write error).
2549
LD L,0C0H 2E C0
Load Register L with C0H: Register Pair HL = 1DC0H, offset C0H of the sector, which loads to 04C0H, DSKTYP$ (source: pt to SYS/DATA byte).
254B
OR (HL) B6
OR Register A, 00H after the write, with the byte at Register Pair HL: NZ for a system diskette (source: check if system disk).
254C
LD HL,26C1H 21 C1 26LD HL,WARN$
Load Register Pair HL with 26C1H, WARN$, Warning: Target drive contains no system; the LD leaves the flags of the OR.
254F
If the byte is not 00H (a system diskette) jump to 2554H and show no warning (source: and inform if not).
2551
LD A,0CH 3E 0C
Load Register A with 0CH, SVC 12, @LOGOT, which shows the text at Register Pair HL and sends it to the JL device too.
2553
RST 28H EF
Call @LOGOT with RST 28H (BOOT/SYS) to show the warning at 26C1H.
2554
LD HL,2655H 21 55 26LD HL,CFGBLT
Load Register Pair HL with 2655H, CFGBLT, User configuration built.
2557
LD A,0CH 3E 0C
Load Register A with 0CH, SVC 12, @LOGOT, to show the text at Register Pair HL.
2559
RST 28H EF
Call @LOGOT with RST 28H (BOOT/SYS) to show User configuration built (source: log completion).
255A
Call L2568 at 2568H, which puts SFLAG$ back as it was at the entry, a running JCL file included (631 change).
255D
LD HL,266EH 21 6E 26LD HL,ATRBIT
Load Register Pair HL with 266EH, ATRBIT, the command Attrib CONFIG/SYS.CCC:d (I) (source: make CONFIG invisible).
2560
LD A,18H 3E 18
Load Register A with 18H, SVC 24, @CMNDI, which runs a command line and goes on to @EXIT (source: init for CMNDI).
2562
Jump to 0028H, RST 28H, with Register A = 18H: @CMNDI runs ATTRIB to make CONFIG/SYS invisible and never returns: its CLEANUP drops the stack, and LS-DOS Ready or the next DO line follows, even under @CMNDR (B169) (source: & execute).
2565
LD A,18H 3E 18
Load Register A with 18H, SVC 24, @CMNDI; this row and the next are never run, the JP at 2562H going first.
2567
RST 28H EF
RST 28H, @CMNDI, never run: the @@CMNDI macro that the source leaves after its JP RST28.

2568H - L2568: SFLAG$ Put Back

A 631 routine: the operand at 256DH holds SFLAG$ as it was at the entry (stored at 240BH), and the LD (HL) puts it back, with bit 5 set again when a DO file was running. Register Pair HL and the flags are kept.

2568L2568
PUSH HL E5
L2568: save Register Pair HL on the stack (631 change; source: restore previous SFLAG$).
2569
LD HL,007CH 21 7C 00LD HL,SFLAG$
Load Register Pair HL with 007CH, SFLAG$, the system flags (631 change).
256C
LD (HL),00H 36 00
Store the operand at 256DH (00H in the file; SFLAG$ as it was, stored at 240BH) into SFLAG$ at Register Pair HL (source: turning JCL back on if it was on before).
256E
POP HL E1
Restore Register Pair HL from the stack (631 change).
256F
RET C9
Return to the caller with SFLAG$ as it was at the entry (631 change).

2570H - DUMP and WRBLCK: Memory into Load Blocks

DUMP writes Register Pair BC bytes from Register Pair DE as load blocks that load where the bytes are, 254 bytes a block and the rest in the last. WRBLCK writes one block of Register B bytes (1 to 254) taken from Register Pair HL that loads at Register Pair DE, which may be another address (the DCTs at 4300H). Each block is 01H, the record length (Register B plus 2, 00H for 254), the load address and the bytes.

2570DUMP
EX DE,HL EB
DUMP: exchange Register Pairs DE and HL: Register Pair HL = the address of the bytes (source: load address to HL).
2571
LD DE,262FH 11 2F 26LD DE,GENDCB
Load Register Pair DE with 262FH, GENDCB, the FCB of CONFIG/SYS for PUTOUT (source: config/sys FCB).
2574DUMP1
PUSH HL E5
DUMP1: save Register Pair HL, the address of the next block, on the stack.
2575
PUSH BC C5
Save Register Pair BC, the bytes left to write, on the stack (source: save block length).
2576
LD H,B 60
Load Register H with Register B, the high byte of the bytes left (source: length of this block).
2577
LD L,C 69
Load Register L with Register C: Register Pair HL = the bytes left (source: to HL).
2578
LD BC,00FEH 01 FE 00
Load Register Pair BC with 00FEH (254), the most bytes a block takes (source: write block in groups).
257B
XOR A AF
Clear Register A and the Carry flag for the SBC (source: of 254 bytes max).
257C
SBC HL,BC ED 42
Subtract Register Pair BC, 254, from Register Pair HL, the bytes left (source: sub blk len fm dump len).
257E
If 254 or more were left (No Carry) jump to DUMP2 at 2586H: a full block of 254, Register Pair HL the bytes left after it (source: go if write len > 254).
2580
POP BC C1
Restore Register Pair BC from the stack: the bytes left, fewer than 254, all in this block (source: recover block len).
2581
LD HL,0000H 21 00 00
Load Register Pair HL with 0000H, the bytes left after this last block (source: show block written).
2584
Jump to DUMP3 at 2587H with Register Pair HL = 0000H and Register Pair BC = the last block's bytes.
2586DUMP2
POP AF F1
DUMP2: pull the saved count into Register Pair AF and drop it; Register Pair BC stays 00FEH (source: remove old len from stack).
2587DUMP3
EX (SP),HL E3
DUMP3: exchange Register Pair HL with the word on the stack, at the Stack Pointer: the stack keeps the bytes left after the block, Register Pair HL = the block's address (source: xchg len w/address).
2588
LD B,C 41
Load Register B with Register C, the bytes of this block, 1 to 254.
2589
LD A,01H 3E 01
Load Register A with 01H, the type of a load block (source: start of block).
258B
Call PUTOUT at 2627H to write the type in Register A.
258E
LD A,B 78
Load Register A with Register B, the bytes of the block.
258F
ADD A,02H C6 02
Add 02H to Register A for the two bytes of the address: the record length, 00H for a block of 254 (source: add for address).
2591
Call PUTOUT at 2627H to write the length in Register A (source: write block length).
2594
LD A,L 7D
Load Register A with Register L, the low byte of the load address.
2595
Call PUTOUT at 2627H to write the low byte in Register A (source: write lo order address).
2598
LD A,H 7C
Load Register A with Register H, the high byte of the load address.
2599
Call PUTOUT at 2627H to write the high byte in Register A (source: write hi order address).
259CDUMP4
LD A,(HL) 7E
DUMP4: load Register A with the byte at Register Pair HL, the next byte of memory.
259D
INC HL 23
Increment Register Pair HL to the next byte of memory.
259E
Call PUTOUT at 2627H to write the byte in Register A (source: write the block).
25A1
Decrement Register B and jump back to DUMP4 at 259CH until the block's bytes are written.
25A3
POP BC C1
Restore Register Pair BC from the stack: the bytes left after this block (source: get remaining length).
25A4
LD A,B 78
Load Register A with Register B, the high byte of the bytes left.
25A5
OR C B1
OR Register A with Register C, the low byte: Z when none are left.
25A6
If bytes are left jump back to DUMP1 at 2574H, with Register Pair HL at the next byte (source: loop if block not done).
25A8C9FLD
RET C9
C9FLD: return to DUMP's caller; this C9H is also the byte that the first block puts at 0038H (24BDH) (source: else go back).
25A9JPINST
DEFB 0C3H C3
JPINST, 25A9H: C3H, the JP that the last block puts back at 0038H (2511H) (source: JP instruction).
25AAWRBLCK
PUSH HL E5
WRBLCK: save Register Pair HL, where the bytes are read, on the stack (source: save real load address).
25AB
LD H,D 62
Load Register H with Register D, the high byte of the load address (source: HL = offset address).
25AC
LD L,E 6B
Load Register L with Register E: Register Pair HL = the load address of the block.
25AD
LD DE,262FH 11 2F 26LD DE,GENDCB
Load Register Pair DE with 262FH, GENDCB, the FCB of CONFIG/SYS for PUTOUT (source: config/sys FCB).
25B0
LD A,01H 3E 01
Load Register A with 01H, the type of a load block (source: start of block).
25B2
Call PUTOUT at 2627H to write the type in Register A.
25B5
LD A,B 78
Load Register A with Register B, the bytes of the block.
25B6
ADD A,02H C6 02
Add 02H to Register A for the two bytes of the address: the record length (source: adj for address).
25B8
Call PUTOUT at 2627H to write the length in Register A (source: write block length).
25BB
LD A,L 7D
Load Register A with Register L, the low byte of the load address.
25BC
Call PUTOUT at 2627H to write the low byte in Register A (source: write lo order load).
25BF
LD A,H 7C
Load Register A with Register H, the high byte of the load address.
25C0
Call PUTOUT at 2627H to write the high byte in Register A (source: write hi order load).
25C3
POP HL E1
Restore Register Pair HL from the stack: where the bytes are read (source: recover real address).
25C4WRBLK1
LD A,(HL) 7E
WRBLK1: load Register A with the byte at Register Pair HL, the next byte of the block (source: and p/u data from there).
25C5
INC HL 23
Increment Register Pair HL to the next byte to write.
25C6
Call PUTOUT at 2627H to write the byte in Register A (source: write the block).
25C9
Decrement Register B and jump back to WRBLK1 at 25C4H until the block's bytes are written.
25CB
RET C9
Return to WRBLCK's caller with the block written.

25CCH - CFGOFF: SYSGEN (OFF)

Writes C9H into offset 01H of sector 2 of cylinder 0 (ZERO$ once loaded), which tells SYS0's start-up not to load a configuration, then opens CONFIG/SYS with the password CCC and removes it. Any @OPEN error is taken for a missing file (No user configuration found, FFFFH); the switch has already been written then. The configuration in memory is not changed.

25CCCFGOFF
LD HL,1D00H 21 00 1DLD HL,SBUFF$
CFGOFF: load Register Pair HL with 1D00H, SBUFF$, the system sector buffer (source: set disk I/O buffer).
25CF
LD DE,0002H 11 02 00
Load Register Pair DE with 0002H: Register D = cylinder 0, Register E = sector 2, the system information sector (source: trk 0, sect 2 SIS).
25D2
LD A,(245DH) 3A 5D 24
Load Register A with the byte at 245DH, the low byte of DRIVE's value, the drive (source: p/u drive number).
25D5
LD C,A 4F
Load Register C with Register A, the drive, for @RDSEC.
25D6
LD A,31H 3E 31
Load Register A with 31H, SVC 49, @RDSEC, which reads a sector.
25D8
RST 28H EF
Call @RDSEC with RST 28H (SYS0/SYS): sector 2 of cylinder 0 of drive Register C into 1D00H-1DFFH.
25D9
If @RDSEC returned NZ jump to IOERR at 2426H with Register A = its error number (source: on the disk).
25DC
LD A,0C9H 3E C9
Load Register A with C9H, the mark that no configuration is to be loaded.
25DE
LD (1D01H),A 32 01 1D
Store Register A, C9H, into 1D01H, offset 01H of the sector, ZERO$ once BOOT/SYS loads it at 0401H (source: a X'C9' indicates).
25E1
LD A,35H 3E 35
Load Register A with 35H, SVC 53, @WRSEC, which writes the sector back from Register Pair HL, 1D00H (source: no config).
25E3
RST 28H EF
Call @WRSEC with RST 28H (SYS0/SYS) to write sector 2 of drive Register C.
25E4
If @WRSEC returned NZ jump to IOERR at 2426H with Register A = its error number (source: quit if write error).
25E7
LD DE,262FH 11 2F 26LD DE,GENDCB
Load Register Pair DE with 262FH, GENDCB, the FCB that holds CONFIG/SYS.CCC:d (source: pt to FCB).
25EA
LD B,00H 06 00
Load Register B with 00H: a logical record length of 256.
25EC
LD A,3BH 3E 3B
Load Register A with 3BH, SVC 59, @OPEN, which opens an existing file (source: try to open the config).
25EE
RST 28H EF
Call @OPEN with RST 28H (the SYS0/SYS stub that loads SYS2/SYS) for CONFIG/SYS with the password CCC on drive d.
25EF
If @OPEN returned NZ, for any error, jump to NOTFND at 2439H: No user configuration found, FFFFH (source: jump if not there).
25F2
LD A,39H 3E 39
Load Register A with 39H, SVC 57, @REMOVE, which removes the open file of the FCB at Register Pair DE (source: kill the config/sys).
25F4
RST 28H EF
Call @REMOVE with RST 28H (the SYS0/SYS stub that loads SYS10/SYS) for CONFIG/SYS.
25F5
If @REMOVE returned NZ jump to IOERR at 2426H with Register A = its error number (source: quit if can't be killed).
25F8
LD HL,268AH 21 8A 26LD HL,CFGDEL$
Load Register Pair HL with 268AH, CFGDEL$, User configuration deleted.
25FB
LD A,0CH 3E 0C
Load Register A with 0CH, SVC 12, @LOGOT, which shows the text at Register Pair HL and sends it to the JL device too.
25FD
RST 28H EF
Call @LOGOT with RST 28H (BOOT/SYS) to show User configuration deleted.
25FE
RET C9
Return to 2417H, the exit with 0000H (source: done - return).

25FFH - NPARM, YPARM and CKRTES

NPARM returns Z when the value of OFF or NO is FFFFH (given as a flag), or any value whose bytes OR to FFH. YPARM is where ON and YES are stored and never read, so SYSGEN (ON) is SYSGEN. CKRTES walks the 31 DCBs from KI (0208H) to 02F8H and follows each route (DCB+0 bit 4) to the DCB or FCB it names: an FCB, bit 7 set, is a route to a file and returns NZ.

25FFNPARM
LD BC,0000H 01 00 00
NPARM: load Register Pair BC with the value of OFF or NO; the operand at 2600H-2601H (0000H in the file) is stored by @PARAM (source: p/u no parm entry).
2602
LD A,B 78
Load Register A with Register B, the high byte of the value.
2603
OR C B1
OR Register A with Register C, the low byte: FFH for OFF given as a flag (source: if NO, make Z).
2604
XOR 0FFH EE FF
XOR Register A with FFH: Z when the OR gave FFH, OFF; 00H when OFF was not given gives FFH and NZ.
2606
RET C9
Return to 2476H with Z for OFF and NZ for a build, Register A = 00H or not.
2607-2608YPARM
DEFW 0000H 00 00
YPARM, 2607H-2608H: where @PARAM stores the value of ON and YES; nothing reads it.
2609CKRTES
LD DE,494BH 11 4B 49
CKRTES: load Register Pair DE with 494BH, the letters K and I as a word, the device name KI for @GTDCB (source: point to begin of area).
260C
LD A,52H 3E 52
Load Register A with 52H, SVC 82, @GTDCB, which finds the DCB of the device named in Register Pair DE.
260E
RST 28H EF
Call @GTDCB with RST 28H (the SYS0/SYS stub that loads SYS2/SYS): Register Pair HL = 0208H, KIDCB$, the first DCB.
260FCKRT0
PUSH HL E5
CKRT0: save Register Pair HL, the DCB being tested, on the stack (source: save pointer).
2610CKRT1
BIT 4,(HL) CB 66
CKRT1: test bit 4 of the byte at Register Pair HL, the type byte of the DCB: a routed device (source: routed device?).
2612
If the device is not routed jump to CKRT2 at 261FH for the next DCB (source: jump if not).
2614
INC L 2C
Increment Register L to DCB+1, the address of the DCB or FCB the device is routed to (source: bypass TYPE code).
2615
LD A,(HL) 7E
Load Register A with the byte at Register Pair HL, the low byte of that address (source: p/u route vector).
2616
INC L 2C
Increment Register L to DCB+2, the high byte (source: lo-order).
2617
LD H,(HL) 66
Load Register H with the byte at Register Pair HL, the high byte of the address (source: p/u vector hi-order).
2618
LD L,A 6F
Load Register L with Register A: Register Pair HL = the DCB or FCB that the device is routed to.
2619
BIT 7,(HL) CB 7E
Test bit 7 of the byte at Register Pair HL: set in an open FCB, so a route to a file (source: routed to a file?).
261B
If it is not a file jump back to CKRT1 at 2610H and test whether that device is routed in turn (source: ck further route if not).
261D
POP HL E1
Restore Register Pair HL from the stack, the DCB being tested (source: else exit with NZ).
261E
RET C9
Return NZ, from the BIT at 2619H: a device is routed to a file.
261FCKRT2
POP HL E1
CKRT2: restore Register Pair HL from the stack, the DCB being tested (source: recover DCB pointer).
2620
LD A,L 7D
Load Register A with Register L, the low byte of the DCB's address (source: advance to next DCB area).
2621
ADD A,08H C6 08
Add 08H to Register A, the length of a DCB (source: loop through all).
2623
LD L,A 6F
Load Register L with Register A: Register Pair HL = the next DCB (source: devices while checking).
2624
If Register L has not wrapped to 00H jump back to CKRT0 at 260FH: the DCBs 0208H to 02F8H (source: loop until table end).
2626
RET C9
Return Z from the ADD at 2621H: no device is routed to a file.
2627PUTOUT
LD C,A 4F
PUTOUT: load Register C with Register A, the byte to write (source: byte into C).
2628
LD A,04H 3E 04
Load Register A with 04H, SVC 4, @PUT, which writes the byte in Register C to the file of the FCB at Register Pair DE (source: do the put).
262A
RST 28H EF
Call @PUT with RST 28H (BOOT/SYS) for the FCB at Register Pair DE, GENDCB.
262B
RET Z C8
Return if @PUT returned Z, the byte written (source: back if good).
262C
Otherwise jump to IOERR at 2426H with Register A = the error number of @PUT; CONFIG/SYS is left open (source: else abort).

262FH - The FCB, the Texts and the Parameter Table

GENDCB holds the file spec until @INIT or @OPEN turns it into the FCB of CONFIG/SYS; its last 15 bytes are not in the file. The texts follow, each ended by 0DH, then PRMTBL$, an enhanced table (80H first; type byte, name, response byte, address of the value), whose response bytes nothing reads.

262F-263FGENDCB
DEFM "CONFIG/SYS.CCC:0" / DEFB 00H 43 4F 4E 46 49 47 2F 53 59 53 2E 43 43 43 3A 30 00
GENDCB, 262FH-263FH: the file spec of CONFIG/SYS with the password CCC and drive 0, the 0 at 263EH (CFGSPEC) replaced by the drive digit at 2467H; the FCB for @INIT and @OPEN.
2640-264E
DEFS 15
2640H-264EH: not in the file; the rest of the 32 bytes of the FCB GENDCB, filled by @INIT or @OPEN.
264F-2654CFGNAM$
DEFM "CONFIG" 43 4F 4E 46 49 47
CFGNAM$, 264FH-2654H: the module name written into the name record of CONFIG/SYS at 24B1H.
2655-266DCFGBLT
DEFM "User configuration built" / DEFB 0DH 55 73 65 72 20 63 6F 6E 66 69 67 75 72 61 74 69 6F 6E 20 62 75 69 6C 74 0D
CFGBLT, 2655H-266DH: shown at 2559H when CONFIG/SYS has been written and sector 2 marked.
266E-2689ATRBIT
DEFM "Attrib CONFIG/SYS.CCC:d (I)" / DEFB 0DH 41 74 74 72 69 62 20 43 4F 4E 46 49 47 2F 53 59 53 2E 43 43 43 3A 64 20 28 49 29 0D
ATRBIT, 266EH-2689H: the command run by @CMNDI at 2562H to make CONFIG/SYS invisible; the d at 2684H (ATRSPEC) becomes the drive digit at 246AH.
268A-26A4CFGDEL$
DEFM "User configuration deleted" / DEFB 0DH 55 73 65 72 20 63 6F 6E 66 69 67 75 72 61 74 69 6F 6E 20 64 65 6C 65 74 65 64 0D
CFGDEL$, 268AH-26A4H: shown at 25FDH when SYSGEN (OFF) has removed CONFIG/SYS.
26A5-26C0NOTFND$
DEFM "No user configuration found" / DEFB 0DH 4E 6F 20 75 73 65 72 20 63 6F 6E 66 69 67 75 72 61 74 69 6F 6E 20 66 6F 75 6E 64 0D
NOTFND$, 26A5H-26C0H: shown by NOTFND (2439H) when @OPEN of CONFIG/SYS fails for SYSGEN (OFF).
26C1-26E9WARN$
DEFM "Warning: Target drive contains no system" / DEFB 0DH 57 61 72 6E 69 6E 67 3A 20 54 61 72 67 65 74 20 64 72 69 76 65 20 63 6F 6E 74 61 69 6E 73 20 6E 6F 20 73 79 73 74 65 6D 0D
WARN$, 26C1H-26E9H: shown at 2553H when DSKTYP$ of the diskette's sector 2 is 00H, a data diskette.
26EA-270CISWP$
DEFM "Specified drive is write protected" / DEFB 0DH 53 70 65 63 69 66 69 65 64 20 64 72 69 76 65 20 69 73 20 77 72 69 74 65 20 70 72 6F 74 65 63 74 65 64 0D
ISWP$, 26EAH-270CH: shown by ISWP (2441H) when @CKDRV finds the diskette write protected (631 change).
270D-2730NOCANDO$
DEFM "** SYSGEN inhibited at this time **" / DEFB 0DH 2A 2A 20 53 59 53 47 45 4E 20 69 6E 68 69 62 69 74 65 64 20 61 74 20 74 68 69 73 20 74 69 6D 65 20 2A 2A 0D
NOCANDO$, 270DH-2730H: shown by NOCANDO (2445H) when CFLAG$ bit 5 is set.
2731-274CNOSPL$
DEFM "Can't while SPOOL is active" / DEFB 0DH 43 61 6E 27 74 20 77 68 69 6C 65 20 53 50 4F 4F 4C 20 69 73 20 61 63 74 69 76 65 0D
NOSPL$, 2731H-274CH: shown by NOSPL (243DH) when DFLAG$ bit 0 is set.
274D-276ANOMDSK$
DEFM "Can't while MEMDISK is active" / DEFB 0DH 43 61 6E 27 74 20 77 68 69 6C 65 20 4D 45 4D 44 49 53 4B 20 69 73 20 61 63 74 69 76 65 0D
NOMDSK$, 274DH-276AH: shown by NOMDSK (2431H) when DFLAG$ bit 4 is set.
276B-278ENORTES$
DEFM "Can't while route-to-file is active" / DEFB 0DH 43 61 6E 27 74 20 77 68 69 6C 65 20 72 6F 75 74 65 2D 74 6F 2D 66 69 6C 65 20 69 73 20 61 63 74 69 76 65 0D
NORTES$, 276BH-278EH: shown by NORTES (2435H) when CKRTES finds a device routed to a file.
278FPRMTBL$
DEFB 80H 80
PRMTBL$, 278FH: 80H, the mark of an enhanced parameter table for @PARAM.
2790-2795
DEFB 42H / DEFM "ON" / DEFB 00H / DEFW 2607H 42 4F 4E 00 07 26
2790H-2795H: type 42H (a flag, no abbreviation, 2 characters), ON, its response byte, and the address of its value, 2607H, YPARM.
2796-279C
DEFB 43H / DEFM "OFF" / DEFB 00H / DEFW 2600H 43 4F 46 46 00 00 26
2796H-279CH: type 43H (a flag, no abbreviation, 3 characters), OFF, its response byte, and the address of its value, 2600H, NPARM's operand.
279D-27A3
DEFB 53H / DEFM "YES" / DEFB 00H / DEFW 2607H 53 59 45 53 00 07 26
279DH-27A3H: type 53H (a flag, a first letter abbreviation allowed, 3 characters), YES or Y, its response byte, and 2607H, YPARM.
27A4-27A9
DEFB 52H / DEFM "NO" / DEFB 00H / DEFW 2600H 52 4E 4F 00 00 26
27A4H-27A9H: type 52H (a flag, a first letter abbreviation allowed, 2 characters), NO or N, its response byte, and 2600H, NPARM's operand.
27AA-27B2
DEFB 95H / DEFM "DRIVE" / DEFB 00H / DEFW 245DH 95 44 52 49 56 45 00 5D 24
27AAH-27B2H: type 95H (a number, a first letter abbreviation allowed, 5 characters), DRIVE or D, its response byte, and 245DH, the operand of the LD BC at DRIVE (245CH).
27B3
DEFB 00H 00
27B3H: the 00H where a next entry's type byte would be, which ends the table for @PARAM (source: NOP).
27B4-27B7ADRTBL$
DEFW 0002H, 040EH 02 00 0E 04
ADRTBL$, 27B4H-27B7H: 2 bytes at 040EH, HIGH$, the top of the memory free for programs (source: save HIGH$).
27B8-27BB
DEFW 0002H, 001EH 02 00 1E 00
27B8H-27BBH: 2 bytes at 001EH, LOW$, the low limit of the memory free for programs; CLEANUP sets it again at every @EXIT, so the saved value does not last (source: lowest user address).
27BC-27BF
DEFW 0001H, 002BH 01 00 2B 00
27BCH-27BFH: 1 byte at 002BH, TIMSL$, the time slice pattern of the clock interrupt (source: time slice).
27C0-27C3
DEFW 00FAH, 0206H FA 00 06 02
27C0H-27C3H: 250 bytes at 0206H-02FFH: DVRHI$ and the 31 DCBs from KIDCB$ 0208H on, with their routes, links, filters and the printer's lines (source: save primary DCBs).
27C4-27C7
DEFW 0003H, 19A4H 03 00 A4 19
27C4H-27C7H: 3 bytes at 19A4H-19A6H: EXTDBG$, the extended debugger's hook, and the first byte of @REMOVE (3EH); the source says the DEBUG hook, but @DBGHK is at 199FH (source: ext DEBUG vector & DBGHK).
27C8-27CB
DEFW 0032H, 003CH 32 00 3C 00
27C8H-27CBH: 50 bytes at 003CH-006DH: INTIM$, INTMSK$, the interrupt vectors INTVC$, the task slots TCB$, @NMI, OVRLY$ (A4H, @INIT's SYS2, when saved; at start-up SYS2 is again at 1E00H, loaded by @LOAD's @OPEN) and the first four flags (source: table & TCBs).
27CC-27CF
DEFW 0022H, 006AH 22 00 6A 00
27CCH-27CFH: 34 bytes at 006AH-008BH: FLGTAB$, the flags AFLAG$ to ZFLAG$ (006AH-0083H; KFLAG$'s CAPS bit and SFLAG$ with bit 5 cleared among them), the SVC table page byte 0084H, OSVER$, @ICNFG and @KITSK (source: flag table & assorted).
27D0-27D3
DEFW 0002H, 0196H 02 00 96 01
27D0H-27D3H: 2 bytes at 0196H, the word of SVC 75 in SVCTAB$: @WRITE or @VER, the state of VERIFY (source: save WRITE vector).
27D4-27D7
DEFW 0003H, 1A6CH 03 00 6C 1A
27D4H-27D7H: 3 bytes at 1A6CH, HKRES$, the CALL CKMOD@ that a program may take over to watch the loading of overlays (source: sys overlay hook).
27D8-27DB
DEFW 0002H, 08FEH 02 00 FE 08
27D8H-27DBH: 2 bytes at 08FEH, KIDATA$+2 and KIDATA$+3, the key repeat delay and rate that SETKI sets.
27DC-27DF
DEFW 0001H, 0B94H 01 00 94 0B
27DCH-27DFH: 1 byte at 0B94H, DODATA$, the video mode byte (protected lines, special characters).
27E0-27E3
DEFW 0002H, 0B97H 02 00 97 0B
27E0H-27E3H: 2 bytes at 0B97H, CRSAVE and CRSCHAR, the character under the cursor and the cursor character.
27E4-27E7
DEFW 0010H, 01F0H 10 00 F0 01
27E4H-27E7H: 16 bytes at 01F0H-01FFH, the words of SVCs 120 to 127 in SVCTAB$, the SVCs left for programs (source: SVCs 120 - 127).
27E8-27EB
DEFW 0010H, 0008H 10 00 08 00
27E8H-27EBH: 16 bytes at 0008H-0017H: the RST 08H and RST 10H vectors, SVCRET$ and LSVC$, FDDINT$ (000EH, the DI or NOP that SYSTEM (SMOOTH) sets) and USTOR$ (source: RST zones 8 and 10).
27EC-27EF
DEFW 0001H, 0750H 01 00 50 07
27ECH-27EFH: 1 byte at 0750H, HERTZ$, the clock interrupt count of a second (source: hertz rate for timer).
27F0-27F3
DEFW 0001H, 0E29H 01 00 29 0E
27F0H-27F3H: 1 byte at 0E29H, @PRTIMO, the byte that SYSTEM (PRTIME) patches in the printer driver (631 change).
27F4-2813
DEFW 0000H, 0000H, 0000H, 0000H, 0000H, 0000H, 0000H, 0000H, 0000H, 0000H, 0000H, 0000H, 0000H, 0000H, 0000H, 0000H 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
27F4H-2813H: eight empty entries for patches; the first one ends the table at 24EFH.
2814-2815
DEFW 0000H 00 00
2814H-2815H: the 0000H that ends the table after the empty entries (source: end of table).
2816-2829
DEFB 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2816H-2829H: 20 bytes of 00H kept for patches, the end of the member (source: patch space).

2400H - Member 3 (FORMS): Entry and Exits

SYS1/SYS runs FORMS with request B1H; its header (file offset 0031H: record 000DH, byte CEH) points at member 3, which the overlay loader reads to 2400H-2801H and 280EH-29DDH, and calls at 2400H with Register Pair HL at the text after the word FORMS. FORMS shows or changes the settings of the forms filter FORMS/FLT, the ten bytes of its data area, which it finds through @GTMOD and the module name $FF. The entry keeps the Stack Pointer, so every exit returns at the depth of the entry through SAVESP, which clears a BREAK still pending with @CKBRKC. There is no BREAK test at the start.

2400START
LD (2423H),SP ED 73 23 24
FORMS's entry (request B1H): store the Stack Pointer into 2423H-2424H, the operand of the LD SP at SAVESP (2422H), so that every exit returns at the depth of the entry (source: save SP loc).
2404
Call FORMS at 2429H, which does the command; it comes back to EXIT at 2407H by its RET after showing the settings, or by the JP at 2486H after storing them; every error goes straight to SAVESP (source: execute form code).
2407EXIT
LD HL,0000H 21 00 00
EXIT: load Register Pair HL with 0000H, the return code for no error (source: set no error).
240A
Jump relative to SAVESP at 2422H, which restores the Stack Pointer of the entry and returns with Register Pair HL = 0000H.
240CPRMERR
LD A,2CH 3E 2C
PRMERR: load Register A with 2CH, error 44, Parameter error, and fall into IOERR (source: parameter error).
240EIOERR
LD L,A 6F
IOERR: load Register L with Register A, the error number, the low byte of the return code (source: xfer error # to HL).
240F
LD H,00H 26 00
Load Register H with 00H: Register Pair HL = the error number, the command's return code.
2411
OR 0C0H F6 C0
OR Register A with C0H: bit 7 asks @ERROR to return to the caller, bit 6 for the short message alone (source: abbrev, return).
2413
LD C,A 4F
Load Register C with Register A, the error number with bits 7 and 6 set, for @ERROR (source: xfer to C).
2414
LD A,1AH 3E 1A
Load Register A with 1AH, SVC 26, @ERROR, which shows an error message (source: display error).
2416
RST 28H EF
Call @ERROR with RST 28H (the SYS0/SYS stub 1B0FH that loads SYS4/SYS) to show the short error message.
2417
Jump relative to SAVESP at 2422H, which restores the Stack Pointer and returns with Register Pair HL = the error number (source: go to exit routine).
2419NOPF
LD HL,2879H 21 79 28LD HL,NOPF$
NOPF: point Register Pair HL to 2879H, NOPF$, the message Forms Filter not Resident, for the case that no module $FF is in memory (source: no filter present).
241C
LD A,0CH 3E 0C
Load Register A with 0CH, SVC 12, @LOGOT, which shows a message and writes it to the job log.
241E
RST 28H EF
Call @LOGOT with RST 28H (BOOT/SYS) to show and log the message at Register Pair HL, 2879H (source: log message).
241FABORT
LD HL,0FFFFH 21 FF FF
ABORT: load Register Pair HL with FFFFH, the return code after a message of FORMS's own and for BREAK at a prompt (source: set abort code).
2422SAVESP
LD SP,0000H 31 00 00
SAVESP: load the Stack Pointer with the word at 2423H-2424H, the value stored at 2400H (0000H in the file); every exit comes here (source: p/u original SP).
2425
LD A,6AH 3E 6A
Load Register A with 6AH, SVC 106, @CKBRKC, which tests for BREAK and clears a BREAK still pending (source: clear any BREAK).
2427
RST 28H EF
Call @CKBRKC with RST 28H (BOOT/SYS); its result is not looked at, the exit goes on in every case.
2428
RET C9
Return through the tail of RST28 (1A77H) to @EXIT or to the caller of @CMNDR, with Register Pair HL = 0000H, FFFFH or the error number (source: and RETurn to DOS).

2429H - Member 3 (FORMS): The Command

FORMS finds the filter's data area first (DOINIT). A line with nothing after the spaces shows the ten settings. Otherwise @PARAM reads the list (a line without a parenthesis reads nothing and changes nothing, with no message); XLATE's value is split into its two bytes, DEFAULT puts the filter's starting values back and shows them, QUERY asks for each setting, and without QUERY each parameter given is checked. Last, STFPRMS stores the parameters given into the filter.

2429FORMS
FORMS: call DOINIT at 2700H, which finds the module $FF and copies its data area to DUPDA, 29E3H-29ECH, with Index Register IX pointing there (source: do initialization).
242C
DEC HL 2B
Decrement Register Pair HL, the pointer to the command line, for the INC HL that begins the loop.
242DIGSPCS
INC HL 23
IGSPCS: increment Register Pair HL to the next character of the command line (source: bump cmdline ptr).
242E
LD A,(HL) 7E
Load Register A with the character at Register Pair HL (source: skip leading spaces).
242F
CP 20H FE 20
Compare Register A with 20H, a space, which the loop passes over.
2431
If it is a space, jump relative to 242DH for the next character.
2433
CP 0EH FE 0E
Compare Register A with 0EH: the characters below it (0DH, 03H) end the line (source: end of line ?).
2435
If Register A is 0EH or more, there is something on the line: jump relative to GETPRM at 243EH (source: go if not).
2437DISPFRM
DISPFRM: call DSFORMS at 2489H, which writes the settings of DUPDA into the text VALUES and returns with Register Pair HL = 2897H (source: create default string).
243A
Call DSPLY at 26F7H to show the settings at Register Pair HL, 2897H (source: display defaults).
243D
RET C9
Return to EXIT at 2407H, the return address of the call at 2404H, for the return code 0000H (source: and RETurn).
243EGETPRM
LD DE,2762H 11 62 27LD DE,PRMTBL$
GETPRM: point Register Pair DE to 2762H, PRMTBL$, the parameter table of FORMS (source: any paramters ?).
2441
LD A,11H 3E 11
Load Register A with 11H, SVC 17, @PARAM, which reads a parameter list.
2443
RST 28H EF
Call @PARAM with RST 28H (the SYS0/SYS stub 1987H, code in SYS1/SYS at 21D7H) on the text at Register Pair HL; without a parenthesis it reads nothing and returns Z.
2444
If @PARAM returned NZ (a word not in the table or a bad value), jump to PRMERR at 240CH for Parameter error (source: NZ - parameter error).
2447
LD A,(27BAH) 3A BA 27LD A,(XTRESP)
Load Register A with the byte at 27BAH, XTRESP, the response byte of XLATE (source: p/u xlate TO response).
244A
LD (27DFH),A 32 DF 27LD (XFRESP),A
Store Register A into 27DFH, XFRESP, the response byte of the second entry for XLATE, the From byte (source: xfer to FROM response).
244D
LD HL,27D6H 21 D6 27
Point Register Pair HL to 27D6H, the high byte of XTPARM, XLATE's value X'aabb': aa there, the byte to translate (source: HL => XLATE To).
2450
LD A,(HL) 7E
Load Register A with the byte at Register Pair HL, 27D6H, the From byte of XLATE's value (source: p/u value).
2451
LD (HL),00H 36 00
Store 00H into the byte at Register Pair HL, 27D6H, so that XTPARM holds the To byte alone (source: set Xlate To msb = 0).
2453
LD (27E2H),A 32 E2 27LD (XFPARM),A
Store Register A, the From byte, into 27E2H, the low byte of XFPARM, the value of the From entry (source: xfer to From parm).
2456
LD A,(27C5H) 3A C5 27LD A,(DRESP)
Load Register A with the byte at 27C5H, DRESP, the response byte of DEFAULT: nonzero when DEFAULT was given in any form, DEFAULT=NO too (source: Default parm entered ?).
2459
OR A B7
OR Register A with itself to set the Z flag when DEFAULT was not given.
245A
If DEFAULT was not given, jump relative to 2473H for QUERY or the checks (source: no - check for Query).
245C
LD DE,(25D1H) ED 5B D1 25
With DEFAULT: load Register Pair DE with the word at 25D1H, the address of the filter's data area that DOINIT stored into the operand of DATAREA (source: DE => data area start).
2460
LD BC,000AH 01 0A 00
Load Register Pair BC with 000AH, the ten bytes of the data area (source: BC = 10 bytes in table).
2463
LD HL,2758H 21 58 27LD HL,DEFTAB
Point Register Pair HL to 2758H, DEFTAB, the starting values of the filter's data area (source: HL => default table).
2466
PUSH HL E5
Save Register Pair HL, 2758H, on the stack for the second copy (source: save regs).
2467
PUSH BC C5
Save Register Pair BC, 000AH, on the stack for the second copy.
2468
LDIR ED B0
Copy the ten bytes from Register Pair HL, 2758H, to the filter's data area at Register Pair DE with LDIR (Register Pair BC = 000AH): the line and character counters become 0 as well (source: xfer to $FF data area).
246A
POP BC C1
Restore Register Pair BC, 000AH, from the stack.
246B
POP HL E1
Restore Register Pair HL, 2758H, from the stack.
246C
LD DE,29E3H 11 E3 29LD DE,DUPDA
Point Register Pair DE to 29E3H, DUPDA, the copy of the data area that DSFORMS shows.
246F
LDIR ED B0
Copy the ten bytes from Register Pair HL, 2758H, to DUPDA at Register Pair DE with LDIR (Register Pair BC = 000AH) (source: xfer to duplicate DA).
2471
Jump relative to DISPFRM at 2437H to show the new settings and return with 0000H; the other parameters of the line are not looked at (source: display forms and exit).
2473CHECKQ
CHECKQ: call INITVAL at 2619H, which gives the five numbers CHARS, INDENT, LINES, MARGIN and PAGE the filter's present values where they were not given, and with QUERY where they were given too (source: init parm values = def's).
2476
Call DSFORMS at 2489H to write the present settings into the texts that the prompts of QUERY show as their defaults (source: create string).
2479
LD A,(27AAH) 3A AA 27LD A,(QRESP)
Load Register A with the byte at 27AAH, QRESP, the response byte of QUERY: nonzero when QUERY was given in any form, QUERY=NO too (source: Query parm used?).
247C
OR A B7
OR Register A with itself to set the Z flag when QUERY was not given.
247D
If QUERY was not given (Z), call CKCOMM at 24FCH to check every parameter given; it returns Z, or goes to Parameter error itself (source: check cmdline values if not).
2480
If QUERY was given (NZ), call PROMPT at 252AH to ask for all ten settings (source: prompt if Q).
2483STUFFIN
STUFFIN: call STFPRMS at 25CCH, which stores every parameter whose response byte is nonzero into the filter's data area (source: stuff parms in $FF data).
2486
Jump to EXIT at 2407H for the return code 0000H; nothing is shown after a change (source: good exit).

2489H - Member 3 (FORMS): DSFORMS, the Settings as Text

DSFORMS writes the ten settings of DUPDA (Index Register IX, 29E3H), the copy of the filter's data area, into the text VALUES at 2897H: each number as three decimal characters, each switch as ON (it leaves OFF, the text of the file, when the bit is clear), CHARS 0 as OFF. The XLATE line is shown only when its two bytes differ, by turning the 0DH that ends the text at 28FFH into a line feed. The text is both what FORMS shows and the defaults of the QUERY prompts. It returns with Register Pair HL = 2897H.

2489DSFORMS
BIT 0,(IX+07H) DD CB 07 46
DSFORMS: test bit 0 of the flag byte of DUPDA (IX+07H), Index Register IX holding 29E3H: ADDLF, a line feed after each carriage return (source: add line feed ?).
248D
LD DE,28E1H 11 E1 28LD DE,SADDLF
Point Register Pair DE to 28E1H, SADDLF, the three characters of ADDLF's setting in VALUES (source: DE => addlf dsply msg).
2490
If the bit is set (NZ), call XFERON at 26E8H to copy ON (with its space) to Register Pair DE, 28E1H (source: put ON in message).
2493
LD A,(IX+08H) DD 7E 08
Load Register A with the CHARS byte of DUPDA (IX+08H), Index Register IX holding 29E3H: the characters to a line, 0 for no wrap-around (source: CHARS value).
2496
OR A B7
OR Register A with itself to set the Z flag when CHARS is 0, off.
2497
LD DE,28BAH 11 BA 28LD DE,SCHARS
Point Register Pair DE to 28BAH, SCHARS, the three characters of CHARS in VALUES (source: DE => chars msg).
249A
If CHARS is not 0 (NZ), call HEXDEC at 2721H to write Register A in decimal at Register Pair DE, 28BAH; HEXDEC keeps the flags (source: convert value to dec ASCII).
249D
If CHARS is not 0, jump relative to DOFFHRD at 24A5H (source: go if Char parm used).
249FCHAROFF
LD HL,2876H 21 76 28LD HL,OFFSTR
CHAROFF: point Register Pair HL to 2876H, OFFSTR, the characters OFF (source: else xfer OFF into).
24A2
Call XFER at 26EBH to copy the three characters from Register Pair HL, 2876H, to SCHARS at Register Pair DE, 28BAH (source: chars message).
24A5DOFFHRD
BIT 1,(IX+07H) DD CB 07 4E
DOFFHRD: test bit 1 of the flag byte of DUPDA (IX+07H), Index Register IX holding 29E3H: FFHARD, a real form feed 0CH in place of line feeds (source: FFHARD parm used?).
24A9
LD DE,28EEH 11 EE 28LD DE,SFFHARD
Point Register Pair DE to 28EEH, SFFHARD, the three characters of FFHARD's setting in VALUES (source: DE => ffhard msg).
24AC
If the bit is set (NZ), call XFERON at 26E8H to copy ON to Register Pair DE, 28EEH (source: xfer ON if set).
24AF
LD A,(IX+06H) DD 7E 06
Load Register A with the INDENT byte of DUPDA (IX+06H), Index Register IX holding 29E3H: the indent of a wrapped line (source: default value).
24B2
LD DE,28D4H 11 D4 28LD DE,SINDENT
Point Register Pair DE to 28D4H, SINDENT, the three characters of INDENT in VALUES (source: DE => indent msg).
24B5
Call HEXDEC at 2721H to write Register A in decimal at Register Pair DE, 28D4H (source: convert to decimal ASCII).
24B8
LD A,(IX+02H) DD 7E 02
Load Register A with the LINES byte of DUPDA (IX+02H), Index Register IX holding 29E3H: the lines printed on a page (source: p/u LINES value).
24BB
LD DE,28ADH 11 AD 28LD DE,SLINES
Point Register Pair DE to 28ADH, SLINES, the three characters of LINES in VALUES (source: pt to lines msg).
24BE
Call HEXDEC at 2721H to write Register A in decimal at Register Pair DE, 28ADH (source: convert to decimal ASCII).
24C1
LD A,(IX+09H) DD 7E 09
Load Register A with the MARGIN byte of DUPDA (IX+09H), Index Register IX holding 29E3H: the left margin (source: p/u MARGIN value).
24C4
LD DE,28C7H 11 C7 28LD DE,SMARGIN
Point Register Pair DE to 28C7H, SMARGIN, the three characters of MARGIN in VALUES (source: DE => margin msg).
24C7
Call HEXDEC at 2721H to write Register A in decimal at Register Pair DE, 28C7H (source: convert to decimal ASCII).
24CA
LD A,(IX+00H) DD 7E 00
Load Register A with the PAGE byte of DUPDA (IX+00H), Index Register IX holding 29E3H: the lines of the physical page (source: p/u page value).
24CD
LD DE,28A0H 11 A0 28LD DE,SPAGE
Point Register Pair DE to 28A0H, SPAGE, the three characters of PAGE in VALUES (source: DE => page msg).
24D0
Call HEXDEC at 2721H to write Register A in decimal at Register Pair DE, 28A0H (source: convert to decimal ASCII).
24D3
BIT 2,(IX+07H) DD CB 07 56
Test bit 2 of the flag byte of DUPDA (IX+07H), Index Register IX holding 29E3H: TAB, the expansion of 09H; set in the filter's starting values, so TAB shows ON until TAB=OFF (source: check Tab bit).
24D7
LD DE,28FBH 11 FB 28LD DE,STAB
Point Register Pair DE to 28FBH, STAB, the three characters of TAB's setting in VALUES (source: DE => tab msg).
24DA
If the bit is set (NZ), call XFERON at 26E8H to copy ON to Register Pair DE, 28FBH (source: xfer ON if set).
24DD
LD A,(IX+04H) DD 7E 04
Load Register A with the From byte of DUPDA (IX+04H), Index Register IX holding 29E3H: the character that the filter translates (source: p/u FROM byte).
24E0
LD B,(IX+05H) DD 46 05
Load Register B with the To byte of DUPDA (IX+05H), Index Register IX holding 29E3H: the character it becomes (source: p/u TO byte).
24E3
CP B B8
Compare Register A with Register B: equal bytes translate nothing (source: same ?).
24E4
If they are equal, jump relative to NOSHOW at 24F8H: the XLATE line stays hidden behind the 0DH at 28FFH (source: yes - no show).
24E6
LD HL,28FFH 21 FF 28LD HL,DOXLATE
Point Register Pair HL to 28FFH, DOXLATE, the 0DH that ends the text before the XLATE line (source: change CR to LF).
24E9
LD (HL),0AH 36 0A
Store 0AH into the byte at Register Pair HL, 28FFH: a line feed, so that @DSPLY goes on to show the XLATE line (source: so msg will dsply).
24EB
LD HL,290BH 21 0B 29LD HL,SXLFROM
Point Register Pair HL to 290BH, SXLFROM, the two hex digits of the From byte in X'00' (source: From message).
24EE
Call HEX8 at 273CH to write Register A, the From byte, as two hex digits at Register Pair HL, 290BH (source: convert A to hex @ HL).
24F1
LD A,B 78
Load Register A with Register B, the To byte (source: p/u TO).
24F2
LD HL,2914H 21 14 29LD HL,SXLTO
Point Register Pair HL to 2914H, SXLTO, the two hex digits of the To byte (source: To message).
24F5
Call HEX8 at 273CH to write Register A, the To byte, as two hex digits at Register Pair HL, 2914H (source: convert A to hex @ HL).
24F8NOSHOW
LD HL,2897H 21 97 28LD HL,VALUES
NOSHOW: point Register Pair HL to 2897H, VALUES, the text of the settings, for the caller (source: HL => default val string).
24FB
RET C9
Return to the caller with Register Pair HL = 2897H (source: RETurn).

24FCH - Member 3 (FORMS): CKCOMM, the Checks without QUERY

CKCOMM walks the ten entries of STRTAB (280EH, nine bytes each: the type, the response byte's address, the prompt, the check routine and the default text) in the order PAGE, LINES, CHARS, MARGIN, INDENT, ADDLF, FFHARD, TAB, the From and the To byte of XLATE. For each parameter whose response byte is nonzero it calls the entry's check routine with Register A = the response byte and Register Pair BC = the value, through a CALL whose address it stores first; NZ from a check is Parameter error.

24FCCKCOMM
LD E,0AH 1E 0A
CKCOMM: load Register E with 0AH, the ten entries of STRTAB to check (source: 10 values to check).
24FE
LD IY,280EH FD 21 0E 28LD IY,STRTAB
Point Index Register IY to 280EH, STRTAB, the table of prompts, responses and checks (source: IY => response table).
2502CKCOMML
LD L,(IY+01H) FD 6E 01
CKCOMML: load Register L with the low byte of the response byte's address (IY+01H), Index Register IY holding the entry's address (source: p/u address of response).
2505
LD H,(IY+02H) FD 66 02
Load Register H with the high byte of the response byte's address (IY+02H), Index Register IY holding the entry's address.
2508
LD A,(HL) 7E
Load Register A with the response byte at Register Pair HL: 00H when the parameter was not given (source: was anything entered ?).
2509
OR A B7
OR Register A with itself to set the Z flag when the parameter was not given; the flags are kept for the CALL at 251BH.
250A
INC HL 23
Increment Register Pair HL to the word after the response byte, the address of the parameter's value (source: parm addr follows resp).
250B
LD C,(HL) 4E
Load Register C with the low byte of that address from Register Pair HL (source: set HL = (HL)).
250C
INC HL 23
Increment Register Pair HL to the high byte of the address.
250D
LD H,(HL) 66
Load Register H with the high byte of the value's address from Register Pair HL.
250E
LD L,C 69
Load Register L with Register C: Register Pair HL = the address of the parameter's value word.
250F
LD C,(HL) 4E
Load Register C with the low byte of the value from Register Pair HL (source: p/u response value).
2510
INC HL 23
Increment Register Pair HL to the high byte of the value (source: into BC).
2511
LD B,(HL) 46
Load Register B with the high byte of the value from Register Pair HL: Register Pair BC = the parameter's value.
2512
LD L,(IY+05H) FD 6E 05
Load Register L with the low byte of the check routine's address (IY+05H), Index Register IY holding the entry's address (source: p/u address of routine).
2515
LD H,(IY+06H) FD 66 06
Load Register H with the high byte of the check routine's address (IY+06H), Index Register IY holding the entry's address (source: to check value validity).
2518
LD (251CH),HL 22 1C 25
Store Register Pair HL, the check routine's address, into 251CH-251DH, the operand of the CALL at CALLINS (source: stuff addr to CALL instr).
251BCALLINS
CALLINS: if the parameter was given (NZ), call the check routine whose address was stored at 251CH (0000H in the file), with Register A = the response byte and Register Pair BC = the value (source: BC = response, A = type).
251E
If the check returned NZ, jump to PRMERR at 240CH for Parameter error; a parameter not given keeps the Z flag of 2509H (source: NZ - parameter error).
2521
LD BC,0009H 01 09 00
Load Register Pair BC with 0009H, the length of an entry of STRTAB (source: pos to next STRTAB entry).
2524
ADD IY,BC FD 09
Add Register Pair BC to Index Register IY: the next entry.
2526
DEC E 1D
Decrement Register E, the entries left (source: done ?).
2527
If entries are left, jump relative to CKCOMML at 2502H.
2529
RET C9
Return to 2480H with Z, so that the CALL NZ of PROMPT is passed over (source: yes - RETurn).

252AH - Member 3 (FORMS): PROMPT, the Ten Questions of QUERY

With QUERY, FORMS asks for the ten settings in the order of STRTAB, each with its present value in braces as the default: ENTER alone keeps the value, an answer is read by @PARAM as F=answer through a table of one entry (FAKETAB, 2868H) and checked by the entry's routine, and a refused answer is asked again. The answers of the command line are not checked on this path. A refused answer has already been stored into the value's low byte (STUFVAL, 25BBH), and stays there if ENTER follows.

252APROMPT
LD B,0AH 06 0A
PROMPT: load Register B with 0AH, the ten prompts, eight settings and the two bytes of XLATE (source: eight normal + 2 Xlates).
252C
LD IY,280EH FD 21 0E 28LD IY,STRTAB
Point Index Register IY to 280EH, STRTAB, the first entry, PAGE (source: prompt, response table).
2530PROMPTL
LD A,(IY+00H) FD 7E 00
PROMPTL: load Register A with the type byte of the entry (IY+00H), Index Register IY holding the entry's address: 80H for a number, 40H for a switch (source: p/u type byte).
2533
INC A 3C
Increment Register A: the type with a name length of 1, for the one letter name F of FAKETAB (source: merge length = 1).
2534
LD (2869H),A 32 69 28
Store Register A into 2869H, the type byte of FAKETAB's one entry; @PARAM does not check the kinds of value it allows (source: store new type byte).
2537REINPUT
LD E,(IY+01H) FD 5E 01
REINPUT: load Register E with the low byte of the response byte's address (IY+01H), Index Register IY holding the entry's address (source: p/u address).
253A
LD D,(IY+02H) FD 56 02
Load Register D with the high byte of the response byte's address (IY+02H), Index Register IY holding the entry's address: Register Pair DE = the response byte (source: in DE).
253DDOPRMPT
LD L,(IY+03H) FD 6E 03
DOPRMPT: load Register L with the low byte of the prompt's address (IY+03H), Index Register IY holding the entry's address (source: p/u address in HL).
2540
LD H,(IY+04H) FD 66 04
Load Register H with the high byte of the prompt's address (IY+04H), Index Register IY holding the entry's address: Register Pair HL = the text of the prompt.
2543
Call DISPROM at 2558H to show the prompt at Register Pair HL with its default, padded so that the question mark is in column 38 (source: p/u default and display).
2546
Call INPUT at 2743H to read up to three keys; Z for ENTER alone, NZ for an answer (source: input value).
2549
PUSH BC C5
Save Register Pair BC, Register B the prompts left, on the stack (source: save count).
254A
If there is an answer (NZ), call STUFVAL at 25A3H to read and check it; it returns NZ when it is refused (source: stuff in valid input).
254D
POP BC C1
Restore Register Pair BC, the count of prompts in Register B (source: restore count).
254E
If the answer was refused (NZ), jump relative to REINPUT at 2537H to ask again (source: re-input if bad value).
2550NEXTPR
LD DE,0009H 11 09 00
NEXTPR: load Register Pair DE with 0009H, the length of an entry of STRTAB (source: 9 bytes per entry).
2553
ADD IY,DE FD 19
Add Register Pair DE to Index Register IY: the next entry.
2555
Decrement Register B and, while prompts are left, jump relative to PROMPTL at 2530H (source: B prompts).
2557
RET C9
Return to 2483H, STUFFIN, when all ten have been asked (source: done).

2558H - Member 3 (FORMS): DISPROM, STUFDEF and DISPA, a Prompt

DISPROM turns the cursor off, shows the prompt up to and with its opening brace, then STUFDEF shows up to five characters of the default text (spaces passed over, up to the line feed that ends it in VALUES) and the closing brace, then DISPROM pads with spaces so that every question mark lands in column 38, and shows ENDPROM, the question mark, a space and the cursor on.

2558DISPROM
PUSH DE D5
DISPROM: save Register Pair DE, the response byte's address, on the stack (source: save regs).
2559
PUSH BC C5
Save Register Pair BC, Register B the prompts left, on the stack.
255A
LD C,0FH 0E 0F
Load Register C with 0FH, the video control code that turns the cursor off (source: turn off cursor).
255C
Call DSP at 26F1H to send Register C, 0FH, to the screen.
255F
LD B,20H 06 20
Load Register B with 20H, 32: each character of the prompt is taken off it (2563H) and the columns the default does not use are added (2570H), leaving the spaces put after the closing brace, so that every question mark lands in column 38 (source: space padding base).
2561PRLP
LD C,(HL) 4E
PRLP: load Register C with the next character of the prompt at Register Pair HL (source: p/u character).
2562
INC HL 23
Increment Register Pair HL to the character after it (source: pos to next).
2563
DEC B 05
Decrement Register B, the columns left (source: dec count).
2564
Call DSP at 26F1H to show the character in Register C (source: output byte).
2567
LD A,C 79
Load Register A with Register C, the character just shown (source: p/u char).
2568
CP 7BH FE 7B
Compare Register A with 7BH, the opening brace that ends every prompt text (source: bracket ?).
256A
If it is not the brace, jump relative to PRLP at 2561H for the next character (source: no - go til bracket).
256C
Call STUFDEF at 2582H to show the default and the closing brace; it returns with Register C = 5 less the characters of the default (source: display default).
256F
LD A,B 78
Load Register A with Register B, the columns left after the prompt (source: p/u base #).
2570
ADD A,C 81
Add Register C, the characters the default did not use, to Register A (source: and calculate # of).
2571
LD B,A 47
Load Register B with Register A, the spaces to show (source: spaces to print).
2572
LD C,20H 0E 20
Load Register C with 20H, a space, the character of the padding.
2574SPLP
SPLP: call DSP at 26F1H to show the space in Register C (source: output spaces).
2577
Decrement Register B and, while spaces are left, jump relative to SPLP at 2574H.
2579
LD HL,2893H 21 93 28LD HL,ENDPROM
Point Register Pair HL to 2893H, ENDPROM, a question mark, a space, the cursor on code 0EH and 03H (source: end of prompt).
257C
Call DSPLY at 26F7H to show the text at Register Pair HL, 2893H; the 03H leaves the cursor on the line for the answer.
257F
POP BC C1
Restore Register Pair BC, the count of prompts in Register B (source: recover regs).
2580
POP DE D1
Restore Register Pair DE, the response byte's address.
2581
RET C9
Return to PROMPT at 2546H (source: and RETurn).
2582STUFDEF
LD L,(IY+07H) FD 6E 07
STUFDEF: load Register L with the low byte of the default text's address (IY+07H), Index Register IY holding the entry's address: a place in VALUES (source: p/u default string).
2585
LD H,(IY+08H) FD 66 08
Load Register H with the high byte of the default text's address (IY+08H), Index Register IY holding the entry's address (source: address).
2588
LD C,05H 0E 05
Load Register C with 05H, the most characters of a default to show (source: 5 chars max).
258APNLP
LD A,(HL) 7E
PNLP: load Register A with the next character of the default at Register Pair HL.
258B
INC HL 23
Increment Register Pair HL to the character after it (source: bump source).
258C
CP 0AH FE 0A
Compare Register A with 0AH, the line feed that ends each setting in VALUES (source: done ?).
258E
If it is the line feed, jump relative to DUNLP at 259AH for the closing brace.
2590
CP 20H FE 20
Compare Register A with 20H, a space: the leading spaces of a number and of ON are not shown (source: leading space ?).
2592
If it is a space, jump relative to PNLP at 258AH without counting it (source: yes - ignore it).
2594
Call DISPA at 259CH to show the character in Register A (source: output A).
2597PNLP2
DEC C 0D
PNLP2: decrement Register C, the characters left (source: dec count).
2598
If characters are left, jump relative to PNLP at 258AH.
259ADUNLP
LD A,7DH 3E 7D
DUNLP: load Register A with 7DH, the closing brace, and fall into DISPA to show it (source: output end bracket).
259CDISPA
PUSH BC C5
DISPA: save Register Pair BC, the count in Register C, on the stack (source: save count in C).
259D
LD C,A 4F
Load Register C with Register A, the character to show (source: xfer char to C).
259E
Call DSP at 26F1H to show the character in Register C (source: output byte).
25A1
POP BC C1
Restore Register Pair BC, the count in Register C (source: recover C).
25A2
RET C9
Return to the caller: after the closing brace to DISPROM at 256FH (source: and RETurn).

25A3H - Member 3 (FORMS): STUFVAL, Reading an Answer

STUFVAL hands @PARAM the text (F= followed at once by the answer that INPUT put into INBUFF$ (2802H) and its 0DH, with FAKETAB as the table, so that the answer is read as the value of the parameter F into the operand of VALUE (25B4H). It stores the low byte of the value into the parameter's value before the check, then jumps to the entry's check routine with the return address RETADR on the stack; Z there makes the response byte 80H, NZ leaves it and asks again.

25A3STUFVAL
PUSH DE D5
STUFVAL: save Register Pair DE, the address of the parameter's response byte, on the stack (source: DE => response byte).
25A4
LD HL,27FFH 21 FF 27LD HL,FAKEPRM
Point Register Pair HL to 27FFH, FAKEPRM, the text (F= that INBUFF$ (2802H) continues with the answer (source: HL => fake parm entry).
25A7
LD DE,2868H 11 68 28LD DE,FAKETAB
Point Register Pair DE to 2868H, FAKETAB, the table of the one parameter F (source: DE => fake parm table).
25AA
LD A,11H 3E 11
Load Register A with 11H, SVC 17, @PARAM, which reads a parameter list (source: parse entry).
25AC
RST 28H EF
Call @PARAM with RST 28H (the SYS0/SYS stub 1987H, code in SYS1/SYS at 21D7H) on the text at Register Pair HL; the value goes to 25B4H, the response to 286BH.
25AD
POP HL E1
Restore Register Pair HL from the stack: the parameter's response byte (source: HL => response).
25AE
RET NZ C0
If @PARAM returned NZ (an answer it cannot read), return NZ to PROMPT, which asks again (source: NZ - re-input).
25AF
PUSH HL E5
Save Register Pair HL, the response byte, on the stack for RETADR (source: save response dest).
25B0
LD A,(286BH) 3A 6B 28LD A,(FAKERES)
Load Register A with the byte at 286BH, FAKERES, the response of F: 80H for a number, 40H for Y, N, ON, OFF or an empty value, 20H plus the length for a string (source: p/u response).
25B3VALUE
LD BC,0000H 01 00 00
VALUE: load Register Pair BC with the value of F, which @PARAM stored into 25B4H-25B5H (0000H in the file) (source: p/u value).
25B6
INC HL 23
Increment Register Pair HL to the word after the response byte, the address of the parameter's value (source: HL => parm address).
25B7
LD E,(HL) 5E
Load Register E with the low byte of that address from Register Pair HL (source: p/u parm address).
25B8
INC HL 23
Increment Register Pair HL to the high byte of the address.
25B9
LD D,(HL) 56
Load Register D with the high byte from Register Pair HL: Register Pair DE = the address of the parameter's value.
25BA
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL: Register Pair HL = the address of the value (source: HL => parm lsb).
25BB
LD (HL),C 71
Store Register C, the low byte of the answer, into the value at Register Pair HL, before the answer is checked (source: stuff response in table).
25BC
LD HL,25C7H 21 C7 25LD HL,RETADR
Point Register Pair HL to 25C7H, RETADR, where the check routine is to return (source: put RET addr on stack).
25BF
PUSH HL E5
Save Register Pair HL, 25C7H, on the stack as the check routine's return address.
25C0
LD L,(IY+05H) FD 6E 05
Load Register L with the low byte of the check routine's address (IY+05H), Index Register IY holding the entry's address (source: p/u addr of range).
25C3
LD H,(IY+06H) FD 66 06
Load Register H with the high byte of the check routine's address (IY+06H), Index Register IY holding the entry's address (source: checking in HL).
25C6
JP (HL) E9
Jump to the check routine at Register Pair HL with Register A = FAKERES and Register Pair BC = the value; it returns to 25C7H with Z for a good value (source: routine sets Z for stat).
25C7RETADR
POP HL E1
RETADR: restore Register Pair HL from the stack: the parameter's response byte, saved at 25AFH (source: HL => response byte).
25C8
RET NZ C0
If the check returned NZ, return NZ to PROMPT, which asks again; the response byte is left as it was, the refused low byte stays in the value (source: don't change if NZ).
25C9
LD (HL),80H 36 80
Store 80H into the response byte at Register Pair HL: the parameter counts as given for STFPRMS (source: else stuff non-zero).
25CB
RET C9
Return Z to PROMPT at 254DH (source: value for response).

25CCH - Member 3 (FORMS): STFPRMS, Storing into the Filter

STFPRMS goes through RESPTAB (27E4H): seven entries of the response byte's address and the offset in the data area (CHARS, INDENT, LINES, MARGIN, PAGE, the To byte and the From byte of XLATE), then three of the response byte's address alone for TAB, FFHARD and ADDLF. For each parameter whose response byte is nonzero it stores the low byte of the value into the filter's own data area (Index Register IX, set from DATAREA's operand), by patching the displacement of an LD (IX+d),C, and for the switches builds a SET or RES of bit 2, 1 or 0 of the flag byte at offset 07H from Register B. The line counter is not touched.

25CCSTFPRMS
LD HL,27E4H 21 E4 27LD HL,RESPTAB
STFPRMS: point Register Pair HL to 27E4H, RESPTAB, the response bytes and data offsets (source: HL => response table).
25CFDATAREA
LD IX,0000H DD 21 00 00
DATAREA: load Index Register IX with the address of the filter's data area that DOINIT stored into 25D1H-25D2H (0000H in the file) (source: p/u data area pointer).
25D3
LD B,07H 06 07
Load Register B with 07H, the seven numbers (source: 7 numeric values).
25D5STUFLP
LD E,(HL) 5E
STUFLP: load Register E with the low byte of the response byte's address from Register Pair HL (source: p/u response address).
25D6
INC HL 23
Increment Register Pair HL to the high byte of the address.
25D7
LD D,(HL) 56
Load Register D with the high byte from Register Pair HL: Register Pair DE = the response byte.
25D8
INC HL 23
Increment Register Pair HL to the entry's offset in the data area (source: HL => $FF data offset).
25D9
LD C,(HL) 4E
Load Register C with the offset in the data area from Register Pair HL (source: p/u offset in data area).
25DA
INC HL 23
Increment Register Pair HL to the next entry of RESPTAB.
25DB
LD A,(DE) 1A
Load Register A with the response byte at Register Pair DE (source: p/u response).
25DC
OR A B7
OR Register A with itself to set the Z flag when the parameter was not given; the flags are kept for 25E6H (source: parm entered ?).
25DD
INC DE 13
Increment Register Pair DE to the word after the response byte, the address of the value (source: DE => parameter dest).
25DE
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL: Register Pair HL = the address of that word, Register Pair DE = the table pointer (source: xfer to HL).
25DF
LD A,(HL) 7E
Load Register A with the low byte of the value's address from Register Pair HL (source: set HL = (HL)).
25E0
INC HL 23
Increment Register Pair HL to the high byte of the address.
25E1
LD H,(HL) 66
Load Register H with the high byte of the value's address from Register Pair HL.
25E2
LD L,A 6F
Load Register L with Register A: Register Pair HL = the address of the value.
25E3
LD A,C 79
Load Register A with Register C, the offset in the data area (source: xfer offset to A).
25E4
LD C,(HL) 4E
Load Register C with the low byte of the value at Register Pair HL (source: p/u lsb of parm response).
25E5
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL: Register Pair HL = the table pointer again (source: recover HL (table ptr)).
25E6NOPOUT
NOPOUT: if the parameter was not given (Z from 25DCH), jump relative to NOPARM at 25EEH (source: no - don't stuff).
25E8
LD (25EDH),A 32 ED 25
Store Register A, the offset, into 25EDH, the displacement of the LD (IX+d),C at IXINST (source: modify offset in IX inst).
25EBIXINST
LD (IX+00H),C DD 71 00
IXINST: store Register C, the new setting, into the filter's data area at the offset patched into 25EDH (IX+00H in the file), Index Register IX holding the data area's address (source: xfer parm resp to $FF).
25EENOPARM
NOPARM: decrement Register B and, while numbers are left, jump relative to STUFLP at 25D5H (source: next entry).
25F0GETFLAG
LD B,03H 06 03
GETFLAG: load Register B with 03H, the three switches TAB, FFHARD and ADDLF; Register B less 1 is the bit of each in the flag byte (source: 3 flag values).
25F2FLOOP
LD E,(HL) 5E
FLOOP: load Register E with the low byte of the response byte's address from Register Pair HL (source: p/u response address).
25F3
INC HL 23
Increment Register Pair HL to the high byte of the address.
25F4
LD D,(HL) 56
Load Register D with the high byte from Register Pair HL: Register Pair DE = the response byte.
25F5
INC HL 23
Increment Register Pair HL to the next entry of RESPTAB.
25F6
LD A,(DE) 1A
Load Register A with the response byte at Register Pair DE (source: entered ?).
25F7
OR A B7
OR Register A with itself to set the Z flag when the switch was not given.
25F8
If the switch was not given, jump relative to NEXTFLG at 2616H (source: no - get next one).
25FA
INC DE 13
Increment Register Pair DE to the word after the response byte, the address of the value (source: pos to parm address).
25FB
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL: Register Pair HL = the address of that word, Register Pair DE = the table pointer (source: p/u parm).
25FC
LD A,(HL) 7E
Load Register A with the low byte of the value's address from Register Pair HL (source: set HL = (HL)).
25FD
INC HL 23
Increment Register Pair HL to the high byte of the address.
25FE
LD H,(HL) 66
Load Register H with the high byte of the value's address from Register Pair HL.
25FF
LD L,A 6F
Load Register L with Register A: Register Pair HL = the address of the value.
2600
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL: Register Pair DE = the value's address, Register Pair HL = the table pointer (source: put into DE).
2601
LD C,86H 0E 86
Load Register C with 86H, the second opcode byte of RES 0,(IX+d) (source: default = reset bit inst).
2603
LD A,(DE) 1A
Load Register A with the low byte of the switch's value at Register Pair DE: FFH for ON, 00H for OFF (source: p/u lsb of parm).
2604
OR A B7
OR Register A with itself to set the Z flag when the switch is OFF (source: set ?).
2605
If it is OFF, jump relative to SKIPSET at 2609H to keep the RES (source: no - skip SET inst).
2607
SET 6,C CB F1
Set bit 6 of Register C: C6H, the second opcode byte of SET 0,(IX+d) (source: change to set bit inst).
2609SKIPSET
LD A,B 78
SKIPSET: load Register A with Register B, the switch's count, 3, 2 or 1 (source: p/u bit # (0-2)).
260A
DEC A 3D
Decrement Register A to the bit number: 2 for TAB, 1 for FFHARD, 0 for ADDLF.
260B
RLCA 07
Rotate Register A left; three rotations bring the bit number to bits 5-3 of the opcode byte (source: move to bits 3-5).
260C
RLCA 07
Rotate Register A left (second of the three rotations of the bit number).
260D
RLCA 07
Rotate Register A left (third rotation); the bit number is now in bits 5-3 of Register A.
260E
OR C B1
OR Register A with Register C, 86H or C6H: the opcode byte of RES or SET of that bit (source: post op code).
260F
LD (2615H),A 32 15 26
Store Register A into 2615H, the fourth byte of the instruction at IXINST2 (source: change RES b,(IX+nn) ins).
2612IXINST2
RES 0,(IX+07H) DD CB 07 86
IXINST2: set or reset the bit built at 2615H in the filter's flag byte (IX+07H), Index Register IX holding the data area's address; RES 0 in the file (source: set/reset bit B in $FF).
2616NEXTFLG
NEXTFLG: decrement Register B and, while switches are left, jump relative to FLOOP at 25F2H (source: get next flag).
2618
RET C9
Return to 2486H, which jumps to EXIT for 0000H (source: done - RETurn).

2619H - Member 3 (FORMS): INITVAL, the Present Values

INITVAL goes through the first five entries of RESPTAB, CHARS, INDENT, LINES, MARGIN and PAGE, and stores the filter's present setting (from its live data area, DATAREA's operand) into the low byte of the value of each one that was not given, so that the checks compare a new value with the settings that stay; with QUERY it does so for those given as well, so that the prompts start from the present values. The response bytes are not changed: a number given on the line with QUERY is replaced by the present value and then stored back as it is.

2619INITVAL
LD B,05H 06 05
INITVAL: load Register B with 05H, the five numbers CHARS, INDENT, LINES, MARGIN and PAGE (source: 5 values to stuff).
261B
LD HL,27E4H 21 E4 27LD HL,RESPTAB
Point Register Pair HL to 27E4H, RESPTAB, the response bytes and data offsets (source: HL => response and offsets).
261ESDLP
LD E,(HL) 5E
SDLP: load Register E with the low byte of the response byte's address from Register Pair HL (source: p/u response byte addr).
261F
INC HL 23
Increment Register Pair HL to the high byte of the address.
2620
LD D,(HL) 56
Load Register D with the high byte from Register Pair HL: Register Pair DE = the response byte.
2621
INC HL 23
Increment Register Pair HL to the entry's offset in the data area.
2622
LD A,(DE) 1A
Load Register A with the response byte at Register Pair DE, kept in Register A for the test at 2637H (source: p/u response byte).
2623
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL: Register Pair HL = the response byte, Register Pair DE = the table pointer.
2624
INC HL 23
Increment Register Pair HL to the word after the response byte, the address of the value (source: parm address after resp).
2625
LD C,(HL) 4E
Load Register C with the low byte of the value's address from Register Pair HL (source: p/u lsb).
2626
INC HL 23
Increment Register Pair HL to the high byte of the address.
2627
LD H,(HL) 66
Load Register H with the high byte of the value's address from Register Pair HL (source: p/u msb).
2628
LD L,C 69
Load Register L with Register C: Register Pair HL = the address of the value (source: HL = (HL)).
2629
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL: Register Pair DE = the value's address, Register Pair HL = the table pointer at the offset (source: get back to DE).
262A
PUSH DE D5
Save Register Pair DE, the value's address, on the stack (source: save HL and DE).
262B
PUSH HL E5
Save Register Pair HL, the table pointer, on the stack.
262C
LD E,(HL) 5E
Load Register E with the offset in the data area from Register Pair HL (source: p/u offset).
262D
LD D,00H 16 00
Load Register D with 00H: Register Pair DE = the offset (source: DE = offset to default).
262F
LD HL,(25D1H) 2A D1 25
Load Register Pair HL with the word at 25D1H, the address of the filter's data area (source: HL => data area).
2632
ADD HL,DE 19
Add Register Pair DE, the offset, to Register Pair HL: the setting's byte in the filter.
2633
LD C,(HL) 4E
Load Register C with the filter's present setting from Register Pair HL (source: p/u default value).
2634
POP HL E1
Restore Register Pair HL, the table pointer, from the stack (source: restore regs).
2635
POP DE D1
Restore Register Pair DE, the value's address, from the stack.
2636
INC HL 23
Increment Register Pair HL past the offset to the next entry of RESPTAB (source: posn to next entry).
2637
OR A B7
OR Register A, the response byte, with itself to set the Z flag when the parameter was not given (source: parm entered ?).
2638
If it was not given, jump relative to STFDEF at 2640H to store the present setting (source: no - stuff default).
263A
LD A,(27AAH) 3A AA 27LD A,(QRESP)
Load Register A with the byte at 27AAH, QRESP, the response byte of QUERY (source: Query parm used?).
263D
OR A B7
OR Register A with itself to set the Z flag when QUERY was not given.
263E
If QUERY was not given, jump relative to PRMENT at 2642H and keep the value given (source: no - don't stuff).
2640STFDEF
LD A,C 79
STFDEF: load Register A with Register C, the filter's present setting (source: yes - stuff default).
2641
LD (DE),A 12
Store Register A into the low byte of the value at Register Pair DE; the high byte is left as it was.
2642PRMENT
PRMENT: decrement Register B and, while numbers are left, jump relative to SDLP at 261EH.
2644
RET C9
Return to 2476H, where DSFORMS writes the default texts (source: done).

2645H - Member 3 (FORMS): The Check Routines

Each routine receives Register A = the response byte and Register Pair BC = the value, and returns Z for a good value. PAGE and LINES must be numbers 1-255 with LINES not more than PAGE; CHARS a number 1-255 or a switch (OFF is 0, no wrap-around; ON or CHARS alone is 255); MARGIN and INDENT numbers 0-255 whose sum, and MARGIN alone, are below CHARS, so that neither can be set while CHARS is 0. With QUERY a check also changes the settings still to be asked: a PAGE below LINES makes LINES equal to PAGE, a CHARS not above MARGIN plus INDENT and a MARGIN plus INDENT not below CHARS make INDENT (and for CHARS MARGIN) 0, and they mark those as answered and rewrite the defaults. The MARGIN check makes the same change without QUERY, which then ends in Parameter error at INDENT.

2645RPAGE
RPAGE: call MORE0? at 26D1H: Z for a number 1-255, with Register A = the value (source: number between 1 - 255 ?).
2648
RET NZ C0
If it is not, return NZ for Parameter error or a new question.
2649
LD A,(27CFH) 3A CF 27LD A,(LPARM)
Load Register A with the byte at 27CFH, the low byte of LPARM: LINES given, or the present LINES put there by INITVAL (source: p/u LINES value).
264C
DEC A 3D
Decrement Register A: LINES less 1, for a compare that is Carry when LINES is not more than PAGE.
264D
CP C B9
Compare Register A with Register C, the new PAGE: Carry when LINES is not more than PAGE (source: LINES > PAGE ?).
264E
PUSH AF F5
Save Register Pair AF, the result of the compare, on the stack (source: save status).
264F
LD A,(27AAH) 3A AA 27LD A,(QRESP)
Load Register A with the byte at 27AAH, QRESP, the response byte of QUERY (source: Query parm used?).
2652
OR A B7
OR Register A with itself to set the Z flag when QUERY was not given.
2653
If QUERY was given, jump relative to PQUERY at 2658H (source: go if so).
2655
POP AF F1
Restore Register Pair AF, the result of the compare (source: no).
2656
Jump relative to VALID2? at 26CAH: Z when LINES is not more than PAGE, else NZ, Parameter error; LINES is not lowered on this path (source: return NZ if L>P).
2658PQUERY
POP AF F1
PQUERY: restore Register Pair AF, the result of the compare (source: L > P ?).
2659
If LINES is not more than PAGE (Carry), jump relative to SETZ at 2668H for Z (source: no - set Z flag).
265B
LD A,C 79
Load Register A with Register C, the new PAGE (source: yes - set LINES = PAGE).
265C
LD (29E5H),A 32 E5 29
Store Register A into 29E5H, the LINES byte of DUPDA, so that the LINES prompt shows it.
265F
LD (278FH),A 32 8F 27LD (LRESP),A
Store Register A, a number from 1 up, into 278FH, LRESP, the response byte of LINES: LINES counts as given (source: pretend that LINES was).
2662
LD (27CFH),A 32 CF 27LD (LPARM),A
Store Register A into 27CFH, the low byte of LPARM: LINES becomes PAGE (source: responded to).
2665
Call DSFORMS at 2489H to rewrite the default texts from DUPDA (source: reset defaults).
2668SETZ
CP A BF
SETZ: compare Register A with itself to set the Z flag, a good value (source: set Z flag).
2669
RET C9
Return Z to the caller, the check routine's sign of a good value.
266ARLINES
RLINES: call MORE0? at 26D1H: Z for a number 1-255, with Register A = the value (source: number between 1 - 255 ?).
266D
RET NZ C0
If it is not a number 1-255, return NZ, a bad value.
266E
DEC A 3D
Decrement Register A: the new LINES less 1, for a compare with PAGE.
266F
LD HL,27D3H 21 D3 27LD HL,PPARM
Point Register Pair HL to 27D3H, the low byte of PPARM: PAGE given, answered, or the present PAGE (source: HL => page length).
2672
Jump relative to VALID1? at 26C9H: Z when LINES less 1 is below PAGE (source: set status accordingly).
2674RCHARS
BIT 6,A CB 77
RCHARS: test bit 6 of Register A, the response byte: set when CHARS was given as a switch, alone, ON, OFF, Y or N (source: flag response ?).
2676
If it is a switch, jump relative to SETZ at 2668H: good, with no test against MARGIN and INDENT (source: yes - set Z).
2678
Call MORE0? at 26D1H: Z for a number 1-255, with Register A = the value (source: no - more than zero ?).
267B
RET NZ C0
If it is not, return NZ; CHARS=0 is refused, OFF is the switch.
267C
LD A,(27AAH) 3A AA 27LD A,(QRESP)
Load Register A with the byte at 27AAH, QRESP, the response byte of QUERY (source: Query parm used?).
267F
OR A B7
OR Register A with itself to set the Z flag when QUERY was not given.
2680
RET Z C8
Without QUERY, return Z: CHARS given on the line is not compared with the present MARGIN and INDENT (source: return if not).
2681
LD HL,27D1H 21 D1 27LD HL,MPARM
Point Register Pair HL to 27D1H, the low byte of MPARM, the MARGIN to be asked next (source: HL => margin value).
2684
LD A,(27CDH) 3A CD 27LD A,(IPARM)
Load Register A with the byte at 27CDH, the low byte of IPARM, the INDENT (source: A = indent value).
2687
ADD A,(HL) 86
Add the MARGIN at Register Pair HL, 27D1H, to Register A: INDENT plus MARGIN (source: A = indent + margin).
2688
CP C B9
Compare Register A with Register C, the new CHARS (source: less than CHARS ?).
2689
If INDENT plus MARGIN is below CHARS (Carry), jump relative to SETZ at 2668H (source: yes - set Z).
268B
XOR A AF
Clear Register A to 00H for INDENT and MARGIN (source: reset INDENT and MARGIN=0).
268C
LD (29E9H),A 32 E9 29
Store Register A, 00H, into 29E9H, the INDENT byte of DUPDA.
268F
LD (29ECH),A 32 EC 29
Store Register A, 00H, into 29ECH, the MARGIN byte of DUPDA.
2692
LD (27CDH),A 32 CD 27LD (IPARM),A
Store Register A, 00H, into 27CDH, the low byte of IPARM.
2695
LD (27D1H),A 32 D1 27LD (MPARM),A
Store Register A, 00H, into 27D1H, the low byte of MPARM.
2698
INC A 3C
Increment Register A to 01H, a nonzero response byte (source: pretend that INDENT and).
2699
LD (2799H),A 32 99 27LD (MRESP),A
Store Register A, 01H, into 2799H, MRESP: MARGIN counts as given (source: MARGIN were responded).
269CCHNGIND
LD (2786H),A 32 86 27LD (IRESP),A
CHNGIND: store Register A, 01H, into 2786H, IRESP: INDENT counts as given; a response byte 01H is not a number for NUMERIC, so a check of INDENT that follows on the CKCOMM path refuses it (source: to).
269F
Call DSFORMS at 2489H to rewrite the default texts from DUPDA (source: change defaults).
26A2
XOR A AF
Clear Register A to 00H, which sets the Z flag, a good value (source: set Z and RETurn).
26A3
RET C9
Return Z to the caller: from RCHARS, CHARS is good and INDENT and MARGIN are 0; from RMARGIN (26BCH), MARGIN is good and INDENT is 0.
26A4RMARGIN
RMARGIN: call NUMERIC at 26DAH: Z for a number 0-255, with Register A = the value (source: number between 0 - 255 ?).
26A7
RET NZ C0
If it is not a number 0-255, return NZ, a bad value.
26A8
Call VALID? at 26C6H: Z when the MARGIN in Register A is below CHARS; with CHARS 0 nothing is (source: yes - less than CHARS ?).
26AB
RET NZ C0
If it is not below CHARS, return NZ (source: no - RETurn NZ).
26AC
LD A,(27CDH) 3A CD 27LD A,(IPARM)
Load Register A with the byte at 27CDH, the low byte of IPARM, the INDENT (source: p/u INDENT).
26AF
ADD A,C 81
Add Register C, the new MARGIN, to Register A (source: add to MARGIN).
26B0
Call VALID? at 26C6H: Z when MARGIN plus INDENT is below CHARS (source: M + I < CHARS ?).
26B3
RET Z C8
If MARGIN plus INDENT is below CHARS, return Z, a good value (source: yes - RETurn Z).
26B4
XOR A AF
Clear Register A to 00H for INDENT (source: no - set INDENT default).
26B5
LD (27CDH),A 32 CD 27LD (IPARM),A
Store Register A, 00H, into 27CDH, the low byte of IPARM (source: equal to zero).
26B8
LD (29E9H),A 32 E9 29
Store Register A, 00H, into 29E9H, the INDENT byte of DUPDA.
26BB
INC A 3C
Increment Register A to 01H, the response byte that marks INDENT as given (source: pretend I was responded).
26BC
Jump relative to CHNGIND at 269CH, which stores it into IRESP, rewrites the defaults and returns Z (source: to).
26BERINDENT
RINDENT: call NUMERIC at 26DAH: Z for a number 0-255, with Register A = the value (source: number between 0 - 255 ?).
26C1
RET NZ C0
If it is not a number 0-255, return NZ, a bad value.
26C2
LD A,(27D1H) 3A D1 27LD A,(MPARM)
Load Register A with the byte at 27D1H, the low byte of MPARM, the MARGIN (source: p/u MARGIN val).
26C5
ADD A,C 81
Add Register C, the new INDENT, to Register A: MARGIN plus INDENT, and fall into VALID? (source: A = MARGIN + INDENT).
26C6VALID?
LD HL,27CBH 21 CB 27LD HL,CPARM
VALID?: point Register Pair HL to 27CBH, the low byte of CPARM, the CHARS given, answered or present (source: HL => characters/line).
26C9VALID1?
CP (HL) BE
VALID1?: compare Register A with the byte at Register Pair HL (source: response > (HL) ?).
26CAVALID2?
VALID2?: if Register A is not below it (No Carry), jump relative to SETNZ at 26CEH (source: yes - reset Z flag).
26CC
CP A BF
Compare Register A with itself to set the Z flag, a good value (source: no - set Z flag).
26CD
RET C9
Return Z to the caller: the value in Register A is below the byte at Register Pair HL.
26CESETNZ
XOR A AF
SETNZ: clear Register A to 00H (source: reset Z flag).
26CF
INC A 3C
Increment Register A to 01H, which clears the Z flag.
26D0
RET C9
Return NZ to the caller: a bad value, with Register A = 01H.
26D1MORE0?
MORE0?: call NUMERIC at 26DAH: Z for a number 0-255, with Register A = the value (source: is the response a number).
26D4
RET NZ C0
If it is not, return NZ (source: between 0 - 255 ?).
26D5
OR A B7
OR Register A, the value, with itself to set the Z flag for 0 (source: is the response zero ?).
26D6
If the value is 0, jump relative to SETNZ at 26CEH for NZ (source: yes - reset Z flag).
26D8
CP A BF
Compare Register A with itself to set the Z flag, a value 1-255 (source: no - set Z flag).
26D9
RET C9
Return Z with Register A = the value, a number from 1 to 255.
26DANUMERIC
AND 80H E6 80
NUMERIC: mask Register A, the response byte, with 80H, the bit that @PARAM sets for a number (source: bit 7 is set if the).
26DC
XOR 80H EE 80
Flip bit 7 of Register A with XOR 80H: zero for a number (source: response is numeric).
26DE
RET NZ C0
If the response is not a number, return NZ with Register A = 80H.
26DF
INC B 04
Increment Register B, the high byte of the value (source: is the response only).
26E0
DEC B 05
Decrement Register B back: the Z flag is set when the high byte is 00H, a value 0-255 (source: 1 byte (msb = 0) ?).
26E1
LD A,C 79
Load Register A with Register C, the value (source: set A = response).
26E2
RET C9
Return Z for a number 0-255, NZ for 256 or more, with Register A = the low byte (source: yes (Z), no (NZ)).
26E3FLAG?
AND 40H E6 40
FLAG?: mask Register A, the response byte, with 40H, the bit that @PARAM sets for a switch (source: bit 6 is set if the).
26E5
XOR 40H EE 40
Flip bit 6 of Register A with XOR 40H: zero for a switch (source: response is a flag).
26E7
RET C9
Return Z for a switch, NZ for a number or a string: ADDLF=1 is Parameter error (source: yes (Z), no (NZ)).

26E8H - Member 3 (FORMS): XFERON, XFER, DSP and DSPLY

XFERON and XFER copy three characters into a setting of VALUES. DSP shows the character in Register C, DSPLY the text at Register Pair HL; both keep Register Pair DE and go to IOERR on an error.

26E8XFERON
LD HL,2873H 21 73 28LD HL,ONSTR
XFERON: point Register Pair HL to 2873H, ONSTR, a space and ON, and fall into XFER (source: HL => ON).
26EBXFER
LD BC,0003H 01 03 00
XFER: load Register Pair BC with 0003H, the three characters to copy (source: 3 chars to xfer).
26EE
LDIR ED B0
Copy three characters from Register Pair HL to Register Pair DE with LDIR (Register Pair BC = 0003H).
26F0
RET C9
Return to DSFORMS with Register Pair DE three characters further on.
26F1DSP
PUSH DE D5
DSP: save Register Pair DE on the stack (source: save DE).
26F2
LD A,02H 3E 02
Load Register A with 02H, SVC 2, @DSP, which shows the character in Register C (source: output byte).
26F4
RST 28H EF
Call @DSP with RST 28H (BOOT/SYS) to show the character in Register C.
26F5
Jump relative to EXDSP at 26FBH, the end that DSP and DSPLY share.
26F7DSPLY
PUSH DE D5
DSPLY: save Register Pair DE on the stack (source: save DE).
26F8
LD A,0AH 3E 0A
Load Register A with 0AH, SVC 10, @DSPLY, which shows the text at Register Pair HL up to its 03H or 0DH.
26FA
RST 28H EF
Call @DSPLY with RST 28H (BOOT/SYS) to show the text at Register Pair HL (source: display it).
26FBEXDSP
POP DE D1
EXDSP: restore Register Pair DE from the stack.
26FC
RET Z C8
Return if the display returned Z (source: return if good).
26FD
Otherwise jump to IOERR at 240EH with Register A = the error number (source: NZ - I/O error).

2700H - Member 3 (FORMS): DOINIT, HEXDEC, HEX8 and INPUT

DOINIT finds the module $FF with @GTMOD: FORMS/FLT's header is a JR, the word of its last byte, the name length and $FF, the word of its DCB and a word 0000H, so its data area begins four bytes after the end of the name, where @GTMOD leaves Register Pair DE. It keeps that address in DATAREA's operand and copies the ten bytes to DUPDA (29E3H), the copy that DSFORMS shows, with Index Register IX pointing there. Any module named $FF is taken, attached to a device or not. HEXDEC writes Register A as three decimal characters, HEX8 as two hex digits, and INPUT reads an answer of up to three keys.

2700DOINIT
PUSH HL E5
DOINIT: save Register Pair HL, the pointer to the command line, on the stack (source: save command ptr).
2701
LD A,65H 3E 65
Load Register A with 65H, SVC 101, @FLAGS, which returns the address of the system flags in Index Register IY (source: get system flags).
2703
RST 28H EF
Call @FLAGS with RST 28H (the SYS0/SYS code at 196AH); nothing in FORMS reads Index Register IY before 24FEH and 252CH load it with 280EH.
2704
LD DE,286FH 11 6F 28LD DE,$FF
Point Register Pair DE to 286FH, the name $FF ended by 03H, the module name of FORMS/FLT (source: DE => $FF).
2707
LD A,53H 3E 53
Load Register A with 53H, SVC 83, @GTMOD, which looks for a module by its name (source: find start).
2709
RST 28H EF
Call @GTMOD with RST 28H (the SYS0/SYS stub 19B2H that loads SYS12/SYS): Z with Register Pair HL = the module and Register Pair DE = the byte after its name, else NZ.
270A
If no module $FF is in memory, jump to NOPF at 2419H: Forms Filter not Resident, FFFFH (source: abort if Forms/Flt missing).
270D
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL: Register Pair HL = the byte after the name, the word of the filter's DCB (source: HL => data area).
270E
LD BC,0004H 01 04 00
Load Register Pair BC with 0004H, the DCB word and the word 0000H before the data area (source: add 4 to ptr).
2711
ADD HL,BC 09
Add Register Pair BC to Register Pair HL: the address of the filter's data area, PFDATA$.
2712
LD (25D1H),HL 22 D1 25
Store Register Pair HL into 25D1H-25D2H, the operand of the LD IX at DATAREA, read also by 245CH and 262FH (source: save $FF data pointer).
2715
LD DE,29E3H 11 E3 29LD DE,DUPDA
Point Register Pair DE to 29E3H, DUPDA, ten bytes after the member, not loaded (source: DE => duplicate D area).
2718
PUSH DE D5
Save Register Pair DE, 29E3H, on the stack for Index Register IX (source: save ptr).
2719
LD C,0AH 0E 0A
Load Register C with 0AH; Register B is 00H from 270EH, so Register Pair BC = 000AH, the ten bytes of the data area (source: BC = 10 bytes to xfer).
271B
LDIR ED B0
Copy the data area from Register Pair HL to DUPDA at Register Pair DE with LDIR (Register Pair BC = 000AH).
271D
POP IX DD E1
Restore Index Register IX from the stack: 29E3H, DUPDA (source: IX pts to data area).
271F
POP HL E1
Restore Register Pair HL, the pointer to the command line (source: recover cmdline ptr).
2720
RET C9
Return to FORMS at 242CH (source: and RETurn).
2721HEXDEC
PUSH BC C5
HEXDEC: save Register Pair BC on the stack, as @HEXDEC uses Register B (source: save regs).
2722
PUSH HL E5
Save Register Pair HL on the stack, as @HEXDEC uses it for the number.
2723
PUSH AF F5
Save Register Pair AF, the value and the flags of the caller, on the stack.
2724
PUSH DE D5
Save Register Pair DE, the place for the three characters, on the stack (source: save real destination).
2725
LD DE,29DEH 11 DE 29LD DE,TEMBUF
Point Register Pair DE to 29DEH, TEMBUF, five bytes after the member, not loaded (source: DE => temporary buffer).
2728
LD H,00H 26 00
Load Register H with 00H, the high byte of the number (source: xfer # to HL).
272A
LD L,A 6F
Load Register L with Register A: Register Pair HL = the value 0-255.
272B
LD A,61H 3E 61
Load Register A with 61H, SVC 97, @HEXDEC, which writes Register Pair HL as five decimal characters at Register Pair DE, leading zeros as spaces (source: convert to ASCII).
272D
RST 28H EF
Call @HEXDEC with RST 28H (BOOT/SYS code at 06F6H); it returns with Register Pair DE after the fifth character, 29E3H.
272E
DEC DE 1B
Decrement Register Pair DE (source: pos to 3-byte field).
272F
DEC DE 1B
Decrement Register Pair DE again, the second of the three steps back.
2730
DEC DE 1B
Decrement Register Pair DE a third time: 29E0H, the last three of the five characters.
2731
POP HL E1
Restore Register Pair HL from the stack: the place for the characters, saved from Register Pair DE (source: recover user buffer).
2732
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL: Register Pair HL = 29E0H, Register Pair DE = the place in VALUES (source: HL to #, DE to user buff).
2733
LD BC,0003H 01 03 00
Load Register Pair BC with 0003H, the three characters.
2736
LDIR ED B0
Copy the three characters from Register Pair HL, 29E0H, to Register Pair DE with LDIR (Register Pair BC = 0003H) (source: move the ASCII number).
2738
POP AF F1
Restore Register Pair AF, the value and the flags of the caller (source: recover #).
2739
POP HL E1
Restore Register Pair HL (source: and other regs).
273A
POP BC C1
Restore Register Pair BC, saved at 2721H, from the stack.
273B
RET C9
Return to DSFORMS with the flags as they were at the call.
273CHEX8
PUSH BC C5
HEX8: save Register Pair BC on the stack (source: save regs).
273D
LD C,A 4F
Load Register C with Register A, the byte, for @HEX8 (source: xfer char to C).
273E
LD A,62H 3E 62
Load Register A with 62H, SVC 98, @HEX8, which writes Register C as two hex digits at Register Pair HL and moves Register Pair HL past them (source: do it).
2740
RST 28H EF
Call @HEX8 with RST 28H (BOOT/SYS code at 07C2H).
2741
POP BC C1
Restore Register Pair BC, saved at 273CH, from the stack.
2742
RET C9
Return to DSFORMS with Register Pair HL past the two digits (source: and RETurn).
2743INPUT
PUSH HL E5
INPUT: save Register Pair HL, the prompt pointer, on the stack (source: save regs).
2744
PUSH DE D5
Save Register Pair DE, the response byte's address, on the stack.
2745
PUSH BC C5
Save Register Pair BC, Register B the prompts left, on the stack.
2746
LD BC,0300H 01 00 03
Load Register Pair BC with 0300H: Register B = 3, the most keys of an answer, Register C = 0 (source: 3 chars max).
2749
LD HL,2802H 21 02 28LD HL,INBUFF$
Point Register Pair HL to 2802H, INBUFF$, right after the text (F= at FAKEPRM (source: key input buffer).
274C
LD A,09H 3E 09
Load Register A with 09H, SVC 9, @KEYIN, which reads a line from the keyboard (source: input line).
274E
RST 28H EF
Call @KEYIN with RST 28H (BOOT/SYS) to read up to three keys and the ENTER into Register Pair HL, 2802H; Register B = the keys typed.
274F
If BREAK was pressed (Carry), jump to ABORT at 241FH: FFFFH, nothing stored into the filter (source: abort if BREAK).
2752
INC B 04
Increment Register B, the keys typed (source: set Z flag if).
2753
DEC B 05
Decrement Register B back: the Z flag is set when ENTER was pressed alone (source: no input).
2754
POP BC C1
Restore Register Pair BC, the count of prompts in Register B (source: restore regs).
2755
POP DE D1
Restore Register Pair DE, the response byte's address.
2756
POP HL E1
Restore Register Pair HL, the prompt pointer.
2757
RET C9
Return to PROMPT with Z for ENTER alone, NZ for an answer (source: and RETurn with condition).

2758H - Member 3 (FORMS): The Tables and Texts

DEFTAB is the ten bytes of the filter's data area as FORMS/FLT starts: PAGE 66 (offset 00H), the line counter 0 (01H), LINES 66 (02H), the character counter 0 (03H), the From and To bytes of XLATE (04H, 05H), INDENT 0 (06H), the flag byte 04H (07H: bit 0 ADDLF, bit 1 FFHARD, bit 2 TAB, so TAB starts on), CHARS 0 (08H) and MARGIN 0 (09H). PRMTBL$ is an enhanced table for @PARAM: each entry a type byte (bits 7-5 the kinds of value it takes, bit 4 a one letter abbreviation allowed, bits 3-0 the length of the name), the name, the response byte and the address of the value word; @PARAM does not check the kinds.

2758-2761DEFTAB
DEFB 42H, 00H, 42H, 00H, 00H, 00H, 00H, 04H, 00H, 00H 42 00 42 00 00 00 00 04 00 00
DEFTAB, 2758H-2761H: the starting values that DEFAULT copies into the filter and into DUPDA (245CH-246FH): PAGE 66, line counter 0, LINES 66, character counter 0, XLATE 00H to 00H, INDENT 0, flags 04H (TAB on), CHARS 0 and MARGIN 0.
2762PRMTBL$
DEFB 80H 80
PRMTBL$, 2762H: 80H, the mark of an enhanced parameter table for @PARAM (source: 6.2 @PARAM).
2763-2768
DEFB 55H / DEFM "ADDLF" 55 41 44 44 4C 46
2763H-2768H: type 55H (a switch, a one letter abbreviation allowed, a name of 5 characters) and the name ADDLF, or A.
2769ARESP
DEFB 00H 00
ARESP, 2769H: the response byte of ADDLF, set by @PARAM and by STUFVAL, read by STFPRMS through RESPTAB (27FDH).
276A-276B
DEFW 27D7H D7 27
276AH-276BH: where ADDLF's value goes, APARM at 27D7H.
276C-2771
DEFB 0D5H / DEFM "CHARS" D5 43 48 41 52 53
276CH-2771H: type D5H (a switch or a number, a one letter abbreviation allowed, 5 characters) and the name CHARS, or C.
2772CRESP
DEFB 00H 00
CRESP, 2772H: the response byte of CHARS: 80H for a number, 40H for a switch; read by INITVAL, CKCOMM, RCHARS and STFPRMS.
2773-2774
DEFW 27CBH CB 27
2773H-2774H: where CHARS's value goes, CPARM at 27CBH.
2775-277B
DEFB 56H / DEFM "FFHARD" 56 46 46 48 41 52 44
2775H-277BH: type 56H (a switch, a one letter abbreviation allowed, 6 characters) and the name FFHARD, or F.
277CFRESP
DEFB 00H 00
FRESP, 277CH: the response byte of FFHARD, read by STFPRMS through RESPTAB (27FBH).
277D-277E
DEFW 27D9H D9 27
277DH-277EH: where FFHARD's value goes, FPARM at 27D9H.
277F-2785
DEFB 96H / DEFM "INDENT" 96 49 4E 44 45 4E 54
277FH-2785H: type 96H (a number, a one letter abbreviation allowed, 6 characters) and the name INDENT, or I.
2786IRESP
DEFB 00H 00
IRESP, 2786H: the response byte of INDENT; RCHARS and RMARGIN set it to 01H (269CH) when they make INDENT 0.
2787-2788
DEFW 27CDH CD 27
2787H-2788H: where INDENT's value goes, IPARM at 27CDH.
2789-278E
DEFB 95H / DEFM "LINES" 95 4C 49 4E 45 53
2789H-278EH: type 95H (a number, a one letter abbreviation allowed, 5 characters) and the name LINES, or L.
278FLRESP
DEFB 00H 00
LRESP, 278FH: the response byte of LINES; PQUERY sets it to the new PAGE (265FH) when it makes LINES equal to PAGE.
2790-2791
DEFW 27CFH CF 27
2790H-2791H: where LINES's value goes, LPARM at 27CFH.
2792-2798
DEFB 96H / DEFM "MARGIN" 96 4D 41 52 47 49 4E
2792H-2798H: type 96H (a number, a one letter abbreviation allowed, 6 characters) and the name MARGIN, or M.
2799MRESP
DEFB 00H 00
MRESP, 2799H: the response byte of MARGIN; RCHARS sets it to 01H (2699H) when it makes MARGIN 0.
279A-279B
DEFW 27D1H D1 27
279AH-279BH: where MARGIN's value goes, MPARM at 27D1H.
279C-27A0
DEFB 94H / DEFM "PAGE" 94 50 41 47 45
279CH-27A0H: type 94H (a number, a one letter abbreviation allowed, 4 characters) and the name PAGE, or P.
27A1PRESP
DEFB 00H 00
PRESP, 27A1H: the response byte of PAGE, read by INITVAL, CKCOMM and STFPRMS.
27A2-27A3
DEFW 27D3H D3 27
27A2H-27A3H: where PAGE's value goes, PPARM at 27D3H.
27A4-27A9
DEFB 55H / DEFM "QUERY" 55 51 55 45 52 59
27A4H-27A9H: type 55H (a switch, a one letter abbreviation allowed, 5 characters) and the name QUERY, or Q.
27AAQRESP
DEFB 00H 00
QRESP, 27AAH: the response byte of QUERY, the only thing tested for it (2479H, 263AH, 264FH, 267CH): QUERY=NO asks all the same.
27AB-27AC
DEFW 27C9H C9 27
27ABH-27ACH: where QUERY's value goes, QPARM at 27C9H, which nothing reads.
27AD-27B0
DEFB 53H / DEFM "TAB" 53 54 41 42
27ADH-27B0H: type 53H (a switch, a one letter abbreviation allowed, 3 characters) and the name TAB, or T.
27B1TRESP
DEFB 00H 00
TRESP, 27B1H: the response byte of TAB, read by STFPRMS through RESPTAB (27F9H).
27B2-27B3
DEFW 27DBH DB 27
27B2H-27B3H: where TAB's value goes, TPARM at 27DBH.
27B4-27B9
DEFB 95H / DEFM "XLATE" 95 58 4C 41 54 45
27B4H-27B9H: type 95H (a number, a one letter abbreviation allowed, 5 characters) and the name XLATE, or X: X'aabb' translates aa into bb.
27BAXTRESP
DEFB 00H 00
XTRESP, 27BAH: the response byte of XLATE, copied to XFRESP at 244AH; it serves the To byte.
27BB-27BC
DEFW 27D5H D5 27
27BBH-27BCH: where XLATE's value goes, XTPARM at 27D5H.
27BD-27C4
DEFB 57H / DEFM "DEFAULT" 57 44 45 46 41 55 4C 54
27BDH-27C4H: type 57H (a switch, a one letter abbreviation allowed, 7 characters) and the name DEFAULT, or D.
27C5DRESP
DEFB 00H 00
DRESP, 27C5H: the response byte of DEFAULT, the only thing tested for it (2456H): DEFAULT=NO puts the starting values back too.
27C6-27C7
DEFW 27DDH DD 27
27C6H-27C7H: where DEFAULT's value goes, DPARM at 27DDH, which nothing reads.
27C8
DEFB 00H 00
27C8H: the 00H where the next entry's type byte would be, the end of the table for @PARAM.
27C9-27CAQPARM
DEFW 0000H 00 00
QPARM, 27C9H-27CAH: the value of QUERY, stored by @PARAM and never read.
27CB-27CCCPARM
DEFW 0000H 00 00
CPARM, 27CBH-27CCH: the value of CHARS (FFFFH for CHARS alone or ON, 0000H for OFF); its low byte is the CHARS that VALID? (26C6H) compares with.
27CD-27CEIPARM
DEFW 0000H 00 00
IPARM, 27CDH-27CEH: the value of INDENT; its low byte is set by INITVAL and read by RCHARS (2684H) and RMARGIN (26ACH).
27CF-27D0LPARM
DEFW 0000H 00 00
LPARM, 27CFH-27D0H: the value of LINES; its low byte is read by RPAGE (2649H) and set by PQUERY (2662H).
27D1-27D2MPARM
DEFW 0000H 00 00
MPARM, 27D1H-27D2H: the value of MARGIN; its low byte is read by RCHARS (2681H) and RINDENT (26C2H).
27D3-27D4PPARM
DEFW 0000H 00 00
PPARM, 27D3H-27D4H: the value of PAGE; its low byte is read by RLINES through 266FH.
27D5-27D6XTPARM
DEFW 0000H 00 00
XTPARM, 27D5H-27D6H: the value of XLATE, X'aabb'; 244DH moves the From byte aa from 27D6H to XFPARM and leaves the To byte bb.
27D7-27D8APARM
DEFW 0000H 00 00
APARM, 27D7H-27D8H: the value of ADDLF, FFFFH or 0000H.
27D9-27DAFPARM
DEFW 0000H 00 00
FPARM, 27D9H-27DAH: the value of FFHARD, FFFFH or 0000H.
27DB-27DCTPARM
DEFW 0000H 00 00
TPARM, 27DBH-27DCH: the value of TAB, FFFFH or 0000H.
27DD-27DEDPARM
DEFW 0000H 00 00
DPARM, 27DDH-27DEH: the value of DEFAULT, stored by @PARAM and never read.
27DFXFRESP
DEFB 00H 00
XFRESP, 27DFH: the response byte of the From byte of XLATE, a copy of XTRESP (244AH) or set by STUFVAL; not in PRMTBL$.
27E0-27E1
DEFW 27E2H E2 27
27E0H-27E1H: the address of the From byte's value, XFPARM at 27E2H, after XFRESP as in a table entry.
27E2-27E3XFPARM
DEFW 0000H 00 00
XFPARM, 27E2H-27E3H: the value of the From byte of XLATE, its low byte stored at 2453H, its high byte 00H.
27E4-27F8RESPTAB
DEFW 2772H / DEFB 08H / DEFW 2786H / DEFB 06H / DEFW 278FH / DEFB 02H / DEFW 2799H / DEFB 09H / DEFW 27A1H / DEFB 00H / DEFW 27BAH / DEFB 05H / DEFW 27DFH / DEFB 04H 72 27 08 86 27 06 8F 27 02 99 27 09 A1 27 00 BA 27 05 DF 27 04
RESPTAB, 27E4H-27F8H: the seven numbers, each the address of its response byte and its offset in the data area: CHARS 08H, INDENT 06H, LINES 02H, MARGIN 09H, PAGE 00H, the To byte 05H and the From byte 04H; INITVAL uses the first five.
27F9-27FE
DEFW 27B1H, 277CH, 2769H B1 27 7C 27 69 27
27F9H-27FEH: the response bytes of the three switches for STFPRMS: TAB (bit 2), FFHARD (bit 1) and ADDLF (bit 0).
27FF-2801FAKEPRM
DEFM "(F=" 28 46 3D
FAKEPRM, 27FFH-2801H: the opening parenthesis, the name F and the equals sign that STUFVAL hands @PARAM with the answer that follows at once in INBUFF$.
2802-280DINBUFF$
DEFS 12
INBUFF$, 2802H-280DH: not in the file; the answer to a prompt, up to three keys and the 0DH, written by @KEYIN (274EH) and read by @PARAM through FAKEPRM.
280E-2816STRTAB
DEFB 80H / DEFW 27A1H, 29A2H, 2645H, 28A0H 80 A1 27 A2 29 45 26 A0 28
STRTAB, 280EH-2816H, the first entry: PAGE: a number, the response byte PRESP 27A1H, the prompt at 29A2H, the check RPAGE at 2645H, the default text SPAGE at 28A0H.
2817-281F
DEFB 80H / DEFW 278FH, 297AH, 266AH, 28ADH 80 8F 27 7A 29 6A 26 AD 28
2817H-281FH: LINES: a number, LRESP 278FH, the prompt at 297AH, the check RLINES at 266AH, the default SLINES at 28ADH.
2820-2828
DEFB 80H / DEFW 2772H, 2932H, 2674H, 28BAH 80 72 27 32 29 74 26 BA 28
2820H-2828H: CHARS: a number, CRESP 2772H, the prompt at 2932H, the check RCHARS at 2674H, the default SCHARS at 28BAH.
2829-2831
DEFB 80H / DEFW 2799H, 2992H, 26A4H, 28C7H 80 99 27 92 29 A4 26 C7 28
2829H-2831H: MARGIN: a number, MRESP 2799H, the prompt at 2992H, the check RMARGIN at 26A4H, the default SMARGIN at 28C7H.
2832-283A
DEFB 80H / DEFW 2786H, 2960H, 26BEH, 28D4H 80 86 27 60 29 BE 26 D4 28
2832H-283AH: INDENT: a number, IRESP 2786H, the prompt at 2960H, the check RINDENT at 26BEH, the default SINDENT at 28D4H.
283B-2843
DEFB 40H / DEFW 2769H, 2919H, 26E3H, 28E1H 40 69 27 19 29 E3 26 E1 28
283BH-2843H: ADDLF: a switch, ARESP 2769H, the prompt at 2919H, the check FLAG? at 26E3H, the default SADDLF at 28E1H.
2844-284C
DEFB 40H / DEFW 277CH, 294FH, 26E3H, 28EEH 40 7C 27 4F 29 E3 26 EE 28
2844H-284CH: FFHARD: a switch, FRESP 277CH, the prompt at 294FH, the check FLAG? at 26E3H, the default SFFHARD at 28EEH.
284D-2855
DEFB 40H / DEFW 27B1H, 29B8H, 26E3H, 28FBH 40 B1 27 B8 29 E3 26 FB 28
284DH-2855H: TAB: a switch, TRESP 27B1H, the prompt at 29B8H, the check FLAG? at 26E3H, the default STAB at 28FBH.
2856-285E
DEFB 80H / DEFW 27DFH, 29C7H, 26DAH, 2909H 80 DF 27 C7 29 DA 26 09 29
2856H-285EH: the From byte of XLATE: a number, XFRESP 27DFH, the prompt at 29C7H, the check NUMERIC at 26DAH, the default from 2909H, the X'00' before the arrow in VALUES.
285F-2867
DEFB 80H / DEFW 27BAH, 29D3H, 26DAH, 2912H 80 BA 27 D3 29 DA 26 12 29
285FH-2867H: the To byte of XLATE: a number, XTRESP 27BAH, the prompt at 29D3H, the check NUMERIC at 26DAH, the default from 2912H, the X'00' after the arrow.
2868FAKETAB
DEFB 80H 80
FAKETAB, 2868H: 80H, the mark of an enhanced table: the one entry with which STUFVAL reads an answer (source: 6.2 @PARAM).
2869
DEFB 00H 00
2869H: the type byte of the entry, written by PROMPTL (2534H) from the prompt's type plus 1, a name of one letter.
286A
DEFM "F" 46
286AH: the name F, one letter, the parameter that an answer is the value of.
286BFAKERES
DEFB 00H 00
FAKERES, 286BH: the response byte of F, set by @PARAM and read at 25B0H.
286C-286D
DEFW 25B4H B4 25
286CH-286DH: where F's value goes, 25B4H, the operand of the LD BC at VALUE (25B3H).
286E
DEFB 00H 00
286EH: the 00H where a second entry's type byte would be, which ends FAKETAB.
286F-2872$FF
DEFM "$FF" / DEFB 03H 24 46 46 03
286FH-2872H: the module name of FORMS/FLT, $FF, ended by 03H, for @GTMOD at 2709H.
2873-2875ONSTR
DEFM " ON" 20 4F 4E
ONSTR, 2873H-2875H: a space and ON, the text of a switch that is set, copied by XFERON.
2876-2878OFFSTR
DEFM "OFF" 4F 46 46
OFFSTR, 2876H-2878H: OFF, copied over SCHARS when CHARS is 0 (249FH).
2879-2892NOPF$
DEFM "Forms Filter not Resident" / DEFB 0DH 46 6F 72 6D 73 20 46 69 6C 74 65 72 20 6E 6F 74 20 52 65 73 69 64 65 6E 74 0D
NOPF$, 2879H-2892H: the message of NOPF (2419H) when no module $FF is in memory.
2893-2896ENDPROM
DEFM "? " / DEFB 0EH, 03H 3F 20 0E 03
ENDPROM, 2893H-2896H: the end of a prompt: a question mark, a space, 0EH that turns the cursor on and 03H, so that the answer follows on the line.
2897-289FVALUES
DEFM "PAGE = " 50 41 47 45 20 20 20 3D 20
VALUES, 2897H-289FH: the start of the settings that FORMS shows (2437H): the label of PAGE.
28A0-28ACSPAGE
DEFM " 66" / DEFB 0AH / DEFM "LINES = " 20 36 36 0A 4C 49 4E 45 53 20 20 3D 20
SPAGE, 28A0H-28ACH: PAGE in three characters, written by DSFORMS (24D0H), a line feed and the label of LINES.
28AD-28B9SLINES
DEFM " 66" / DEFB 0AH / DEFM "CHARS = " 20 36 36 0A 43 48 41 52 53 20 20 3D 20
SLINES, 28ADH-28B9H: LINES in three characters (24BEH), a line feed and the label of CHARS.
28BA-28C6SCHARS
DEFM "OFF" / DEFB 0AH / DEFM "MARGIN = " 4F 46 46 0A 4D 41 52 47 49 4E 20 3D 20
SCHARS, 28BAH-28C6H: CHARS in three characters or OFF (249AH, 24A2H), a line feed and the label of MARGIN.
28C7-28D3SMARGIN
DEFM " 0" / DEFB 0AH / DEFM "INDENT = " 20 20 30 0A 49 4E 44 45 4E 54 20 3D 20
SMARGIN, 28C7H-28D3H: MARGIN in three characters (24C7H), a line feed and the label of INDENT.
28D4-28E0SINDENT
DEFM " 0" / DEFB 0AH / DEFM "ADDLF = " 20 20 30 0A 41 44 44 4C 46 20 20 3D 20
SINDENT, 28D4H-28E0H: INDENT in three characters (24B5H), a line feed and the label of ADDLF.
28E1-28EDSADDLF
DEFM "OFF" / DEFB 0AH / DEFM "FFHARD = " 4F 46 46 0A 46 46 48 41 52 44 20 3D 20
SADDLF, 28E1H-28EDH: ADDLF, OFF or ON (2490H), a line feed and the label of FFHARD.
28EE-28FASFFHARD
DEFM "OFF" / DEFB 0AH / DEFM "TAB = " 4F 46 46 0A 54 41 42 20 20 20 20 3D 20
SFFHARD, 28EEH-28FAH: FFHARD, OFF or ON (24ACH), a line feed and the label of TAB.
28FB-28FESTAB
DEFM "OFF" / DEFB 0AH 4F 46 46 0A
STAB, 28FBH-28FEH: TAB, OFF or ON (24DAH), and a line feed.
28FF-290ADOXLATE
DEFB 0DH / DEFM "XLATE = X" / DEFB 27H 0D 58 4C 41 54 45 20 20 3D 20 58 27
DOXLATE, 28FFH-290AH: the 0DH that ends the text (made 0AH at 24E9H when XLATE translates), the label of XLATE and X with its quote.
290B-2913SXLFROM
DEFM "00" / DEFB 27H / DEFM " => X" / DEFB 27H 30 30 27 20 3D 3E 20 58 27
SXLFROM, 290BH-2913H: the From byte in two hex digits (24EEH), its closing quote, the arrow and the opening X' of the To byte.
2914-2918SXLTO
DEFM "00" / DEFB 27H, 0AH, 0DH 30 30 27 0A 0D
SXLTO, 2914H-2918H: the To byte in two hex digits (24F5H), its closing quote, a line feed and the 0DH that ends the text after an empty line.
2919-2931APROMPT
DEFM "Add Line Feed after C/R {" 41 64 64 20 4C 69 6E 65 20 46 65 65 64 20 61 66 74 65 72 20 43 2F 52 20 7B
APROMPT, 2919H-2931H: the prompt of ADDLF, up to the opening brace of its default.
2932-294ECPROMPT
DEFM "Maximum Characters per Line {" 4D 61 78 69 6D 75 6D 20 43 68 61 72 61 63 74 65 72 73 20 70 65 72 20 4C 69 6E 65 20 7B
CPROMPT, 2932H-294EH: the prompt of CHARS, the longest, 29 characters with the brace.
294F-295FFPROMPT
DEFM "Real Form Feeds {" 52 65 61 6C 20 46 6F 72 6D 20 46 65 65 64 73 20 7B
FPROMPT, 294FH-295FH: the prompt of FFHARD, a real form feed 0CH.
2960-2979IPROMPT
DEFM "Indent after Wrap-around {" 49 6E 64 65 6E 74 20 61 66 74 65 72 20 57 72 61 70 2D 61 72 6F 75 6E 64 20 7B
IPROMPT, 2960H-2979H: the prompt of INDENT, the indent of a wrapped line.
297A-2991LPROMPT
DEFM "Lines Printed per Page {" 4C 69 6E 65 73 20 50 72 69 6E 74 65 64 20 70 65 72 20 50 61 67 65 20 7B
LPROMPT, 297AH-2991H: the prompt of LINES, the lines printed on a page.
2992-29A1MPROMPT
DEFM "Margin Setting {" 4D 61 72 67 69 6E 20 53 65 74 74 69 6E 67 20 7B
MPROMPT, 2992H-29A1H: the prompt of MARGIN, the left margin of every line.
29A2-29B7PPROMPT
DEFM "Physical Page Length {" 50 68 79 73 69 63 61 6C 20 50 61 67 65 20 4C 65 6E 67 74 68 20 7B
PPROMPT, 29A2H-29B7H: the prompt of PAGE, the first one asked.
29B8-29C6TPROMPT
DEFM "Tab Expansion {" 54 61 62 20 45 78 70 61 6E 73 69 6F 6E 20 7B
TPROMPT, 29B8H-29C6H: the prompt of TAB, the expansion of 09H to 8 columns.
29C7-29D2XPROMF
DEFM "Xlate From {" 58 6C 61 74 65 20 46 72 6F 6D 20 7B
XPROMF, 29C7H-29D2H: the prompt of the From byte of XLATE; three keys allow a decimal answer only, not X'nn'.
29D3-29DCXPROMT
DEFM "Xlate To {" 58 6C 61 74 65 20 54 6F 20 7B
XPROMT, 29D3H-29DCH: the prompt of the To byte of XLATE, the last one asked.
29DD
DEFM " " 20
29DDH: a space after the last prompt, the last byte of the member, which nothing reads.

2400H - Member 4 (SETCOM): Entry and Exits

SYS1/SYS runs SETCOM with request B2H; its header (file offset 0039H: record 0013H, byte BFH) points at member 4, which the overlay loader reads to 2400H-29EEH, one run of six load blocks, and calls at 2400H with Register Pair HL at the text after the word SETCOM. SETCOM shows or changes the settings of the serial driver COM/DVR, four bytes of its data area, which it finds through @GTMOD and the module name $CL. The entry keeps the Stack Pointer, so every exit returns at the depth of the entry through SAVESP, which clears a BREAK still pending with @CKBRKC. There is no BREAK test at the start.

2400
LD (240BH),SP ED 73 0B 24
SETCOM's entry (request B2H): store the Stack Pointer into 240BH-240CH, the operand of the LD SP at SAVESP (240AH), so that every exit returns at the depth of the entry (source: save entry stack).
2404
Call 243AH, the command, which returns to 2407H when it ends without an error (source: perform operations).
2407$EXIT
LD HL,0000H 21 00 00
$EXIT: load Register Pair HL with 0000H, the return code for no error, and fall into SAVESP (source: no errors).
240ASAVESP
LD SP,0000H 31 00 00
SAVESP: load the Stack Pointer with the word at 240BH-240CH, the value stored at 2400H (0000H in the file); every exit comes here (source: p/u original SP).
240D
LD A,6AH 3E 6A
Load Register A with 6AH, SVC 106, @CKBRKC, which tests for BREAK and clears a BREAK still pending (source: clear BREAK).
240F
RST 28H EF
Call @CKBRKC with RST 28H (BOOT/SYS); its result is not looked at, the exit goes on in every case.
2410
RET C9
Return through the tail of RST28 (1A77H) to @EXIT or to the caller of @CMNDR, with Register Pair HL = 0000H, FFFFH or the error number.
2411$ABORT
LD HL,0FFFFH 21 FF FF
$ABORT: load Register Pair HL with FFFFH, the return code for BREAK at a prompt of QUERY (source: init error return).
2414
Jump relative to SAVESP at 240AH, which restores the Stack Pointer of the entry and returns with Register Pair HL = FFFFH (source: exit program).
2416$DSP
LD A,02H 3E 02
$DSP: load Register A with 02H, SVC 2, @DSP, which shows the character in Register C on the screen (source: display).
2418
RST 28H EF
Call @DSP with RST 28H (BOOT/SYS) to show the character in Register C.
2419
RET Z C8
Return if @DSP returned Z, the character shown (source: return if NO error).
241A
Otherwise jump relative to IOERR at 2420H with Register A = the error number that @DSP returned (source: else error).
241C$DSPLY
LD A,0AH 3E 0A
$DSPLY: load Register A with 0AH, SVC 10, @DSPLY, which shows the text at Register Pair HL up to its 03H or 0DH and keeps Register Pair HL.
241E
RST 28H EF
Call @DSPLY with RST 28H (BOOT/SYS) to show the text at Register Pair HL (source: display).
241F
RET Z C8
Return if @DSPLY returned Z, the text shown; otherwise fall into IOERR (source: return if NO error).
2420IOERR
LD L,A 6F
IOERR: load Register L with Register A, the error number, the low byte of the return code (source: save error code).
2421
OR 0C0H F6 C0
OR Register A with C0H: bit 7 asks @ERROR to return to the caller, bit 6 for the short message alone (source: set return+short message).
2423
LD C,A 4F
Load Register C with Register A, the error number with bits 7 and 6 set, for @ERROR (source: pass error code).
2424
LD A,1AH 3E 1A
Load Register A with 1AH, SVC 26, @ERROR, which shows an error message (source: display error).
2426
RST 28H EF
Call @ERROR with RST 28H (the SYS0/SYS stub 1B0FH that loads SYS4/SYS) to show the short error message.
2427ERROR$
LD H,00H 26 00
ERROR$: load Register H with 00H: Register Pair HL = the error number in Register L, the command's return code (source: set exit code).
2429
Jump relative to SAVESP at 240AH, which restores the Stack Pointer and returns with Register Pair HL = the error number (source: terminate program).
242BBADMOD
LD HL,26E1H 21 E1 26LD HL,BADDCB
BADMOD: point Register Pair HL to 26E1H, BADDCB, the message COM/DVR not installed, for the case that no module $CL is in memory (source: COM/DVR not installed).
242E
LD A,0CH 3E 0C
Load Register A with 0CH, SVC 12, @LOGOT, which shows a message and writes it to the job log.
2430
RST 28H EF
Call @LOGOT with RST 28H (BOOT/SYS) to show and log the message at Register Pair HL, 26E1H (source: log error).
2431
LD L,08H 2E 08
Load Register L with 08H, error 8, Device not available: the return code after SETCOM's own message is 0008H, not FFFFH, and no error message is shown for it (source: device not available).
2433
Jump relative to ERROR$ at 2427H, which makes Register Pair HL = 0008H and exits (source: return error in HL).
2435PRMERR
LD A,2CH 3E 2C
PRMERR: load Register A with 2CH, error 44, Parameter error; SETPARAM returns here from every refusal (source: parameter error).
2437
Jump to IOERR at 2420H to show Parameter error and exit with 002CH (source: abort).

243AH - Member 4 (SETCOM): The Command

SETCOM finds COM/DVR's module $CL; Index Register IX is set to the byte after its name, the word of the DCB that the driver was set on, so the data area is at IX+04H to IX+07H: MSMASK the line conditions, UCIMAGE the control byte of the UART, BAUDRT the baud rates and LOGBRK the BREAK character. A line whose first character after the spaces is not an opening parenthesis shows the settings. Otherwise @PARAM reads the list; DEFAULT (a value other than OFF) puts the driver's starting values back at once; QUERY (a value other than OFF) asks for the settings not given on the line; then SETPARAM checks and stores every parameter given and @CTL function 2 sends the settings to the UART.

243A
PUSH HL E5
Save Register Pair HL, the pointer to the command line, on the stack (source: save command line pntr).
243B
LD DE,26DDH 11 DD 26LD DE,MDNAME
Point Register Pair DE to 26DDH, MDNAME, the name $CL ended by 03H, the module name of COM/DVR (source: $CL name header).
243E
LD A,53H 3E 53
Load Register A with 53H, SVC 83, @GTMOD, which looks for a module by its name (source: find module header).
2440
RST 28H EF
Call @GTMOD with RST 28H (the SYS0/SYS stub 19B2H that loads SYS12/SYS): Z with Register Pair DE = the byte after the name, else NZ.
2441
If no module $CL is in memory, jump relative to BADMOD at 242BH; the stack holds the command pointer, which SAVESP drops (source: exit if not found).
2443
PUSH DE D5
Save Register Pair DE, the byte after the name, on the stack (source: pass pointer to IX).
2444
POP IX DD E1
Restore Index Register IX from the stack: the address of CLDCB, the word of the driver's DCB, four bytes before the data area (source: IX=>next byte after).
2446
POP HL E1
Restore Register Pair HL, the pointer to the command line (source: rcvr cmdline ptr).
2447
DEC HL 2B
Decrement Register Pair HL for the INC HL that begins the loop (source: setup for immed INC).
2448SPLP
INC HL 23
SPLP: increment Register Pair HL to the next character of the command line (source: bump to next char).
2449
LD A,(HL) 7E
Load Register A with the character at Register Pair HL (source: fetch input char).
244A
CP 20H FE 20
Compare Register A with 20H, a space (source: space?).
244C
If it is a space, jump relative to SPLP at 2448H for the next character (source: ignore if space).
244E
CP 28H FE 28
Compare Register A with 28H, the opening parenthesis of a parameter list (source: param marker?).
2450
If it is anything else, the end of the line or a word, jump to 29E2H, which jumps to DSPALL to show the settings (source: no, show settings).
2453
LD DE,2807H 11 07 28LD DE,PRMTBL$
Point Register Pair DE to 2807H, PRMTBL$, the parameter table of SETCOM (source: parameter table).
2456
LD A,11H 3E 11
Load Register A with 11H, SVC 17, @PARAM, which reads a parameter list (source: evaluate user input).
2458
RST 28H EF
Call @PARAM with RST 28H (the SYS0/SYS stub 1987H, code in SYS1/SYS at 21D7H) on the list at Register Pair HL.
2459
If @PARAM returned NZ (a word not in the table or a bad value), jump to PRMERR at 2435H for Parameter error (source: go if parameter error).
245C
LD DE,(2766H) ED 5B 66 27LD DE,(DFPARM)
Load Register Pair DE with the word at 2766H, DFPARM, the value of DEFAULT: 0000H when it was not given or given as OFF (source: check D parm).
2460
LD A,D 7A
Load Register A with Register D, the high byte of the value.
2461
OR E B3
OR Register A with Register E, the low byte: zero for no DEFAULT.
2462
If DEFAULT was given (NZ), call DEFALT at 26CCH, which stores the starting values into the driver's data area at once, before anything else is checked (source: go if Default parm used).
2465
LD DE,(274CH) ED 5B 4C 27LD DE,(QPARM)
Load Register Pair DE with the word at 274CH, QPARM, the value of QUERY: 0000H when it was not given or given as OFF (source: query parm used?).
2469
LD A,D 7A
Load Register A with Register D, the high byte of the value (source: check input).
246A
OR E B3
OR Register A with Register E, the low byte: zero for no QUERY.
246B
Without QUERY, jump to CKPARM at 2520H to check and store the parameters (source: check input if not query).

246EH - Member 4 (SETCOM): QUERY, the Eleven Questions

QUERY asks, in order, for the baud rate, word length, stop bits, parity, BREAK, DTR, RTS, RI, DSR, CD and CTS, each with a display routine that shows the present setting, then the cursor in column 20, a question mark and up to ten keys (GETIT). A setting given on the line with a kind its entry allows is not asked; ENTER alone keeps the setting. The answers of BAUD, WORD, STOP and PARITY are checked here and asked again when refused (WORD and STOP by the low byte of the value only); the others are not checked until SETPARAM.

246EASKBAUD
LD HL,2538H 21 38 25LD HL,DMSG2
ASKBAUD: point Register Pair HL to 2538H, DMSG2, which shows Baud= and the present receive rate (source: BAUD param display).
2471
LD DE,281AH 11 1A 28LD DE,BTYP
Point Register Pair DE to 281AH, BTYP, the type byte of BAUD in PRMTBL$ (source: BAUD param).
2474
Call GETIT at 2650H: Carry when an answer was read into BAUDP, No Carry when BAUD was on the line or ENTER was pressed alone (source: get user input).
2477
If there is no new answer (No Carry), jump relative to ASKWORD at 2484H (source: continue on ENTER).
2479
Call CKBAUD at 29C2H: Z when the answer is one of the sixteen rates of BAUDTBL (source: test response for valid).
247C
If the rate is in the table, jump relative to ASKWORD at 2484H (source: move on if valid entry).
247EBADBAUD
XOR A AF
BADBAUD: clear Register A to 00H (source: else clear).
247F
LD (281FH),A 32 1F 28LD (BRESP),A
Store Register A, 00H, into 281FH, BRESP, the response byte of BAUD, so that GETIT asks again (source: for re-try).
2482
Jump relative to ASKBAUD at 246EH to ask again (source: bad entry - retry).
2484ASKWORD
LD HL,2566H 21 66 25LD HL,DMSG3
ASKWORD: point Register Pair HL to 2566H, DMSG3, which shows Word= and the present word length (source: WORD display).
2487
LD DE,2822H 11 22 28LD DE,WTYP
Point Register Pair DE to 2822H, WTYP, the type byte of WORD (source: param type).
248A
Call GETIT at 2650H: Carry when an answer was read into WORDP (source: get user input).
248D
If there is no new answer, jump relative to ASKSTOP at 24A0H (source: nil input, leave it).
248F
LD A,(2750H) 3A 50 27LD A,(WORDP)
Load Register A with the byte at 2750H, the low byte of WORDP, the word length answered; the high byte is not looked at here (source: fetch input).
2492
CP 05H FE 05
Compare Register A with 05H, the shortest word (source: <5?).
2494
If it is below 5, jump relative to BADWORD at 249AH (source: bad entry).
2496
CP 09H FE 09
Compare Register A with 09H, one more than the longest word (source: >8?).
2498
If it is 5 to 8, jump relative to ASKSTOP at 24A0H (source: go if OK).
249ABADWORD
XOR A AF
BADWORD: clear Register A to 00H (source: clear param).
249B
LD (2827H),A 32 27 28LD (WRESP),A
Store Register A, 00H, into 2827H, WRESP, the response byte of WORD, so that GETIT asks again (source: load flag).
249E
Jump relative to ASKWORD at 2484H to ask again (source: re-try).
24A0ASKSTOP
LD HL,257FH 21 7F 25LD HL,DMSG4
ASKSTOP: point Register Pair HL to 257FH, DMSG4, which shows Stop= and the present stop bits (source: STOP).
24A3
LD DE,282AH 11 2A 28LD DE,STYP
Point Register Pair DE to 282AH, STYP, the type byte of STOP (source: =>type byte).
24A6
Call GETIT at 2650H: Carry when an answer was read into STOPP (source: get user input).
24A9
If there is no new answer, jump relative to ASKPAR at 24BFH (source: nil input, leave it).
24AB
LD A,(2752H) 3A 52 27LD A,(STOPP)
Load Register A with the byte at 2752H, the low byte of STOPP, the stop bits answered (source: chk range).
24AE
OR A B7
OR Register A with itself to set the Z flag for 0 (source: 0?).
24AF
If it is 0, jump relative to BADSTOP at 24B5H (source: invalid if yes).
24B1
CP 03H FE 03
Compare Register A with 03H, one more than the most stop bits (source: >2?).
24B3
If it is 1 or 2, jump relative to ASKPAR at 24BFH (source: go if OK).
24B5BADSTOP
XOR A AF
BADSTOP: clear Register A to 00H (source: load zero).
24B6
LD (282FH),A 32 2F 28LD (SRESP),A
Store Register A, 00H, into 282FH, SRESP, the response byte of STOP, so that GETIT asks again (source: clear input param).
24B9
Jump relative to ASKSTOP at 24A0H to ask again (source: ask again).
24BBBADPAR
XOR A AF
BADPAR: clear Register A to 00H (source: load zero).
24BC
LD (2839H),A 32 39 28LD (PRESP),A
Store Register A, 00H, into 2839H, PRESP, the response byte of PARITY, so that GETIT asks again (source: clear response byte).
24BFASKPAR
LD HL,2591H 21 91 25LD HL,DMSG5
ASKPAR: point Register Pair HL to 2591H, DMSG5, which shows Parity= and OFF, ODD or EVEN (source: PARITY display driver).
24C2
LD DE,2832H 11 32 28LD DE,PTYP
Point Register Pair DE to 2832H, PTYP, the type byte of PARITY (source: param type).
24C5
Call GETIT at 2650H: Carry when an answer was read into PARITYP (source: get user input).
24C8
If there is no new answer, jump relative to ASKBRK at 24E1H (source: nil input, leave).
24CA
LD A,(2839H) 3A 39 28LD A,(PRESP)
Load Register A with the byte at 2839H, PRESP, the response byte of the answer (source: get response byte).
24CD
LD DE,(2754H) ED 5B 54 27LD DE,(PARITYP)
Load Register Pair DE with the word at 2754H, PARITYP: for a string the address of its first character (source: get param pointer).
24D1
BIT 6,A CB 77
Test bit 6 of Register A, the mark of a switch: ON, OFF, Y or N (source: switch?).
24D3
If it is a switch, jump relative to ASKBRK at 24E1H: accepted (source: yes, continue).
24D5
LD A,(DE) 1A
Load Register A with the byte at Register Pair DE: for a string answer its first character, at 29F0H in INBUF; @PARAM refuses EVEN or ODD typed without quotes, so a quoted answer such as "E" reaches here, and so does a number, whose value is then read as an address (10219, 27EBH, the E of MSG18, is taken as EVEN) (source: get input).
24D6
Call UCASE at 29B9H to make Register A a capital letter (source: make upper case).
24D9
CP 45H FE 45
Compare Register A with 45H, E for EVEN (source: even?).
24DB
If it is E, jump relative to ASKBRK at 24E1H (source: continue if yes).
24DD
CP 4FH FE 4F
Compare Register A with 4FH, O for ODD (source: odd?).
24DF
If it is neither, jump relative to BADPAR at 24BBH to ask again (source: invalid, re-prompt).
24E1ASKBRK
LD HL,25B0H 21 B0 25LD HL,DMSG6
ASKBRK: point Register Pair HL to 25B0H, DMSG6, which shows Break= and the present BREAK character in hex (source: display driver).
24E4
LD DE,2808H 11 08 28LD DE,BRTYP
Point Register Pair DE to 2808H, BRTYP, the type byte of BREAK (source: param type).
24E7
Call GETIT at 2650H; the answer is not checked here (source: get user input).
24EAASKDTR
LD HL,25CBH 21 CB 25LD HL,DMSG8
ASKDTR: point Register Pair HL to 25CBH, DMSG8, which shows DTR= and ON or OFF (source: display driver).
24ED
LD DE,284BH 11 4B 28LD DE,DTYP
Point Register Pair DE to 284BH, DTYP, the type byte of DTR (source: param type).
24F0
Call GETIT at 2650H to ask for DTR (source: get user input).
24F3ASKRTS
LD HL,25D7H 21 D7 25LD HL,DMSG9
ASKRTS: point Register Pair HL to 25D7H, DMSG9, which shows RTS= and ON or OFF (source: display driver).
24F6
LD DE,2852H 11 52 28LD DE,RTYP
Point Register Pair DE to 2852H, RTYP, the type byte of RTS (source: param type).
24F9
Call GETIT at 2650H to ask for RTS (source: get user input).
24FCASKRI
LD HL,25F2H 21 F2 25LD HL,DMSG11
ASKRI: point Register Pair HL to 25F2H, DMSG11, which shows RI= and ON, OFF or IGNORE (source: display driver).
24FF
LD DE,2859H 11 59 28LD DE,RITYP
Point Register Pair DE to 2859H, RITYP, the type byte of RI (source: param type).
2502
Call GETIT at 2650H to ask for RI (source: get user input).
2505ASKDSR
LD HL,25F9H 21 F9 25LD HL,DMSG12
ASKDSR: point Register Pair HL to 25F9H, DMSG12, which shows DSR= and ON, OFF or IGNORE (source: display driver).
2508
LD DE,2865H 11 65 28LD DE,DSTYP
Point Register Pair DE to 2865H, DSTYP, the type byte of DSR (source: param type).
250B
Call GETIT at 2650H to ask for DSR (source: get user input).
250EASKCD
LD HL,2600H 21 00 26LD HL,DMSG13
ASKCD: point Register Pair HL to 2600H, DMSG13, which shows CD= and ON, OFF or IGNORE (source: display driver).
2511
LD DE,285FH 11 5F 28LD DE,CDTYP
Point Register Pair DE to 285FH, CDTYP, the type byte of CD (source: param type).
2514
Call GETIT at 2650H to ask for CD (source: get user input).
2517ASKCTS
LD HL,2607H 21 07 26LD HL,DMSG14
ASKCTS: point Register Pair HL to 2607H, DMSG14, which shows CTS= and ON, OFF or IGNORE (source: display driver).
251A
LD DE,286CH 11 6C 28LD DE,CTTYP
Point Register Pair DE to 286CH, CTTYP, the type byte of CTS (source: param type).
251D
Call GETIT at 2650H to ask for CTS, and fall into CKPARM (source: get user input).
2520CKPARM
CKPARM: call SETPARAM at 287FH, which checks every parameter given or answered and stores it into the driver's data area; a refusal there ends in Parameter error (source: check entered params).
2523
LD E,(IX+00H) DD 5E 00
Load Register E with the low byte of the driver's DCB address (IX+00H), Index Register IX holding the address of CLDCB (source: pickup DCB address lsb).
2526
LD D,(IX+01H) DD 56 01
Load Register D with the high byte of the DCB address (IX+01H), Index Register IX holding the address of CLDCB: Register Pair DE = the DCB that COM/DVR was set on (source: pickup DCB address msb).
2529
LD C,02H 0E 02
Load Register C with 02H, the @CTL function CTL2, with which COM/DVR resets the UART (00H to port E8H) and sends it the control byte (port EAH) and the rates (port E9H) (source: init code).
252B
LD A,05H 3E 05
Load Register A with 05H, SVC 5, @CTL, which sends a control request to a device (source: setup channel for values).
252D
RST 28H EF
Call @CTL with RST 28H (BOOT/SYS) on the DCB at Register Pair DE; its result is not looked at.
252E
RET C9
Return to $EXIT at 2407H for the return code 0000H; nothing is shown after a change (source: completed).

252FH - Member 4 (SETCOM): The Display Routines

Each routine shows one part of the settings from the driver's data area (Index Register IX): DMSG2 the receive rate from the low four bits of BAUDRT through BAUDTBL; DMSG3 the word length from bits 6-5 of UCIMAGE (00 5, 10 6, 01 7, 11 8); DMSG4 the stop bits from bit 4; DMSG5 OFF for bit 3 set, else EVEN for bit 7 set and ODD for it clear; DMSG6 the BREAK character LOGBRK in hex; DMSG8 and DMSG9 DTR and RTS, ON when bit 1 or bit 0 is 0, the TRUE level; DMSG11 to DMSG14 the line conditions of MSMASK, IGNORE when neither of the line's two bits is set, ON when only the check bit (bits 3-0) is set, OFF when the check and the level bit (bits 7-4) both are. The same routines show the prompts of QUERY.

252FDMSG1
LD HL,276CH 21 6C 27LD HL,MSG1
DMSG1: point Register Pair HL to 276CH, MSG1, a 00H and RS232 parameters:; the 00H only makes the video driver take the next character as it is, and the R that follows is a plain letter, so nothing is seen of it (source: RS232 params:).
2532
Call $DSPLY at 241CH to show the text at Register Pair HL; @DSPLY keeps Register Pair HL at 276CH (source: display and return).
2535
LD (HL),0AH 36 0A
Store 0AH into the first byte of MSG1 at Register Pair HL, 276CH, for a line feed before the text next time; the member is read again for every command, so no later display sees it (source: set for next time).
2537
RET C9
Return to DSPRET at 2647H, the next routine of DSPTBL.
2538DMSG2
LD HL,2780H 21 80 27LD HL,MSG2
DMSG2: point Register Pair HL to 2780H, MSG2, the text Baud= (source: BAUD=).
253B
Call $DSPLY at 241CH to show the text at Register Pair HL (source: display).
253E
LD A,(IX+06H) DD 7E 06
Load Register A with BAUDRT (IX+06H), Index Register IX holding the address of CLDCB: the transmit rate in bits 7-4, the receive rate in bits 3-0 (source: get baud rate).
2541
AND 0FH E6 0F
Mask Register A with 0FH, the receive rate's code 0-15 (source: low 4 bits only).
2543
ADD A,A 87
Add Register A to itself: two bytes for each rate in BAUDTBL (source: times 2).
2544
LD HL,26FAH 21 FA 26LD HL,BAUDTBL
Point Register Pair HL to 26FAH, BAUDTBL, the sixteen rates as words (source: baud lookup table).
2547
ADD A,L 85
Add Register L to Register A (source: add to lsb table).
2548
LD L,A 6F
Load Register L with Register A (source: update lsb table).
2549
If the low byte did not carry, jump relative to 254CH (source: go if no page cross).
254B
INC H 24
Increment Register H for a carry into the next page: BAUDTBL, 26FAH-2719H, crosses into page 27H at 2700H, so every code from 3 (135 baud) on needs it (source: else bump page).
254C
LD A,(HL) 7E
Load Register A with the low byte of the rate from Register Pair HL (source: get LSB baud).
254D
INC HL 23
Increment Register Pair HL to the high byte (source: bump table pointer).
254E
LD H,(HL) 66
Load Register H with the high byte of the rate from Register Pair HL (source: get MSB baud).
254F
LD L,A 6F
Load Register L with Register A: Register Pair HL = the rate, 50 to 19200 (source: HL = baud rate).
2550
LD DE,27F7H 11 F7 27LD DE,MSG20
Point Register Pair DE to 27F7H, MSG20, five characters for the rate (source: text to load).
2553
LD A,61H 3E 61
Load Register A with 61H, SVC 97, @HEXDEC, which writes Register Pair HL as five decimal characters at Register Pair DE, leading zeros as spaces (source: convert to decimal).
2555
RST 28H EF
Call @HEXDEC with RST 28H (BOOT/SYS code at 06F6H); it returns with Register Pair DE at 27FCH, after the fifth character.
2556
LD A,03H 3E 03
Load Register A with 03H, the end of a text that is not followed by a new line (source: end text char).
2558
LD (DE),A 12
Store Register A, 03H, into the byte at Register Pair DE, 27FCH, where the file has 03H already (source: terminate text).
2559
LD HL,27F7H 21 F7 27LD HL,MSG20
Point Register Pair HL to 27F7H, the rate in five characters (source: text loaded).
255C
LD A,20H 3E 20
Load Register A with 20H, a space, the leading characters to pass over (source: test char).
255ESTRIP1
CP (HL) BE
STRIP1: compare Register A with the character at Register Pair HL (source: leading zero?).
255F
INC HL 23
Increment Register Pair HL to the next character (source: bump pointer).
2560
If it was a space, jump relative to STRIP1 at 255EH (source: go till non-zero found).
2562
DEC HL 2B
Decrement Register Pair HL to the first digit (source: adjust pointer).
2563
Jump to $DSPLY at 241CH to show the digits at Register Pair HL and return to DSPRET (DSPALL) or to GETRSPR (267AH) for a QUERY prompt (source: display remainder).
2566DMSG3
LD HL,2786H 21 86 27LD HL,MSG3
DMSG3: point Register Pair HL to 2786H, MSG3, the text Word= (source: WORD=).
2569
Call $DSPLY at 241CH to show the text at Register Pair HL (source: display header).
256C
LD A,(IX+05H) DD 7E 05
Load Register A with UCIMAGE (IX+05H), Index Register IX holding the address of CLDCB: the word length in bits 6-5 (source: get data).
256F
RLCA 07
Rotate Register A left; three rotations bring bit 6 to bit 1 and bit 5 to bit 0 (source: align to low bits).
2570
RLCA 07
Rotate Register A left (second of the three rotations).
2571
RLCA 07
Rotate Register A left (third rotation): bit 6 is in bit 1, bit 5 in bit 0.
2572
AND 03H E6 03
Mask Register A with 03H, the two bits of the word length; the parity flag is set for 00 and 11 (source: 2 bits only).
2574
If the parity flag is even (00 for 5 bits, 11 for 8), jump to 2579H (source: go if set).
2577
XOR 03H EE 03
Otherwise flip both bits of Register A with XOR 03H: 10 (6 bits) becomes 01, 01 (7 bits) becomes 10 (source: else reverse 6/7).
2579
ADD A,35H C6 35
Add 35H, the character 5, to Register A: the word length 5 to 8 as a digit (source: correct + ASCII).
257B
LD C,A 4F
Load Register C with Register A, the digit (source: pass character).
257C
Jump to $DSP at 2416H to show the digit in Register C and return to DSPRET (DSPALL) or to GETRSPR (267AH) for a QUERY prompt (source: display and return).
257FDMSG4
LD HL,278CH 21 8C 27LD HL,MSG4
DMSG4: point Register Pair HL to 278CH, MSG4, the text Stop= (source: STOP=).
2582
Call $DSPLY at 241CH to show the text at Register Pair HL (source: display header).
2585
LD C,31H 0E 31
Load Register C with 31H, the digit 1 (source: set one bit).
2587
BIT 4,(IX+05H) DD CB 05 66
Test bit 4 of UCIMAGE (IX+05H), Index Register IX holding the address of CLDCB: set for two stop bits (source: get data).
258B
If the bit is clear, jump relative to 258EH to show 1 (source: go if one stop).
258D
INC C 0C
Increment Register C to 32H, the digit 2 (source: else bump to 2).
258E
Jump to $DSP at 2416H to show the digit in Register C and return to DSPRET (DSPALL) or to GETRSPR (267AH) for a QUERY prompt (source: display and return).
2591DMSG5
LD HL,2792H 21 92 27LD HL,MSG5
DMSG5: point Register Pair HL to 2792H, MSG5, the text Parity= (source: PARITY=).
2594
Call $DSPLY at 241CH to show the text at Register Pair HL (source: display).
2597
LD HL,27E3H 21 E3 27LD HL,MSG16
Point Register Pair HL to 27E3H, MSG16, the text OFF (source: OFF).
259A
BIT 3,(IX+05H) DD CB 05 5E
Test bit 3 of UCIMAGE (IX+05H), Index Register IX holding the address of CLDCB: set when parity is off (source: is off?).
259E
If parity is off, jump to $DSPLY at 241CH to show OFF and return (source: yes, go).
25A1
LD HL,27E7H 21 E7 27LD HL,MSG17
Point Register Pair HL to 27E7H, MSG17, the text ODD (source: ODD).
25A4
BIT 7,(IX+05H) DD CB 05 7E
Test bit 7 of UCIMAGE (IX+05H), Index Register IX holding the address of CLDCB: set for even parity (source: is odd?).
25A8
If the bit is clear, jump relative to 25ADH to show ODD (source: go if yes).
25AA
LD HL,27EBH 21 EB 27LD HL,MSG18
Point Register Pair HL to 27EBH, MSG18, the text EVEN (source: EVEN).
25AD
Jump to $DSPLY at 241CH to show the text at Register Pair HL and return to DSPRET (DSPALL) or to GETRSPR (267AH) for a QUERY prompt (source: display and return).
25B0DMSG6
LD HL,279AH 21 9A 27LD HL,MSG6
DMSG6: point Register Pair HL to 279AH, MSG6, the text Break= (source: BREAK=).
25B3
Call $DSPLY at 241CH to show the text at Register Pair HL (source: display header).
25B6
LD C,(IX+07H) DD 4E 07
Load Register C with LOGBRK (IX+07H), Index Register IX holding the address of CLDCB: the character that the driver takes as BREAK, 00H for none (source: get break char).
25B9
LD HL,27FFH 21 FF 27LD HL,MSG21A
Point Register Pair HL to 27FFH, MSG21A, the two hex digits in X'00' (source: text to load).
25BC
LD A,62H 3E 62
Load Register A with 62H, SVC 98, @HEX8, which writes Register C as two hex digits at Register Pair HL (source: convert to ASCII).
25BE
RST 28H EF
Call @HEX8 with RST 28H (BOOT/SYS code at 07C2H).
25BF
LD HL,27FDH 21 FD 27LD HL,MSG21
Point Register Pair HL to 27FDH, MSG21, the text X'nn' with its 03H (source: text start).
25C2
Jump to $DSPLY at 241CH to show the text at Register Pair HL and return to DSPRET (DSPALL) or to GETRSPR (267AH) for a QUERY prompt (source: display and return).
25C5DMSG7
LD HL,27A1H 21 A1 27LD HL,MSG7
DMSG7: point Register Pair HL to 27A1H, MSG7, a line feed and Output control: (source: Input:).
25C8
Jump to $DSPLY at 241CH to show the text at Register Pair HL and return to DSPALL (source: display and return).
25CBDMSG8
LD HL,27B3H 21 B3 27LD HL,MSG8
DMSG8: point Register Pair HL to 27B3H, MSG8, the text DTR= (source: DTR=).
25CE
Call $DSPLY at 241CH to show the text at Register Pair HL (source: display).
25D1
BIT 1,(IX+05H) DD CB 05 4E
Test bit 1 of UCIMAGE (IX+05H), Index Register IX holding the address of CLDCB: 0 holds DTR TRUE (source: is on?).
25D5
Jump relative to DMSG89 at 25E1H to show ON or OFF (source: display).
25D7DMSG9
LD HL,27B8H 21 B8 27LD HL,MSG9
DMSG9: point Register Pair HL to 27B8H, MSG9, the text RTS= (source: RTS=).
25DA
Call $DSPLY at 241CH to show the text at Register Pair HL (source: display header).
25DD
BIT 0,(IX+05H) DD CB 05 46
Test bit 0 of UCIMAGE (IX+05H), Index Register IX holding the address of CLDCB: 0 holds RTS TRUE (source: is on?).
25E1DMSG89
LD HL,27E0H 21 E0 27LD HL,MSG15
DMSG89: point Register Pair HL to 27E0H, MSG15, the text ON (source: ON?).
25E4
If the bit is clear, jump relative to 25E9H to show ON (source: go if yes).
25E6
LD HL,27E3H 21 E3 27LD HL,MSG16
Point Register Pair HL to 27E3H, MSG16, the text OFF (source: OFF).
25E9
Jump to $DSPLY at 241CH to show the text at Register Pair HL and return to DSPRET (DSPALL) or to GETRSPR (267AH) for a QUERY prompt (source: display and return).
25ECDMSG10
LD HL,27BDH 21 BD 27LD HL,MSG10
DMSG10: point Register Pair HL to 27BDH, MSG10, a line feed and Input control: (source: Output:).
25EF
Jump to $DSPLY at 241CH to show the text at Register Pair HL and return to DSPALL (source: display and return).
25F2DMSG11
LD HL,27CEH 21 CE 27LD HL,MSG11
DMSG11: point Register Pair HL to 27CEH, MSG11, the text RI= (source: RI=).
25F5
LD A,11H 3E 11
Load Register A with 11H, RI's level bit 4 and check bit 0 in MSMASK (source: enable bits).
25F7
Jump relative to DMSG0 at 260CH (source: go common).
25F9DMSG12
LD HL,27D2H 21 D2 27LD HL,MSG12
DMSG12: point Register Pair HL to 27D2H, MSG12, the text DSR= (source: DSR=).
25FC
LD A,44H 3E 44
Load Register A with 44H, DSR's level bit 6 and check bit 2 (source: enable bits).
25FE
Jump relative to DMSG0 at 260CH (source: go common).
2600DMSG13
LD HL,27D7H 21 D7 27LD HL,MSG13
DMSG13: point Register Pair HL to 27D7H, MSG13, the text CD= (source: CD=).
2603
LD A,22H 3E 22
Load Register A with 22H, CD's level bit 5 and check bit 1 (source: enable bits).
2605
Jump relative to DMSG0 at 260CH (source: go common).
2607DMSG14
LD HL,27DBH 21 DB 27LD HL,MSG14
DMSG14: point Register Pair HL to 27DBH, MSG14, the text CTS= (source: CTS=).
260A
LD A,88H 3E 88
Load Register A with 88H, CTS's level bit 7 and check bit 3, and fall into DMSG0 (source: enable bits).
260CDMSG0
PUSH AF F5
DMSG0: save Register Pair AF, the two bits of the line in Register A, on the stack (source: save bits).
260D
Call $DSPLY at 241CH to show the name of the line at Register Pair HL (source: display prefix).
2610
POP AF F1
Restore Register Pair AF, the two bits (source: restore).
2611
AND (IX+04H) DD A6 04
AND Register A with MSMASK (IX+04H), Index Register IX holding the address of CLDCB: the line's bits that are set; the parity flag is odd when one is (source: and with mask).
2614
LD HL,27F0H 21 F0 27LD HL,MSG19
Point Register Pair HL to 27F0H, MSG19, the text IGNORE (source: IGNORE).
2617
If neither bit is set, jump relative to DMSG0X at 2622H to show IGNORE (source: go if yes).
2619
LD HL,27E0H 21 E0 27LD HL,MSG15
Point Register Pair HL to 27E0H, MSG15, the text ON (source: ON).
261C
If one bit is set (parity odd: the check bit alone), jump to DMSG0X at 2622H to show ON, wait for TRUE (source: go if yes).
261F
LD HL,27E3H 21 E3 27LD HL,MSG16
Point Register Pair HL to 27E3H, MSG16, the text OFF: both bits set, wait for FALSE (source: OFF).
2622DMSG0X
DMSG0X: jump to $DSPLY at 241CH to show the text at Register Pair HL and return to DSPRET (DSPALL) or to GETRSPR (267AH) for a QUERY prompt (source: display and return).
2625DMSG22
LD HL,2803H 21 03 28LD HL,MSG22
DMSG22: point Register Pair HL to 2803H, MSG22, a 0DH that ends the display with a new line (source: CR).
2628
Jump to $DSPLY at 241CH to show the text at Register Pair HL and return to DSPALL (source: display and return).
262BDMSG23
LD HL,2804H 21 04 28LD HL,MSG23
DMSG23: point Register Pair HL to 2804H, MSG23, a comma and a space between two settings (source: ', ').
262E
Jump to $DSPLY at 241CH to show the text at Register Pair HL and return to DSPALL (source: display and return).

2631H - Member 4 (SETCOM): DSPALL, the Settings

DSPALL calls each routine of DSPTBL (271AH) in turn, by pushing the return address DSPRET and jumping to the routine, until the word 0000H. The display is three lines: RS232 parameters: Baud=300, Word=7, Stop=1, Parity=EVEN, Break=X'03', then Output control: DTR=ON, RTS=OFF, then Input control: RI=IGNORE, DSR=IGNORE, CD=IGNORE, CTS=IGNORE (the starting values).

2631DSPALL
PUSH IY FD E5
DSPALL: save Index Register IY on the stack (source: save).
2633
LD IY,271AH FD 21 1A 27LD IY,DSPTBL
Point Index Register IY to 271AH, DSPTBL, the addresses of the display routines (source: display table).
2637DSPSET
LD L,(IY+00H) FD 6E 00
DSPSET: load Register L with the low byte of the next routine's address (IY+00H), Index Register IY holding the table pointer (source: get lsb vector).
263A
LD H,(IY+01H) FD 66 01
Load Register H with the high byte of the routine's address (IY+01H), Index Register IY holding the table pointer (source: get msb vector).
263D
LD A,H 7C
Load Register A with Register H (source: check for term).
263E
OR L B5
OR Register A with Register L: zero for the word 0000H that ends the table (source: HL = 0000?).
263F
If the table has ended, jump relative to DSPDONE at 264DH (source: yes, go).
2641
PUSH HL E5
Save Register Pair HL, the routine's address, on the stack (source: save address).
2642
LD HL,2647H 21 47 26LD HL,DSPRET
Point Register Pair HL to 2647H, DSPRET, where the routine is to return (source: return vector).
2645
EX (SP),HL E3
Exchange Register Pair HL with the top of the stack (Stack Pointer): 2647H goes on the stack, Register Pair HL = the routine (source: leave return, get vector).
2646
JP (HL) E9
Jump to the routine at Register Pair HL, which returns to DSPRET (source: display).
2647DSPRET
INC IY FD 23
DSPRET: increment Index Register IY to the high byte of the entry (source: bump table).
2649
INC IY FD 23
Increment Index Register IY to the next entry of two bytes (source: 2 byte entries).
264B
Jump relative to DSPSET at 2637H for the next routine (source: continue).
264DDSPDONE
POP IY FD E1
DSPDONE: restore Index Register IY from the stack (source: restore).
264F
RET C9
Return to $EXIT at 2407H, the return address of the call at 2404H, for the return code 0000H (source: display complete).

2650H - Member 4 (SETCOM): GETIT, CKRSP, GETRSP and DEFALT

GETIT asks for one setting unless CKRSP finds its response byte holding a kind of value that the entry's type allows (bits 7-5 of both). GETRSP runs the display routine, moves the cursor to column 20 of the same row with @VDCTL, shows a question mark and reads up to ten keys at INBUF (29EFH, after the member). An answer is read by @PARAM as (F= and the keys through PTBL2, a table of one entry whose type is the entry's kinds with a name of one letter; its response byte and value are then copied into the real entry. ENTER alone returns Z and No Carry, an answer Z and Carry; an answer @PARAM cannot read returns NZ and GETIT asks again. DEFALT stores the driver's starting values.

2650GETIT
PUSH HL E5
GETIT: save Register Pair HL, the address of the display routine, on the stack (source: save display driver).
2651
PUSH DE D5
Save Register Pair DE, the address of the entry's type byte, on the stack (source: save type byte).
2652
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL: Register Pair HL = the type byte (source: type byte to HL).
2653
Call CKRSP at 2663H: NZ when the setting was given on the line with a kind its type allows (source: check if response enterd).
2656
POP DE D1
Restore Register Pair DE, the type byte's address (source: restore type byte).
2657
POP HL E1
Restore Register Pair HL, the display routine's address (source: restore prompt).
2658
RET NZ C0
If the setting was given (NZ, No Carry from the AND), return without asking (source: already have this one).
2659
PUSH HL E5
Save Register Pair HL, the display routine, on the stack for a repeated question (source: save for repeat prompt).
265A
PUSH DE D5
Save Register Pair DE, the type byte's address, on the stack.
265B
Call GETRSP at 2674H to show the prompt and read the answer (source: get user response).
265E
POP DE D1
Restore Register Pair DE, the type byte's address (source: restore data).
265F
POP HL E1
Restore Register Pair HL, the display routine's address.
2660
If @PARAM could not read the answer (NZ), jump relative to GETIT at 2650H to ask again (source: invalid, ask again).
2662
RET C9
Return with Z, and Carry for an answer read or No Carry for ENTER alone (source: else param loaded).
2663CKRSP
LD (26A0H),HL 22 A0 26LD (TTYP),HL
CKRSP: store Register Pair HL, the type byte's address, into 26A0H-26A1H, the operand of the LD HL at 269FH (source: save type position).
2666MVUP
LD A,0FH 3E 0F
MVUP: load Register A with 0FH, the mask of the name length in a type byte (source: low 4 bits for length).
2668
LD C,(HL) 4E
Load Register C with the type byte at Register Pair HL (source: get type byte).
2669
AND C A1
AND Register A with Register C: the length of the name (source: fetch length).
266AUP
INC HL 23
UP: increment Register Pair HL over the name (source: bump pointer).
266B
DEC A 3D
Decrement Register A, the characters of the name left (source: less length).
266C
If characters are left, jump relative to UP at 266AH (source: go for length).
266E
INC HL 23
Increment Register Pair HL past the last character to the response byte (source: bump to next).
266F
LD A,(HL) 7E
Load Register A with the response byte at Register Pair HL (source: get response byte).
2670
AND 0E0H E6 E0
Mask Register A with E0H, the kinds of value found: bit 7 a number, bit 6 a switch, bit 5 a string (source: response type bits).
2672
AND C A1
AND Register A with Register C, the type byte: NZ when the kind found is one the entry allows; the AND clears the Carry flag (source: compare to entered).
2673
RET C9
Return with Register Pair HL at the response byte (source: return with status).
2674GETRSP
PUSH HL E5
GETRSP: save Register Pair HL, the display routine's address, on the stack (source: save driver address).
2675
LD HL,267AH 21 7A 26LD HL,GETRSPR
Point Register Pair HL to 267AH, GETRSPR, where the display routine is to return (source: return vector).
2678
EX (SP),HL E3
Exchange Register Pair HL with the top of the stack (Stack Pointer): 267AH goes on the stack, Register Pair HL = the routine (source: leave get display driver).
2679
JP (HL) E9
Jump to the display routine at Register Pair HL, which shows the setting and returns to GETRSPR (source: display prompt).
267AGETRSPR
LD B,04H 06 04
GETRSPR: load Register B with 04H, the @VDCTL function that returns the cursor's row and column in Register Pair HL (source: command get cursor).
267C
LD A,0FH 3E 0F
Load Register A with 0FH, SVC 15, @VDCTL, the video control SVC (source: fetch cursor).
267E
RST 28H EF
Call @VDCTL with RST 28H (BOOT/SYS code at 0B99H): Register H = the row, Register L = the column.
267F
LD L,14H 2E 14
Load Register L with 14H, column 20, where the question mark goes (source: column to position to).
2681
LD B,03H 06 03
Load Register B with 03H, the @VDCTL function that puts the cursor at the row in Register H and the column in Register L (source: command put cursor).
2683
LD A,0FH 3E 0F
Load Register A with 0FH, SVC 15, @VDCTL (source: setup new cursor).
2685
RST 28H EF
Call @VDCTL with RST 28H to move the cursor to column 20 of the same row.
2686
LD HL,26F7H 21 F7 26LD HL,PROMPT
Point Register Pair HL to 26F7H, PROMPT, a question mark and a space ended by 03H (source: prompt text).
2689
Call $DSPLY at 241CH to show the text at Register Pair HL (source: display prompt).
268C
XOR A AF
Clear Register A to 00H for the response byte of PTBL2 (source: load zero).
268D
LD (29E8H),A 32 E8 29LD (FRESP),A
Store Register A, 00H, into 29E8H, FRESP, the response byte of PTBL2's entry; @PARAM clears it again (source: clear response byte).
2690
LD HL,29EFH 21 EF 29LD HL,INBUF
Point Register Pair HL to 29EFH, INBUF, after the text (F= at FSTR, outside the member (source: key input buffer).
2693
LD BC,0A00H 01 00 0A
Load Register Pair BC with 0A00H: Register B = 10, the most keys of an answer, Register C = 0 (source: max input length).
2696
LD A,09H 3E 09
Load Register A with 09H, SVC 9, @KEYIN, which reads a line from the keyboard (source: get user input).
2698
RST 28H EF
Call @KEYIN with RST 28H (BOOT/SYS) to read the keys and the ENTER into Register Pair HL, 29EFH; Register B = the keys typed.
2699
If BREAK was pressed (Carry), jump to $ABORT at 2411H: FFFFH; settings already stored by DEFAULT stay (source: terminate on BREAK).
269C
INC B 04
Increment Register B, the keys typed (source: check if nil input).
269D
DEC B 05
Decrement Register B back: the Z flag is set when ENTER was pressed alone (source: B=0?).
269E
RET Z C8
For ENTER alone, return Z with No Carry: the setting is kept (source: no input, go).
269F
LD HL,0000H 21 00 00
Load Register Pair HL with the type byte's address that CKRSP stored into 26A0H-26A1H (0000H in the file) (source: get param pointer).
26A2
LD A,(HL) 7E
Load Register A with the type byte at Register Pair HL (source: get response type).
26A3
AND 0F0H E6 F0
Mask Register A with F0H, the kinds of value and the abbreviation bit (source: attribute only).
26A5
OR 01H F6 01
OR Register A with 01H, a name of one letter (source: single byte char).
26A7
LD (29E6H),A 32 E6 29LD (FTYP),A
Store Register A into 29E6H, FTYP, the type byte of PTBL2's entry (source: pass to new block).
26AA
LD HL,29ECH 21 EC 29LD HL,FSTR
Point Register Pair HL to 29ECH, FSTR, the text (F= that the answer at 29EFH continues (source: set command pointer).
26AD
LD DE,29E5H 11 E5 29LD DE,PTBL2
Point Register Pair DE to 29E5H, PTBL2, the table of the one parameter F (source: mini-param table).
26B0
LD A,11H 3E 11
Load Register A with 11H, SVC 17, @PARAM, which reads a parameter list (source: evaluate input).
26B2
RST 28H EF
Call @PARAM with RST 28H (the SYS0/SYS stub 1987H, code in SYS1/SYS at 21D7H): the value goes to FPARM 276AH, the response to 29E8H.
26B3
RET NZ C0
If @PARAM returned NZ (EVEN or ODD without quotes, any word that is not a number, a switch or a string), return NZ: GETIT asks again (source: invalid, go).
26B4
LD HL,(26A0H) 2A A0 26LD HL,(TTYP)
Load Register Pair HL with the word at 26A0H, the address of the entry's type byte that CKRSP stored (source: get response pointer).
26B7
Call MVUP at 2666H to move Register Pair HL over the name to the entry's response byte (source: move to response byte).
26BA
LD A,(29E8H) 3A E8 29LD A,(FRESP)
Load Register A with the byte at 29E8H, FRESP, the response of the answer (source: get input response).
26BD
LD (HL),A 77
Store Register A into the entry's response byte at Register Pair HL; the kind is not checked against the entry's type (source: to param block).
26BE
INC HL 23
Increment Register Pair HL to the word after the response byte (source: bump to word pointer).
26BF
Call GETHL at 29B4H to load Register Pair HL with that word, the address of the parameter's value (source: get pointer).
26C2
LD BC,(276AH) ED 4B 6A 27LD BC,(FPARM)
Load Register Pair BC with the word at 276AH, FPARM, the value of the answer (source: get temp param).
26C6
LD (HL),C 71
Store Register C, the low byte, into the parameter's value at Register Pair HL (source: load into param block).
26C7
INC HL 23
Increment Register Pair HL to the high byte of the value (source: bump pointer).
26C8
LD (HL),B 70
Store Register B, the high byte, into the value at Register Pair HL (source: new param loaded).
26C9
XOR A AF
Clear Register A to 00H, which sets the Z flag (source: set NO error).
26CA
SCF 37
Set the Carry flag: an answer was read (source: carry = input).
26CB
RET C9
Return to GETIT with Z and Carry (source: done).
26CCDEFALT
LD (IX+04H),00H DD 36 04 00
DEFALT: store 00H into MSMASK (IX+04H), Index Register IX holding the address of CLDCB: all four line conditions IGNORE (source operand DEFMS).
26D0
LD (IX+05H),0A5H DD 36 05 A5
Store A5H into UCIMAGE (IX+05H), Index Register IX holding the address of CLDCB: even parity on, 7 bits, 1 stop bit, transmit on, DTR TRUE, RTS FALSE (source operand DEFUC).
26D4
LD (IX+06H),55H DD 36 06 55
Store 55H into BAUDRT (IX+06H), Index Register IX holding the address of CLDCB: 300 baud to send and to receive (source operand DEFBA).
26D8
LD (IX+07H),03H DD 36 07 03
Store 03H into LOGBRK (IX+07H), Index Register IX holding the address of CLDCB: CTRL C is BREAK (source operand DEFBR).
26DC
RET C9
Return to 2465H. The four bytes act before @CTL: COM/DVR reads MSMASK and LOGBRK as it sends and receives and writes UCIMAGE to the UART before each character it sends; only the rates in BAUDRT wait for 252DH, so after a refusal they are shown but not in use (B191).

26DDH - Member 4 (SETCOM): The Tables and Texts

MDNAME is COM/DVR's module name, BAUDTBL the sixteen rates in the order of the UART's rate codes 0-15, DSPTBL the display routines of DSPALL, then the value words of the parameters (where @PARAM puts each value), the texts, and PRMTBL$, an enhanced table for @PARAM: each entry a type byte (bits 7-5 the kinds of value it takes, bit 4 a one letter abbreviation allowed, bits 3-0 the length of the name), the name, the response byte and the address of the value word.

26DD-26E0MDNAME
DEFM "$CL" / DEFB 03H 24 43 4C 03
MDNAME, 26DDH-26E0H: the module name of COM/DVR, $CL, ended by 03H, for @GTMOD at 2440H.
26E1-26F6BADDCB
DEFM "COM/DVR not installed" / DEFB 0DH 43 4F 4D 2F 44 56 52 20 6E 6F 74 20 69 6E 73 74 61 6C 6C 65 64 0D
BADDCB, 26E1H-26F6H: the message of BADMOD (242BH) when no module $CL is in memory.
26F7-26F9PROMPT
DEFM "? " / DEFB 03H 3F 20 03
PROMPT, 26F7H-26F9H: a question mark and a space ended by 03H, shown in column 20 after each setting of QUERY.
26FA-270BBAUDTBL
DEFW 0032H, 004BH, 006EH, 0087H, 0096H, 012CH, 0258H, 04B0H, 0708H 32 00 4B 00 6E 00 87 00 96 00 2C 01 58 02 B0 04 08 07
BAUDTBL, 26FAH-270BH: the rates of codes 0-8: 50, 75, 110, 135 (134.5), 150, 300, 600, 1200 and 1800 baud.
270C-2719
DEFW 07D0H, 0960H, 0E10H, 12C0H, 1C20H, 2580H, 4B00H D0 07 60 09 10 0E C0 12 20 1C 80 25 00 4B
270CH-2719H: the rates of codes 9-15: 2000, 2400, 3600, 4800, 7200, 9600 and 19200 baud.
271A-272BDSPTBL
DEFW 252FH, 2538H, 262BH, 2566H, 262BH, 257FH, 262BH, 2591H, 262BH 2F 25 38 25 2B 26 66 25 2B 26 7F 25 2B 26 91 25 2B 26
DSPTBL, 271AH-272BH: DMSG1 (RS232 parameters:), DMSG2 (Baud=), DMSG23 (a comma), DMSG3 (Word=), a comma, DMSG4 (Stop=), a comma, DMSG5 (Parity=) and a comma.
272C-2737
DEFW 25B0H, 25C5H, 25CBH, 262BH, 25D7H, 25ECH B0 25 C5 25 CB 25 2B 26 D7 25 EC 25
272CH-2737H: DMSG6 (Break=), DMSG7 (Output control:), DMSG8 (DTR=), a comma, DMSG9 (RTS=) and DMSG10 (Input control:).
2738-2749
DEFW 25F2H, 262BH, 25F9H, 262BH, 2600H, 262BH, 2607H, 2625H, 0000H F2 25 2B 26 F9 25 2B 26 00 26 2B 26 07 26 25 26 00 00
2738H-2749H: DMSG11 (RI=), a comma, DMSG12 (DSR=), a comma, DMSG13 (CD=), a comma, DMSG14 (CTS=), DMSG22 (the 0DH) and the 0000H that ends the table.
274A-274BBREAKP
DEFW 0000H 00 00
BREAKP, 274AH-274BH: the value of BREAK: FFFFH or 0000H for a switch, else the character; read at 2927H.
274C-274DQPARM
DEFW 0000H 00 00
QPARM, 274CH-274DH: the value of QUERY, tested at 2465H: QUERY=OFF does not ask.
274E-274FBAUDP
DEFW 0000H 00 00
BAUDP, 274EH-274FH: the value of BAUD, read by CKBAUD (29C2H).
2750-2751WORDP
DEFW 0000H 00 00
WORDP, 2750H-2751H: the value of WORD, read at 248FH (the low byte) and 2899H.
2752-2753STOPP
DEFW 0000H 00 00
STOPP, 2752H-2753H: the value of STOP, read at 24ABH (the low byte) and 28BBH.
2754-2755PARITYP
DEFW 0000H 00 00
PARITYP, 2754H-2755H: the value of PARITY: FFFFH or 0000H for a switch, the address of the first character for a string; read at 24CDH and 28D8H.
2756-2757EVENP
DEFW 0000H 00 00
EVENP, 2756H-2757H: the value of EVEN, FFFFH or 0000H, read at 2915H.
2758-2759ODDP
DEFW 0000H 00 00
ODDP, 2758H-2759H: the value of ODD, FFFFH or 0000H, read at 2903H.
275A-275BDTRP
DEFW 0000H 00 00
DTRP, 275AH-275BH: the value of DTR, read at 2945H: 0000H for OFF, anything else ON.
275C-275DRTSP
DEFW 0000H 00 00
RTSP, 275CH-275DH: the value of RTS, read at 2957H: 0000H for OFF, anything else ON.
275E-275FRIP
DEFW 0000H 00 00
RIP, 275EH-275FH: the value of RI, read by SETIT through RIRESP's word.
2760-2761CDP
DEFW 0000H 00 00
CDP, 2760H-2761H: the value of CD, read by SETIT through CDRESP's word.
2762-2763DSRP
DEFW 0000H 00 00
DSRP, 2762H-2763H: the value of DSR, read by SETIT through DSRESP's word.
2764-2765CTSP
DEFW 0000H 00 00
CTSP, 2764H-2765H: the value of CTS, read by SETIT through CTRESP's word.
2766-2767DFPARM
DEFW 0000H 00 00
DFPARM, 2766H-2767H: the value of DEFAULT, tested at 245CH: DEFAULT=OFF does nothing.
2768-2769PORTD
DEFW 0000H 00 00
PORTD, 2768H-2769H: a word that no table entry names and nothing reads.
276A-276BFPARM
DEFW 0000H 00 00
FPARM, 276AH-276BH: the value of PTBL2's parameter F, an answer of QUERY, stored by @PARAM and copied at 26C2H.
276C-277FMSG1
DEFB 00H / DEFM "RS232 parameters: " / DEFB 03H 00 52 53 32 33 32 20 70 61 72 61 6D 65 74 65 72 73 3A 20 03
MSG1, 276CH-277FH: a 00H, which sets the video driver's show-control-codes bit for the next character only (the R after it, so nothing shows; DMSG1 makes it 0AH after the display), the first label and 03H.
2780-2785MSG2
DEFM "Baud=" / DEFB 03H 42 61 75 64 3D 03
MSG2, 2780H-2785H: the label of the baud rate, shown by DMSG2.
2786-278BMSG3
DEFM "Word=" / DEFB 03H 57 6F 72 64 3D 03
MSG3, 2786H-278BH: the label of the word length, shown by DMSG3.
278C-2791MSG4
DEFM "Stop=" / DEFB 03H 53 74 6F 70 3D 03
MSG4, 278CH-2791H: the label of the stop bits, shown by DMSG4.
2792-2799MSG5
DEFM "Parity=" / DEFB 03H 50 61 72 69 74 79 3D 03
MSG5, 2792H-2799H: the label of the parity, shown by DMSG5.
279A-27A0MSG6
DEFM "Break=" / DEFB 03H 42 72 65 61 6B 3D 03
MSG6, 279AH-27A0H: the label of the BREAK character, shown by DMSG6.
27A1-27B2MSG7
DEFB 0AH / DEFM "Output control: " / DEFB 03H 0A 4F 75 74 70 75 74 20 63 6F 6E 74 72 6F 6C 3A 20 03
MSG7, 27A1H-27B2H: a line feed, which the video driver takes as a new line, and the label of DTR and RTS.
27B3-27B7MSG8
DEFM "DTR=" / DEFB 03H 44 54 52 3D 03
MSG8, 27B3H-27B7H: the label of DTR, Data Terminal Ready, shown by DMSG8.
27B8-27BCMSG9
DEFM "RTS=" / DEFB 03H 52 54 53 3D 03
MSG9, 27B8H-27BCH: the label of RTS, Request to Send, shown by DMSG9.
27BD-27CDMSG10
DEFB 0AH / DEFM "Input control: " / DEFB 03H 0A 49 6E 70 75 74 20 63 6F 6E 74 72 6F 6C 3A 20 03
MSG10, 27BDH-27CDH: a line feed and the label of the four line conditions.
27CE-27D1MSG11
DEFM "RI=" / DEFB 03H 52 49 3D 03
MSG11, 27CEH-27D1H: the label of RI, Ring Indicator, shown by DMSG11.
27D2-27D6MSG12
DEFM "DSR=" / DEFB 03H 44 53 52 3D 03
MSG12, 27D2H-27D6H: the label of DSR, Data Set Ready, shown by DMSG12.
27D7-27DAMSG13
DEFM "CD=" / DEFB 03H 43 44 3D 03
MSG13, 27D7H-27DAH: the label of CD, Carrier Detect, shown by DMSG13.
27DB-27DFMSG14
DEFM "CTS=" / DEFB 03H 43 54 53 3D 03
MSG14, 27DBH-27DFH: the label of CTS, Clear to Send, shown by DMSG14.
27E0-27E2MSG15
DEFM "ON" / DEFB 03H 4F 4E 03
MSG15, 27E0H-27E2H: ON, for DTR and RTS TRUE and for a line condition that waits for TRUE.
27E3-27E6MSG16
DEFM "OFF" / DEFB 03H 4F 46 46 03
MSG16, 27E3H-27E6H: OFF, for parity off, DTR and RTS FALSE, and a line condition that waits for FALSE.
27E7-27EAMSG17
DEFM "ODD" / DEFB 03H 4F 44 44 03
MSG17, 27E7H-27EAH: ODD, the parity with bit 7 of UCIMAGE clear.
27EB-27EFMSG18
DEFM "EVEN" / DEFB 03H 45 56 45 4E 03
MSG18, 27EBH-27EFH: EVEN, the parity with bit 7 of UCIMAGE set.
27F0-27F6MSG19
DEFM "IGNORE" / DEFB 03H 49 47 4E 4F 52 45 03
MSG19, 27F0H-27F6H: IGNORE, a line condition that the driver does not test before it sends.
27F7-27FCMSG20
DEFM "00000" / DEFB 03H 30 30 30 30 30 03
MSG20, 27F7H-27FCH: five characters that @HEXDEC fills with the baud rate (2555H), and 03H.
27FD-27FEMSG21
DEFM "X" / DEFB 27H 58 27
MSG21, 27FDH-27FEH: X and the opening quote of the BREAK character in hex.
27FF-2802MSG21A
DEFM "00" / DEFB 27H, 03H 30 30 27 03
MSG21A, 27FFH-2802H: two hex digits that @HEX8 fills (25BEH), the closing quote and 03H.
2803MSG22
DEFB 0DH 0D
MSG22, 2803H: the 0DH that ends the display with a new line, shown by DMSG22.
2804-2806MSG23
DEFM ", " / DEFB 03H 2C 20 03
MSG23, 2804H-2806H: a comma and a space between two settings, ended by 03H.
2807PRMTBL$
DEFB 80H 80
PRMTBL$, 2807H: 80H, the mark of an enhanced parameter table for @PARAM (source: extended param).
2808-280DBRTYP
DEFB 0C5H / DEFM "BREAK" C5 42 52 45 41 4B
BRTYP, 2808H-280DH: type C5H (a switch or a number, no abbreviation, 5 characters) and the name BREAK.
280EBRRESP
DEFB 00H 00
BRRESP, 280EH: the response byte of BREAK, read at 2921H.
280F-2810
DEFW 274AH 4A 27
280FH-2810H: where BREAK's value goes, BREAKP at 274AH.
2811-2816
DEFB 55H / DEFM "QUERY" 55 51 55 45 52 59
2811H-2816H: type 55H (a switch, a one letter abbreviation allowed, 5 characters) and the name QUERY, or Q.
2817QRESP
DEFB 00H 00
QRESP, 2817H: the response byte of QUERY, set by @PARAM and not read; the value is tested at 2465H.
2818-2819
DEFW 274CH 4C 27
2818H-2819H: where QUERY's value goes, QPARM at 274CH.
281A-281EBTYP
DEFB 94H / DEFM "BAUD" 94 42 41 55 44
BTYP, 281AH-281EH: type 94H (a number, a one letter abbreviation allowed, 4 characters) and the name BAUD, or B.
281FBRESP
DEFB 00H 00
BRESP, 281FH: the response byte of BAUD, read at 2883H and cleared by BADBAUD (247FH).
2820-2821
DEFW 274EH 4E 27
2820H-2821H: where BAUD's value goes, BAUDP at 274EH.
2822-2826WTYP
DEFB 94H / DEFM "WORD" 94 57 4F 52 44
WTYP, 2822H-2826H: type 94H (a number, a one letter abbreviation allowed, 4 characters) and the name WORD, or W.
2827WRESP
DEFB 00H 00
WRESP, 2827H: the response byte of WORD, read at 2893H and cleared by BADWORD (249BH).
2828-2829
DEFW 2750H 50 27
2828H-2829H: where WORD's value goes, WORDP at 2750H.
282A-282ESTYP
DEFB 94H / DEFM "STOP" 94 53 54 4F 50
STYP, 282AH-282EH: type 94H (a number, a one letter abbreviation allowed, 4 characters) and the name STOP, or S.
282FSRESP
DEFB 00H 00
SRESP, 282FH: the response byte of STOP, read at 28B5H and cleared by BADSTOP (24B6H).
2830-2831
DEFW 2752H 52 27
2830H-2831H: where STOP's value goes, STOPP at 2752H.
2832-2838PTYP
DEFB 76H / DEFM "PARITY" 76 50 41 52 49 54 59
PTYP, 2832H-2838H: type 76H (a switch or a string, a one letter abbreviation allowed, 6 characters) and the name PARITY, or P.
2839PRESP
DEFB 00H 00
PRESP, 2839H: the response byte of PARITY, read at 24CAH and 28D2H, cleared by BADPAR (24BCH).
283A-283B
DEFW 2754H 54 27
283AH-283BH: where PARITY's value goes, PARITYP at 2754H.
283C-2840ETYP
DEFB 54H / DEFM "EVEN" 54 45 56 45 4E
ETYP, 283CH-2840H: type 54H (a switch, a one letter abbreviation allowed, 4 characters) and the name EVEN, or E.
2841ERESP
DEFB 00H 00
ERESP, 2841H: the response byte of EVEN, read at 290FH.
2842-2843
DEFW 2756H 56 27
2842H-2843H: where EVEN's value goes, EVENP at 2756H.
2844-2847OTYP
DEFB 53H / DEFM "ODD" 53 4F 44 44
OTYP, 2844H-2847H: type 53H (a switch, a one letter abbreviation allowed, 3 characters) and the name ODD, or O.
2848ORESP
DEFB 00H 00
ORESP, 2848H: the response byte of ODD, read at 28FDH.
2849-284A
DEFW 2758H 58 27
2849H-284AH: where ODD's value goes, ODDP at 2758H.
284B-284EDTYP
DEFB 43H / DEFM "DTR" 43 44 54 52
DTYP, 284BH-284EH: type 43H (a switch, no abbreviation, 3 characters) and the name DTR.
284FDTRESP
DEFB 00H 00
DTRESP, 284FH: the response byte of DTR, read at 293FH.
2850-2851
DEFW 275AH 5A 27
2850H-2851H: where DTR's value goes, DTRP at 275AH.
2852-2855RTYP
DEFB 43H / DEFM "RTS" 43 52 54 53
RTYP, 2852H-2855H: type 43H (a switch, no abbreviation, 3 characters) and the name RTS.
2856RTRESP
DEFB 00H 00
RTRESP, 2856H: the response byte of RTS, read at 2951H.
2857-2858
DEFW 275CH 5C 27
2857H-2858H: where RTS's value goes, RTSP at 275CH.
2859-285BRITYP
DEFB 42H / DEFM "RI" 42 52 49
RITYP, 2859H-285BH: type 42H (a switch, no abbreviation, 2 characters) and the name RI.
285CRIRESP
DEFB 00H 00
RIRESP, 285CH: the response byte of RI, read by SETIT (2968H).
285D-285E
DEFW 275EH 5E 27
285DH-285EH: where RI's value goes, RIP at 275EH.
285F-2861CDTYP
DEFB 42H / DEFM "CD" 42 43 44
CDTYP, 285FH-2861H: type 42H (a switch, no abbreviation, 2 characters) and the name CD.
2862CDRESP
DEFB 00H 00
CDRESP, 2862H: the response byte of CD, read by SETIT (2978H).
2863-2864
DEFW 2760H 60 27
2863H-2864H: where CD's value goes, CDP at 2760H.
2865-2868DSTYP
DEFB 43H / DEFM "DSR" 43 44 53 52
DSTYP, 2865H-2868H: type 43H (a switch, no abbreviation, 3 characters) and the name DSR.
2869DSRESP
DEFB 00H 00
DSRESP, 2869H: the response byte of DSR, read by SETIT (2970H).
286A-286B
DEFW 2762H 62 27
286AH-286BH: where DSR's value goes, DSRP at 2762H.
286C-286FCTTYP
DEFB 43H / DEFM "CTS" 43 43 54 53
CTTYP, 286CH-286FH: type 43H (a switch, no abbreviation, 3 characters) and the name CTS.
2870CTRESP
DEFB 00H 00
CTRESP, 2870H: the response byte of CTS, read by SETIT (2980H).
2871-2872
DEFW 2764H 64 27
2871H-2872H: where CTS's value goes, CTSP at 2764H.
2873-287A
DEFB 57H / DEFM "DEFAULT" 57 44 45 46 41 55 4C 54
2873H-287AH: type 57H (a switch, a one letter abbreviation allowed, 7 characters) and the name DEFAULT, or D.
287B
DEFB 00H 00
287BH: the response byte of DEFAULT, set by @PARAM and not read; the value is tested at 245CH.
287C-287D
DEFW 2766H 66 27
287CH-287DH: where DEFAULT's value goes, DFPARM at 2766H.
287E
DEFB 00H 00
287EH: the 00H where the next entry's type byte would be, the end of the table (source: list terminator).

287FH - Member 4 (SETCOM): SETPARAM, Checking and Storing

SETPARAM pushes the address of PRMERR, so that each of its conditional returns is a Parameter error, and handles the parameters in this order: BAUD (stored at once into BAUDRT), WORD, STOP, PARITY with EVEN and ODD (built in Register C from UCIMAGE), BREAK (stored at once into LOGBRK), DTR and RTS, then UCIMAGE with the transmit bit set, then RI, DSR, CD and CTS in MSMASK. A refusal after BAUD (by WORD, STOP, PARITY or BREAK) leaves the new rate in BAUDRT, where the display shows it, but the UART is not told (252DH is not reached); BREAK is stored early too, but it is the last check that can refuse, so that has no effect. PARITY given as a string skips EVEN and ODD; PARITY=OFF skips them too. BREAK=OFF stores 80H, not 00H.

287FSETPARAM
LD HL,2435H 21 35 24LD HL,PRMERR
SETPARAM: point Register Pair HL to 2435H, PRMERR (source: param error exit vector).
2882
PUSH HL E5
Save Register Pair HL, 2435H, on the stack: a RET of SETPARAM goes to Parameter error, only 2988H takes it off (source: leave for quick exits).
2883SETBAUD
LD A,(281FH) 3A 1F 28LD A,(BRESP)
SETBAUD: load Register A with the byte at 281FH, BRESP, the response byte of BAUD (source: get baud response).
2886
OR A B7
OR Register A with itself to set the Z flag when BAUD was not given (source: anything?).
2887
If BAUD was not given, jump relative to SETWORD at 2890H (source: nope, go).
2889
Call CKBAUD at 29C2H: Z with Register A = the rate code in both nibbles when the value is one of the sixteen rates (source: get baud setting).
288C
RET NZ C0
If the rate is not in the table, return to PRMERR at 2435H (source: go if error).
288D
LD (IX+06H),A DD 77 06
Store Register A, the rate code for sending and receiving, into BAUDRT (IX+06H), Index Register IX holding the address of CLDCB, at once (source: else save new baud).
2890SETWORD
LD C,(IX+05H) DD 4E 05
SETWORD: load Register C with UCIMAGE (IX+05H), Index Register IX holding the address of CLDCB: the present control byte, which the next steps change (source: p/u current setings).
2893
LD A,(2827H) 3A 27 28LD A,(WRESP)
Load Register A with the byte at 2827H, WRESP, the response byte of WORD (source: get word response).
2896
OR A B7
OR Register A with itself to set the Z flag when WORD was not given (source: anything?).
2897
If WORD was not given, jump relative to SETSTOP at 28B5H (source: nope, continue).
2899
LD DE,(2750H) ED 5B 50 27LD DE,(WORDP)
Load Register Pair DE with the word at 2750H, WORDP, the value of WORD (source: get parameter).
289D
INC D 14
Increment Register D, the high byte (source: check msb).
289E
DEC D 15
Decrement Register D back: the Z flag is set when the high byte is 00H (source: D<>0?).
289F
RET NZ C0
If the value is 256 or more, return to PRMERR at 2435H (source: >256?).
28A0
LD A,E 7B
Load Register A with Register E, the word length (source: get lsb).
28A1
SUB 05H D6 05
Subtract 05H from Register A: 0 to 3 for 5 to 8 bits (source: adjust 0 relative).
28A3
RET C D8
If the word length is below 5 (Carry), return to PRMERR at 2435H (source: go if out of range).
28A4
CP 04H FE 04
Compare Register A with 04H, one more than the code of 8 bits (source: 5-8?).
28A6
RET NC D0
If it is 4 or more, 9 bits or more, return to PRMERR at 2435H (source: out of range).
28A7
OR A B7
OR Register A with itself: the parity flag is even for 0 (5 bits) and 3 (8 bits) (source: clear carry, set PV).
28A8
If the parity is even, jump to 28ADH: 00 and 11 are the UART's codes as they are (source: go if 5/8).
28AB
XOR 03H EE 03
Otherwise flip both bits of Register A with XOR 03H: 1 (6 bits) becomes 10, 2 (7 bits) becomes 01 (source: change 6=>7=>6).
28AD
RRCA 0F
Rotate Register A right; three rotations move bits 1-0 to bits 6-5 (source: align to bits 6/5).
28AE
RRCA 0F
Rotate Register A right (second of the three rotations).
28AF
RRCA 0F
Rotate Register A right (third rotation): the word length code is in bits 6-5 of Register A.
28B0
LD B,60H 06 60
Load Register B with 60H, the mask of bits 6-5 (source: for bit setup).
28B2
Call SETBITS at 29ABH to put bits 6-5 of Register A into Register C (source: setup in C register).
28B5SETSTOP
LD A,(282FH) 3A 2F 28LD A,(SRESP)
SETSTOP: load Register A with the byte at 282FH, SRESP, the response byte of STOP (source: get response byte).
28B8
OR A B7
OR Register A with itself to set the Z flag when STOP was not given (source: anything?).
28B9
If STOP was not given, jump relative to SETPAR at 28D2H (source: nope, continue).
28BB
LD DE,(2752H) ED 5B 52 27LD DE,(STOPP)
Load Register Pair DE with the word at 2752H, STOPP, the value of STOP (source: get input).
28BF
INC D 14
Increment Register D, the high byte (source: check for out of range).
28C0
DEC D 15
Decrement Register D back: the Z flag is set when the high byte is 00H (source: D<>0?).
28C1
RET NZ C0
If the value is 256 or more, return to PRMERR at 2435H (source: >256).
28C2
LD A,E 7B
Load Register A with Register E, the stop bits (source: get lsb).
28C3
OR A B7
OR Register A with itself to set the Z flag for 0 (source: 0?).
28C4
RET Z C8
If it is 0, return to PRMERR at 2435H (source: invalid if not).
28C5
CP 03H FE 03
Compare Register A with 03H, one more than the most stop bits (source: 1/2?).
28C7
RET NC D0
If it is 3 or more, return to PRMERR at 2435H (source: invalid).
28C8
DEC A 3D
Decrement Register A: 0 for one stop bit, 1 for two (source: change 1/2 to 0/1).
28C9
RLCA 07
Rotate Register A left; four rotations move bit 0 to bit 4 (source: align result).
28CA
RLCA 07
Rotate Register A left (second of the four rotations).
28CB
RLCA 07
Rotate Register A left (third of the four rotations).
28CC
RLCA 07
Rotate Register A left (fourth rotation): the stop bit code is in bit 4 of Register A.
28CD
LD B,10H 06 10
Load Register B with 10H, the mask of bit 4 (source: init mask).
28CF
Call SETBITS at 29ABH to put bit 4 of Register A into Register C (source: setup in C register).
28D2SETPAR
LD A,(2839H) 3A 39 28LD A,(PRESP)
SETPAR: load Register A with the byte at 2839H, PRESP, the response byte of PARITY (source: get parity response).
28D5
OR A B7
OR Register A with itself to set the Z flag when PARITY was not given (source: any input?).
28D6
If PARITY was not given, jump relative to SETPEO at 28FDH for ODD and EVEN (source: nope, check EVEN/ODD).
28D8
LD DE,(2754H) ED 5B 54 27LD DE,(PARITYP)
Load Register Pair DE with the word at 2754H, PARITYP, the value of PARITY (source: get user pointer).
28DC
BIT 6,A CB 77
Test bit 6 of Register A, the mark of a switch (source: switch?).
28DE
If PARITY is a switch, jump relative to SETPOF at 28F5H (source: yes, set ON/OFF).
28E0
LD A,(DE) 1A
Load Register A with the byte at Register Pair DE, the first character of the string; for a number the byte at that address is read, and for a quoted answer at the Parity prompt the byte at 29F0H in INBUF, which the later answers have written over (B194) (source: get input).
28E1
Call UCASE at 29B9H to make Register A a capital letter (source: make upper case).
28E4
CP 4FH FE 4F
Compare Register A with 4FH, O for odd (source: odd?).
28E6
If it is O, jump relative to SETPO at 28EFH (source: yes, go).
28E8
CP 45H FE 45
Compare Register A with 45H, E for even (source: even?).
28EA
RET NZ C0
If it is neither, return to PRMERR at 2435H (source: neither, invalid).
28EBSETPE
SET 7,C CB F9
SETPE: set bit 7 of Register C, even parity (source: set EVEN parity).
28ED
Jump relative to SETPAEO at 28F1H (source: continue).
28EFSETPO
RES 7,C CB B9
SETPO: reset bit 7 of Register C, odd parity (source: set ODD parity).
28F1SETPAEO
RES 3,C CB 99
SETPAEO: reset bit 3 of Register C, parity on (source: set ON parity).
28F3
Jump relative to SETBRK at 2921H: EVEN and ODD on the same line are not looked at (source: continue).
28F5SETPOF
LD A,D 7A
SETPOF: load Register A with Register D, the high byte of PARITY's switch value (source: check input).
28F6
OR E B3
OR Register A with Register E, the low byte: zero for OFF (source: =0000?).
28F7
SET 3,C CB D9
Set bit 3 of Register C, parity off; the SET leaves the flags of the OR (source: set OFF).
28F9
If PARITY=OFF, jump relative to SETBRK at 2921H, past EVEN and ODD (source: continue if yes).
28FB
RES 3,C CB 99
Reset bit 3 of Register C, parity on, and go on to EVEN and ODD (source: set ON).
28FDSETPEO
LD A,(2848H) 3A 48 28LD A,(ORESP)
SETPEO: load Register A with the byte at 2848H, ORESP, the response byte of ODD (source: get odd response).
2900
OR A B7
OR Register A with itself to set the Z flag when ODD was not given (source: anything?).
2901
If ODD was not given, jump relative to SETPAE at 290FH (source: nope, check EVEN).
2903
LD DE,(2758H) ED 5B 58 27LD DE,(ODDP)
Load Register Pair DE with the word at 2758H, ODDP, the value of ODD (source: get user input).
2907
LD A,D 7A
Load Register A with Register D, the high byte (source: check for nil).
2908
OR E B3
OR Register A with Register E, the low byte: zero for ODD=OFF (source: DE=0000?).
2909
SET 7,C CB F9
Set bit 7 of Register C, even parity, for ODD=OFF; the SET leaves the flags of the OR (source: ODD=off?).
290B
If ODD=OFF, jump relative to SETPAE at 290FH (source: go if yes).
290D
RES 7,C CB B9
Reset bit 7 of Register C, odd parity; EVEN and ODD do not turn parity on (only PARITY=ON or a string for PARITY does) (source: ODD=on).
290FSETPAE
LD A,(2841H) 3A 41 28LD A,(ERESP)
SETPAE: load Register A with the byte at 2841H, ERESP, the response byte of EVEN (source: get even response).
2912
OR A B7
OR Register A with itself to set the Z flag when EVEN was not given (source: anything?).
2913
If EVEN was not given, jump relative to SETBRK at 2921H (source: nope, continue).
2915
LD DE,(2756H) ED 5B 56 27LD DE,(EVENP)
Load Register Pair DE with the word at 2756H, EVENP, the value of EVEN (source: get param).
2919
LD A,D 7A
Load Register A with Register D, the high byte (source: check for nil).
291A
OR E B3
OR Register A with Register E, the low byte: zero for EVEN=OFF (source: DE=0000?).
291B
RES 7,C CB B9
Reset bit 7 of Register C, odd parity, for EVEN=OFF; EVEN after ODD wins (source: EVEN=off?).
291D
If EVEN=OFF, jump relative to SETBRK at 2921H (source: go if yes).
291F
SET 7,C CB F9
Set bit 7 of Register C, even parity (source: EVEN=on).
2921SETBRK
LD A,(280EH) 3A 0E 28LD A,(BRRESP)
SETBRK: load Register A with the byte at 280EH, BRRESP, the response byte of BREAK (source: get user response).
2924
OR A B7
OR Register A with itself to set the Z flag when BREAK was not given (source: anything?).
2925
If BREAK was not given, jump relative to SETDTR at 293FH (source: nope, continue).
2927
LD DE,(274AH) ED 5B 4A 27LD DE,(BREAKP)
Load Register Pair DE with the word at 274AH, BREAKP, the value of BREAK (source: get user input).
292B
BIT 6,A CB 77
Test bit 6 of Register A, the mark of a switch (source: switch?).
292D
If BREAK is a switch, jump relative to SETBOF at 2934H (source: yes, check ON/OFF).
292F
INC D 14
Increment Register D, the high byte of the character (source: check msb).
2930
DEC D 15
Decrement Register D back: the Z flag is set when the high byte is 00H (source: D<>0?).
2931
RET NZ C0
If the value is 256 or more, return to PRMERR at 2435H; BREAK=0 is the way to turn BREAK off (source: >256?).
2932
Jump relative to UPDBRK at 293CH to store the character in Register E (source: continue).
2934SETBOF
LD A,D 7A
SETBOF: load Register A with Register D, the high byte of the switch value (source: get input).
2935
OR E B3
OR Register A with Register E, the low byte: zero for BREAK=OFF (source: DE=0000?).
2936
LD E,80H 1E 80
Load Register E with 80H for OFF: COM/DVR then takes a received 80H and a framing error as BREAK; only 00H turns BREAK off (source: default).
2938
If BREAK=OFF, jump relative to UPDBRK at 293CH with Register E = 80H (source: go if off).
293A
LD E,03H 1E 03
Load Register E with 03H, CTRL C, for BREAK alone or ON (source: default).
293CUPDBRK
LD (IX+07H),E DD 73 07
UPDBRK: store Register E into LOGBRK (IX+07H), Index Register IX holding the address of CLDCB, at once (source: update data).
293FSETDTR
LD A,(284FH) 3A 4F 28LD A,(DTRESP)
SETDTR: load Register A with the byte at 284FH, DTRESP, the response byte of DTR (source: get user response byte).
2942
OR A B7
OR Register A with itself to set the Z flag when DTR was not given (source: anything?).
2943
If DTR was not given, jump relative to SETRTS at 2951H (source: continue if not).
2945
LD DE,(275AH) ED 5B 5A 27LD DE,(DTRP)
Load Register Pair DE with the word at 275AH, DTRP, the value of DTR (source: get user param).
2949
LD A,D 7A
Load Register A with Register D, the high byte (source: check if anything).
294A
OR E B3
OR Register A with Register E, the low byte: zero for DTR=OFF (source: DE=0000?).
294B
SET 1,C CB C9
Set bit 1 of Register C, DTR FALSE; the SET leaves the flags of the OR (source: set OFF).
294D
If DTR=OFF, jump relative to SETRTS at 2951H (source: go if yes).
294F
RES 1,C CB 89
Reset bit 1 of Register C, DTR TRUE (source: set ON).
2951SETRTS
LD A,(2856H) 3A 56 28LD A,(RTRESP)
SETRTS: load Register A with the byte at 2856H, RTRESP, the response byte of RTS (source: get user response byte).
2954
OR A B7
OR Register A with itself to set the Z flag when RTS was not given (source: anything?).
2955
If RTS was not given, jump relative to UPDCI at 2963H (source: continue if not).
2957
LD DE,(275CH) ED 5B 5C 27LD DE,(RTSP)
Load Register Pair DE with the word at 275CH, RTSP, the value of RTS (source: get user param).
295B
LD A,D 7A
Load Register A with Register D, the high byte (source: check if 0).
295C
OR E B3
OR Register A with Register E, the low byte: zero for RTS=OFF (source: DE=0000?).
295D
SET 0,C CB C1
Set bit 0 of Register C, RTS FALSE; the SET leaves the flags of the OR (source: set OFF).
295F
If RTS=OFF, jump relative to UPDCI at 2963H (source: go if yes).
2961
RES 0,C CB 81
Reset bit 0 of Register C, RTS TRUE (source: set ON).
2963UPDCI
SET 2,C CB D1
UPDCI: set bit 2 of Register C, transmit on, in case the image held a BREAK (source: enable transmit).
2965
LD (IX+05H),C DD 71 05
Store Register C, the new control byte, into UCIMAGE (IX+05H), Index Register IX holding the address of CLDCB (source: update new data).
2968SETRI
LD HL,285CH 21 5C 28LD HL,RIRESP
SETRI: point Register Pair HL to 285CH, RIRESP, the response byte of RI (source: response byte).
296B
LD C,01H 0E 01
Load Register C with 01H, RI's check bit in MSMASK (source: bit to set).
296D
Call SETIT at 298AH to set RI's two bits from its value (source: setup data).
2970SETDSR
LD HL,2869H 21 69 28LD HL,DSRESP
SETDSR: point Register Pair HL to 2869H, DSRESP, the response byte of DSR (source: response byte).
2973
LD C,04H 0E 04
Load Register C with 04H, DSR's check bit (source: bit mask).
2975
Call SETIT at 298AH to set DSR's two bits (source: setup data).
2978SETCD
LD HL,2862H 21 62 28LD HL,CDRESP
SETCD: point Register Pair HL to 2862H, CDRESP, the response byte of CD (source: response byte).
297B
LD C,02H 0E 02
Load Register C with 02H, CD's check bit (source: bit mask).
297D
Call SETIT at 298AH to set CD's two bits (source: setup data).
2980SETCTS
LD HL,2870H 21 70 28LD HL,CTRESP
SETCTS: point Register Pair HL to 2870H, CTRESP, the response byte of CTS (source: response byte).
2983
LD C,08H 0E 08
Load Register C with 08H, CTS's check bit (source: bit mask).
2985
Call SETIT at 298AH to set CTS's two bits (source: setup data).
2988
POP AF F1
Take PRMERR's address off the stack into Register Pair AF (source: remove param error vect).
2989
RET C9
Return to CKPARM at 2523H for @CTL (source: return from evaluate).

298AH - Member 4 (SETCOM): SETIT, SETBITS, GETHL, UCASE and CKBAUD

SETIT sets one line condition in MSMASK: ON (any value but 0000H) sets the check bit alone, the driver waits for TRUE (a 0 on the line); OFF sets the check bit and the level bit four places higher, it waits for FALSE. Nothing sets IGNORE but DEFAULT. CKBAUD looks the rate up in BAUDTBL and returns its code in both nibbles, for sending and receiving.

298ASETIT
INC (HL) 34
SETIT: increment the response byte at Register Pair HL (source: any response?).
298B
DEC (HL) 35
Decrement the response byte at Register Pair HL back: the Z flag is set when it is 00H, the line not given (source: (HL) = 00?).
298C
RET Z C8
If the line was not given, return to SETPARAM with MSMASK unchanged (source: back if no change).
298D
INC HL 23
Increment Register Pair HL to the word after the response byte (source: point to response data).
298E
Call GETHL at 29B4H to load Register Pair HL with that word, the address of the value (source: load HL with (HL)).
2991
Call GETHL at 29B4H again: Register Pair HL = the value, 0000H for OFF (source: get user response).
2994
LD A,C 79
Load Register A with Register C, the line's check bit (source: get response data ON).
2995
RLCA 07
Rotate Register A left; four rotations move the check bit to the level bit (source: align to upper 4 bits).
2996
RLCA 07
Rotate Register A left (second of the four rotations).
2997
RLCA 07
Rotate Register A left (third of the four rotations).
2998
RLCA 07
Rotate Register A left (fourth rotation): the level bit, four places above the check bit.
2999
OR C B1
OR Register A with Register C: both bits of the line (source: combine).
299A
LD B,A 47
Load Register B with Register A, the bits for OFF (source: set response data OFF).
299B
CPL 2F
Complement Register A: every bit but the line's two (source: reverse bits).
299C
AND (IX+04H) DD A6 04
AND Register A with MSMASK (IX+04H), Index Register IX holding the address of CLDCB: the other lines as they are (source: drop desired bits).
299F
LD E,A 5F
Load Register E with Register A, MSMASK without this line (source: save new mask).
29A0
LD A,H 7C
Load Register A with Register H, the high byte of the value (source: check if OFF).
29A1
OR L B5
OR Register A with Register L, the low byte: zero for OFF (source: HL = 0000?).
29A2
LD A,B 78
Load Register A with Register B, both bits for OFF (source: get OFF bits).
29A3
If the line is OFF, jump relative to 29A6H with both bits (source: go if off).
29A5
LD A,C 79
Load Register A with Register C, the check bit alone for ON (source: get ON bits).
29A6
OR E B3
OR Register A with Register E: the other lines with this one (source: combine with remainder).
29A7
LD (IX+04H),A DD 77 04
Store Register A into MSMASK (IX+04H), Index Register IX holding the address of CLDCB (source: update mask).
29AA
RET C9
Return to SETPARAM with the line's bits in MSMASK (source: done).
29ABSETBITS
AND B A0
SETBITS: AND Register A, the new bits, with Register B, their mask (source: mask others).
29AC
PUSH AF F5
Save Register Pair AF, the new bits, on the stack (source: save data).
29AD
LD A,B 78
Load Register A with Register B, the mask (source: get mask).
29AE
CPL 2F
Complement Register A: every bit but the mask's (source: reverse for mask off).
29AF
AND C A1
AND Register A with Register C, the control byte: its bits outside the mask (source: remove undesired bits).
29B0
POP BC C1
Restore Register Pair BC from the stack: Register B = the new bits saved from Register A (source: B = new bits).
29B1
OR B B0
OR Register A with Register B: the control byte with the new bits (source: combine).
29B2
LD C,A 4F
Load Register C with Register A, the new control byte (source: update).
29B3
RET C9
Return to SETPARAM with the control byte in Register C (source: new bits set).
29B4GETHL
LD A,(HL) 7E
GETHL: load Register A with the low byte of the word at Register Pair HL (source: get lsb).
29B5
INC HL 23
Increment Register Pair HL to the high byte (source: bump pointer).
29B6
LD H,(HL) 66
Load Register H with the high byte of the word from Register Pair HL (source: get msb).
29B7
LD L,A 6F
Load Register L with Register A: Register Pair HL = the word (source: HL = (HL)).
29B8
RET C9
Return with the word in Register Pair HL (source: done).
29B9UCASE
CP 61H FE 61
UCASE: compare Register A with 61H, a small a (source: in range?).
29BB
RET C D8
If Register A is below it, return unchanged (source: nope, go).
29BC
CP 7BH FE 7B
Compare Register A with 7BH, the character after a small z (source: in range?).
29BE
RET NC D0
If Register A is not a small letter, return unchanged (source: nope, go).
29BF
AND 5FH E6 5F
Mask Register A with 5FH: the capital letter (source: else make upper case).
29C1
RET C9
Return with the capital letter in Register A (source: done).
29C2CKBAUD
LD DE,(274EH) ED 5B 4E 27LD DE,(BAUDP)
CKBAUD: load Register Pair DE with the word at 274EH, BAUDP, the rate given or answered (source: baud parm (default 300)).
29C6
LD HL,26FAH 21 FA 26LD HL,BAUDTBL
Point Register Pair HL to 26FAH, BAUDTBL (source: point to baud table).
29C9
LD BC,1000H 01 00 10
Load Register Pair BC with 1000H: Register B = 16 rates, Register C = 0, the code of the first (source: B=count, C=position).
29CCBLOOP
LD A,(HL) 7E
BLOOP: load Register A with the low byte of a rate from Register Pair HL (source: fetch LSB baud).
29CD
INC HL 23
Increment Register Pair HL to the high byte (source: bump table).
29CE
CP E BB
Compare Register A with Register E, the low byte of the rate wanted (source: lsb match?).
29CF
If they differ, jump relative to NOMATB at 29D5H (source: nope, go next entry).
29D1
LD A,(HL) 7E
Load Register A with the high byte of the rate from Register Pair HL (source: get MSB baud).
29D2
CP D BA
Compare Register A with Register D, the high byte of the rate wanted (source: msb match?).
29D3
If they are equal, jump relative to MATCHB at 29DAH (source: yes, baud found).
29D5NOMATB
INC HL 23
NOMATB: increment Register Pair HL to the next rate (source: bump to next entry).
29D6
INC C 0C
Increment Register C, the code of the next rate; it is not zero here, so the flags are NZ (source: bump position count).
29D7
Decrement Register B and, while rates are left, jump relative to BLOOP at 29CCH (source: go for table length).
29D9
RET C9
Return NZ: the rate is not in the table (source: param error).
29DAMATCHB
LD A,C 79
MATCHB: load Register A with Register C, the rate's code 0-15 (source: pick up baud rate code).
29DB
RLCA 07
Rotate Register A left; four rotations move the code to bits 7-4, the transmit rate (source: align to high bits).
29DC
RLCA 07
Rotate Register A left (second of the four rotations).
29DD
RLCA 07
Rotate Register A left (third of the four rotations).
29DE
RLCA 07
Rotate Register A left (fourth rotation): the code is in bits 7-4.
29DF
OR C B1
OR Register A with Register C: the same code in bits 3-0, the receive rate (source: use for xmit and rcv).
29E0
CP A BF
Compare Register A with itself to set the Z flag, a rate found (source: Z=good value).
29E1
RET C9
Return Z with Register A = the rate code (source: return with BAUD setting).
29E2
Jump to DSPALL at 2631H to show the settings, reached from 2450H (source: display all settings).
29E5PTBL2
DEFB 80H 80
PTBL2, 29E5H: 80H, the mark of an enhanced table: the one entry with which GETRSP reads an answer (source: extended param).
29E6FTYP
DEFB 0C1H C1
FTYP, 29E6H: the type byte, C1H in the file (a switch or a number, one letter), written by GETRSP (26A7H) from the entry's kinds.
29E7
DEFM "F" 46
29E7H: the name F, one letter, the parameter that an answer is the value of.
29E8FRESP
DEFB 00H 00
FRESP, 29E8H: the response byte of F, cleared at 268DH, set by @PARAM and copied at 26BAH.
29E9-29EA
DEFW 276AH 6A 27
29E9H-29EAH: where F's value goes, FPARM at 276AH.
29EB
DEFB 00H 00
29EBH: the 00H where a second entry's type byte would be, which ends PTBL2.
29EC-29EEFSTR
DEFM "(F=" 28 46 3D
FSTR, 29ECH-29EEH: the opening parenthesis, the name F and the equals sign that GETRSP hands @PARAM with the answer that follows at once at INBUF, 29EFH, after the member.

2400H - Member 5 (SETKI): Entry and Exits

SYS1/SYS runs SETKI with request B3H; its header (file offset 0041H: record 0019H, byte C9H) points at member 5, which the overlay loader reads to 2400H-2595H, its two load blocks and the two blocks of the patch SETKI1 that follow them (2583H and 258EH-2595H), and calls at 2400H with Register Pair HL at the text after the word SETKI. SETKI shows or changes the delay before a held key starts to repeat and the rate of the repeat, the bytes KIDATA$+2 and KIDATA$+3 (08FEH, 08FFH) of the keyboard driver. The entry keeps the Stack Pointer, so every exit returns at the depth of the entry through SAVESP, which clears a BREAK still pending with @CKBRKC.

2400
LD (240BH),SP ED 73 0B 24
SETKI's entry (request B3H): store the Stack Pointer into 240BH-240CH, the operand of the LD SP at SAVESP (240AH), so that every exit returns at the depth of the entry.
2404
Call PGRM at 242EH, which does the command and returns to 2407H when it ends without an error (source: exit via RET).
2407$EXIT
LD HL,0000H 21 00 00
$EXIT: load Register Pair HL with 0000H, the return code for no error (source: init to no error).
240ASAVESP
LD SP,0000H 31 00 00
SAVESP: load the Stack Pointer with the word at 240BH-240CH, the value stored at 2400H (0000H in the file); $ABORT and IOERR jump here too (source: p/u original SP).
240D
LD A,6AH 3E 6A
Load Register A with 6AH, SVC 106, @CKBRKC, which tests for BREAK and clears a BREAK still pending (source: clear any BREAK).
240F
RST 28H EF
Call @CKBRKC with RST 28H (BOOT/SYS); its result is not looked at, the exit goes on in every case.
2410
RET C9
Return through the tail of RST28 (1A77H) to @EXIT or to the caller of @CMNDR, with Register Pair HL = 0000H, FFFFH or the error number.
2411$ABORT
LD HL,0FFFFH 21 FF FF
$ABORT: load Register Pair HL with FFFFH, the return code for BREAK at a prompt of QUERY (source: set abort code).
2414
Jump to SAVESP at 240AH, which restores the Stack Pointer of the entry and returns with Register Pair HL = FFFFH.
2416$DSP
LD A,02H 3E 02
$DSP: load Register A with 02H, SVC 2, @DSP, which shows the character in Register C on the screen.
2418
RST 28H EF
Call @DSP with RST 28H (BOOT/SYS) to show the character in Register C (source: display a character).
2419
RET Z C8
Return if @DSP returned Z, the character shown (source: back if good).
241A
Otherwise jump to IOERR at 2423H with Register A = the error number that @DSP returned.
241C$DSPLY
LD A,0AH 3E 0A
$DSPLY: load Register A with 0AH, SVC 10, @DSPLY, which shows the text at Register Pair HL up to its 0DH or 03H.
241E
RST 28H EF
Call @DSPLY with RST 28H (BOOT/SYS) to show the text at Register Pair HL (source: display a line).
241F
RET Z C8
Return if @DSPLY returned Z, the text shown (source: back if good).
2420
DEFB 21H 21
2420H: the first byte of an LD HL,nnnn that swallows PRMERR's LD A,2CH (2421H-2422H), so that a display error goes on to IOERR with the error number of @DSPLY in Register A (source: skip LD A,##).
2421PRMERR
LD A,2CH 3E 2C
PRMERR: load Register A with 2CH, error 44, Parameter error (source: parameter error).
2423IOERR
LD H,00H 26 00
IOERR: load Register H with 00H, the high byte of the return code.
2425
LD L,A 6F
Load Register L with Register A, the error number: Register Pair HL = the error number, the command's return code (source: save error #).
2426
OR 0C0H F6 C0
OR Register A with C0H: bit 7 asks @ERROR to return, bit 6 for the short message alone.
2428
LD C,A 4F
Load Register C with Register A, the error number with bits 7 and 6 set, for @ERROR.
2429
LD A,1AH 3E 1A
Load Register A with 1AH, SVC 26, @ERROR, which shows an error message.
242B
RST 28H EF
Call @ERROR with RST 28H (the SYS0/SYS stub that loads SYS4/SYS) to show the short error message (source: display message).
242C
Jump to SAVESP at 240AH, which restores the Stack Pointer of the entry and returns with Register Pair HL = the error number (source: exit).

242EH - PGRM: Find the Keyboard Driver and Choose the Form

@GTMOD looks for the module $KI, the keyboard driver of BOOT/SYS at 08F0H, and returns Register Pair DE after its name, 08F8H, which goes into Index Register IX: the delay is then at IX+06H (08FEH) and the rate at IX+07H (08FFH), KIDATA$+2 and KIDATA$+3. Without a parenthesis after the spaces the two values are shown and anything else on the line is not read; with one, @PARAM reads the list.

242EPGRM
PUSH HL E5
PGRM: save Register Pair HL, the command line after the word SETKI, on the stack (source: save cmdline ptr).
242F
LD DE,2539H 11 39 25LD DE,MDNAME
Load Register Pair DE with 2539H, MDNAME, the name $KI ended by 03H, for @GTMOD (source: name of keyboard driver).
2432
LD A,53H 3E 53
Load Register A with 53H, SVC 83, @GTMOD, which finds a module in memory by the name at Register Pair DE.
2434
RST 28H EF
Call @GTMOD with RST 28H (the SYS0/SYS stub that loads SYS12/SYS): Z with Register Pair DE after the name of the module $KI, 08F8H in the release (source: find module header).
2435
LD A,08H 3E 08
Load Register A with 08H, error 8, Device not available, for the jump below; the LD leaves the flags of @GTMOD (source: device not available).
2437
If @GTMOD returned NZ (no module $KI in memory) jump to IOERR at 2423H with Register A = 08H; SAVESP drops the Register Pair HL still on the stack (source: exit if not found).
243A
PUSH DE D5
Save Register Pair DE, the byte after the module's name (08F8H), on the stack (source: point to next byte after module name).
243B
POP IX DD E1
Pull that address into Index Register IX: Index Register IX = 08F8H, so that IX+06H is the delay (08FEH) and IX+07H the rate (08FFH).
243D
POP HL E1
Restore Register Pair HL, the command line, from the stack (source: => cmd line).
243E
Call SKSP at 2517H, which moves Register Pair HL past the spaces (source: move to non-space).
2441
LD A,(HL) 7E
Load Register A with the byte at Register Pair HL, the first character after the spaces (source: char fm cmd line).
2442
CP 28H FE 28
Compare Register A with 28H, the opening parenthesis of a parameter list (source: any params?).
2444
If Register A is the parenthesis jump to GETNEW at 2462H, which reads the parameters and sets the values (source: get/set new values).
2447
No list: call SETMSG at 2450H, which writes the two values in decimal into the text at 251EH (source: move old values for dsply).
244A
LD HL,251EH 21 1E 25LD HL,DMSG
Load Register Pair HL with 251EH, DMSG, the line Wait = nnn, Rate = nnn ended by its 0DH (source: pt to dsply string).
244D
Jump to $DSPLY at 241CH, which shows the line and returns to 2407H, the exit with 0000H (source: dsply and exit).

2450H - SETMSG: The Values into the Text

Writes the delay at IX+06H into DDELAY (2527H-2529H) and the rate at IX+07H into DRPEAT (2535H-2537H), each as three characters, the digits right justified with spaces in front, by HEXDEC.

2450SETMSG
LD A,(IX+06H) DD 7E 06
SETMSG: load Register A with the delay at (IX+06H, 08FEH), Index Register IX holding 08F8H: KIDATA$+2 (source: p/u old Wait value).
2453
LD DE,2527H 11 27 25LD DE,DDELAY
Load Register Pair DE with 2527H, DDELAY, the three characters of the delay in the text (source: =>buffer to receive).
2456
Call HEXDEC at 2566H, which writes Register A in decimal into the three characters at Register Pair DE (source: convert to ASCII decimal).
2459
LD A,(IX+07H) DD 7E 07
Load Register A with the rate at (IX+07H, 08FFH), Index Register IX holding 08F8H: KIDATA$+3 (source: p/u old Rate value).
245C
LD DE,2535H 11 35 25LD DE,DRPEAT
Load Register Pair DE with 2535H, DRPEAT, the three characters of the rate in the text (source: pt to dsply area).
245F
Jump to HEXDEC at 2566H, which writes Register A into the text at Register Pair DE and returns to SETMSG's caller (source: convert to decimal ASCII).

2462H - GETNEW: The Parameters

@PARAM reads DEFAULT, RATE, WAIT and QUERY (each also by its first letter) with the table at 2540H. DEFAULT puts back 22 and 2 at once; QUERY then asks for each value not given a number on the line; last, the numbers given on the line are checked and stored, WAIT before RATE. Each value is stored as soon as it is accepted, so a value refused later with Parameter error, or BREAK at a prompt, leaves the earlier ones in place (B167).

2462GETNEW
LD DE,2540H 11 40 25LD DE,PRMTBL$
GETNEW: load Register Pair DE with 2540H, PRMTBL$, the parameter table (source: check user parameters).
2465
LD A,11H 3E 11
Load Register A with 11H, SVC 17, @PARAM, which reads the parameter list at Register Pair HL.
2467
RST 28H EF
Call @PARAM with RST 28H (the SYS0/SYS stub 1987H, code in SYS1/SYS at 21D7H): it stores each value at the address of its entry and sets its response byte.
2468
If @PARAM returned NZ (an unknown word, a bad value, or any space inside the list, B165) jump to PRMERR at 2421H: Parameter error (source: go on parm error).
246B
LD DE,0000H 11 00 00
Load Register Pair DE with the value of DEFAULT; the operand at 246CH-246DH (0000H in the file) is DFPARM, stored by @PARAM (source: p/u D parm).
246E
LD A,D 7A
Load Register A with Register D, the high byte of DEFAULT's value (source: default setting wanted?).
246F
OR E B3
OR Register A with Register E, the low byte: Z when DEFAULT was not given, or given as N, NO, OFF, 0 or with an empty value.
2470
If Register A is 00H (no DEFAULT) jump to SETSTR at 247AH and keep the present values (source: keep existing if not).
2472
LD (IX+06H),16H DD 36 06 16
Store 16H (22) into (IX+06H, 08FEH), Index Register IX holding 08F8H: the default delay of 22 ticks of TIMER$ (30 a second), 0.733 seconds (source: stuff defaults).
2476
LD (IX+07H),02H DD 36 07 02
Store 02H into (IX+07H, 08FFH), Index Register IX holding 08F8H: the default rate of two ticks of TIMER$ (0.067 seconds) between repeats.
247ASETSTR
SETSTR: call SETMSG at 2450H, which writes the present values into the texts at 2527H and 2535H for the prompts of QUERY (source: put numbers in string).
247DQCHK
LD DE,0000H 11 00 00
QCHK: load Register Pair DE with the value of QUERY; the operand at 247EH-247FH (0000H in the file) is QPARM, stored by @PARAM.
2480
LD A,D 7A
Load Register A with Register D, the high byte of QUERY's value.
2481
OR E B3
OR Register A with Register E, the low byte: Z when QUERY was not given, or given as N, NO, OFF, 0 or with an empty value.
2482
If Register A is 00H (no QUERY) jump to CKPARM at 24B8H, which takes the values given on the line (source: go if not).
2484
LD A,(2559H) 3A 59 25LD A,(WRESP)
Load Register A with the byte at 2559H, WRESP, the response byte of WAIT in the table (source: p/u Wait response byte).
2487
AND 80H E6 80
AND Register A with 80H, bit 7 of the response byte: a number was given for WAIT (source: if a W number given).
2489
If WAIT was given a number jump to CKR at 249EH: only the rate is asked for (source: then ask for R only).
248BGETD
LD HL,251EH 21 1E 25LD HL,DMSG
GETD: load Register Pair HL with 251EH, DMSG, the text Wait = and the present delay, for the prompt (source: pt to Wait prompt msg).
248E
Call SHOW at 24DEH, which shows Wait = {nn} ? as the prompt (source: ask for W time).
2491
Call GETIT at 2582H, which reads up to three keys and returns their value in Register Pair DE (source: get it in DE).
2494
If GETIT returned Z (ENTER alone, or a value whose low byte is 00H, B168) jump to CKR at 249EH and keep the delay (source: don't change if CR only).
2496
Call DCHECK at 2579H, which returns Z with Register A = the value modulo 128 when that is 10 or more.
2499
If DCHECK returned NZ (below 10 after modulo 128) jump back to GETD at 248BH and ask again (source: don't change if not).
249B
LD (IX+06H),A DD 77 06
Store Register A, the new delay, into (IX+06H, 08FEH), Index Register IX holding 08F8H: KIDATA$+2 (source: store new Wait).
249ECKR
LD A,(2551H) 3A 51 25LD A,(RRESP)
CKR: load Register A with the byte at 2551H, RRESP, the response byte of RATE in the table (source: p/u Rate response byte).
24A1
AND 80H E6 80
AND Register A with 80H, bit 7 of the response byte: a number was given for RATE.
24A3
If RATE was given a number jump to CKPARM at 24B8H without asking for it (source: go if Rate entered on cmdline).
24A5
LD HL,252CH 21 2C 25LD HL,RMSG
Load Register Pair HL with 252CH, RMSG, the text Rate = and the present rate, for the prompt (source: pt to Rate prompt msg).
24A8
Call SHOW at 24DEH, which shows Rate = {n} ? as the prompt.
24AB
Call GETIT at 2582H, which reads up to three keys and returns their value in Register Pair DE (source: get new Rate).
24AE
If GETIT returned Z (ENTER alone, or a value whose low byte is 00H, B168) jump to CKPARM at 24B8H and keep the rate (source: don't change if CR only).
24B0
Call RCHECK at 2575H, which returns Z with Register A = the value modulo 128 when that is 1 or more (source: check range).
24B3
If RCHECK returned NZ (0 after modulo 128: 128, 384, 640 or 896) jump back to CKR at 249EH and ask again (source: don't change if out of range).
24B5
LD (IX+07H),A DD 77 07
Store Register A, the new rate, into (IX+07H, 08FFH), Index Register IX holding 08F8H: KIDATA$+3 (source: store new Rate).
24B8CKPARM
LD A,(2559H) 3A 59 25LD A,(WRESP)
CKPARM: load Register A with the byte at 2559H, WRESP, the response byte of WAIT.
24BB
AND 80H E6 80
AND Register A with 80H, bit 7: a number was given for WAIT; a flag or a string for WAIT sets another bit and is passed over (source: W parm response).
24BD
If no number was given for WAIT jump to CKRP at 24CBH (source: go if not entered).
24BF
LD DE,0000H 11 00 00
Load Register Pair DE with the value of WAIT; the operand at 24C0H-24C1H (0000H in the file) is WPARM, stored by @PARAM (source: p/u Wait value).
24C2
Call DCHECK at 2579H, which returns Z with Register A = the value modulo 128 when that is 10 or more (source: check value).
24C5
If DCHECK returned NZ jump to PRMERR at 2421H: Parameter error, with DEFAULT and the answers of QUERY already stored (B167) (source: go if bad).
24C8
LD (IX+06H),A DD 77 06
Store Register A, the delay, into (IX+06H, 08FEH), Index Register IX holding 08F8H: KIDATA$+2 (source: else store it).
24CBCKRP
LD A,(2551H) 3A 51 25LD A,(RRESP)
CKRP: load Register A with the byte at 2551H, RRESP, the response byte of RATE (source: rate response).
24CE
AND 80H E6 80
AND Register A with 80H, bit 7: a number was given for RATE.
24D0
RET Z C8
Return to 2407H, the exit with 0000H, if no number was given for RATE (source: done if none).
24D1
LD DE,0000H 11 00 00
Load Register Pair DE with the value of RATE; the operand at 24D2H-24D3H (0000H in the file) is RPARM, stored by @PARAM (source: p/u Rate value).
24D4
Call RCHECK at 2575H, which returns Z with Register A = the value modulo 128 when that is 1 or more (source: check value).
24D7
If RCHECK returned NZ jump to PRMERR at 2421H: Parameter error, with the delay of WAIT already stored (B167) (source: and go if bad).
24DA
LD (IX+07H),A DD 77 07
Store Register A, the rate, into (IX+07H, 08FFH), Index Register IX holding 08F8H: KIDATA$+3 (source: else store it).
24DD
RET C9
Return to 2407H, the exit with 0000H (source: done).

24DEH - SHOW and SKSP: The Prompts of QUERY

SHOW shows the text at Register Pair HL up to its equals sign, a space, then the present value in braces without the spaces in front of it, then spaces up to a fixed column and ? : the label and the digits are counted down from 12, so the question mark always comes in the sixteenth column (Wait = {22} ? ). SKSP moves Register Pair HL past spaces.

24DESHOW
LD B,0CH 06 0C
SHOW: load Register B with 0CH (12), the columns that the label and the digits take, counted down below (source: col posn).
24E0SH2
LD C,(HL) 4E
SH2: load Register C with the byte at Register Pair HL, the next character of the text (source: get char in C).
24E1
Call $DSP at 2416H, which shows the character in Register C (source: print byte fm string).
24E4
DEC B 05
Decrement Register B, the columns left (source: dec chars to print).
24E5
INC HL 23
Increment Register Pair HL to the next character of the text (source: bump string ptr).
24E6
LD A,3DH 3E 3D
Load Register A with 3DH, the equals sign that ends the label.
24E8
CP C B9
Compare Register A, the equals sign, with Register C, the character just shown.
24E9
If Register C was not the equals sign jump back to SH2 at 24E0H for the next character: Wait = or Rate = , eight characters, leave Register B at 04H (source: display up to =).
24EB
LD C,20H 0E 20
Load Register C with 20H, a space, shown after the equals sign and not counted in Register B (source: then space).
24ED
Call $DSP at 2416H to show the space in Register C.
24F0
Call SKSP at 2517H, which moves Register Pair HL past the space of the text and the spaces in front of the value (source: move to number).
24F3
LD C,7BH 0E 7B
Load Register C with 7BH, the opening brace, not counted in Register B.
24F5
Call $DSP at 2416H to show the brace in Register C (source: dsply opening brace).
24F8SH3
LD C,(HL) 4E
SH3: load Register C with the byte at Register Pair HL, the next character of the value (source: p/u character).
24F9
LD A,2FH 3E 2F
Load Register A with 2FH, the character below the digit 0 (source: check C for numeric value).
24FB
CP C B9
Compare Register A, 2FH, with Register C: No Carry when Register C is 2FH or below, the comma after the delay or the 0DH after the rate.
24FC
If Register C is 2FH or below jump to SH4 at 2505H: the whole value has been shown (source: go if not).
24FE
Call $DSP at 2416H to show the digit in Register C (source: else dsply).
2501
DEC B 05
Decrement Register B, the columns left (source: dec chars remaining).
2502
INC HL 23
Increment Register Pair HL to the next character of the value (source: pt to next char in string).
2503
Jump back to SH3 at 24F8H for the next character (source: and loop).
2505SH4
LD C,7DH 0E 7D
SH4: load Register C with 7DH, the closing brace (source: display closing brace).
2507
Call $DSP at 2416H to show the brace in Register C.
250A
LD C,20H 0E 20
Load Register C with 20H, the space that fills the columns left.
250CSH5
SH5: call $DSP at 2416H to show the space in Register C (source: tab remaining distance).
250F
Decrement Register B and jump back to SH5 at 250CH until it is 00H: one to three spaces, Register B being 01H to 03H here, so the prompt ends in the same column whatever the value.
2511
LD HL,253DH 21 3D 25LD HL,ENDSTR
Load Register Pair HL with 253DH, ENDSTR, the question mark and a space ended by 03H (source: print ?).
2514
Jump to $DSPLY at 241CH, which shows them and returns to SHOW's caller; the 03H leaves the cursor after the space, for the answer.
2517SKSP
LD A,20H 3E 20
SKSP: load Register A with 20H, the space to pass over (source: bypass all leading spaces).
2519SKP2
CP (HL) BE
SKP2: compare Register A, the space, with the byte at Register Pair HL.
251A
RET NZ C0
Return if the byte at Register Pair HL is not a space, with Register Pair HL at it.
251B
INC HL 23
Increment Register Pair HL past the space, to the next byte of the text.
251C
Jump back to SKP2 at 2519H for the next byte.

251EH - The Texts and the Parameter Table

DMSG to DRPEAT is the one line shown without a parameter list, Wait = nnn, Rate = nnn; SHOW takes its two halves as the two prompts. MDNAME is the module name for @GTMOD and ENDSTR the end of a prompt. PRMTBL$ is an enhanced table (80H first): each entry is a type byte (bits 7-5 the kinds of value it takes, bit 4 a first letter abbreviation allowed, bits 3-0 the length of the name), the name, the response byte that @PARAM sets and the word where the value goes; @PARAM does not check the kinds.

251E-2526DMSG
DEFM "Wait = " 57 61 69 74 20 20 20 3D 20
DMSG, 251EH-2526H: the label of the delay, shown on the line at 244AH and, up to the equals sign, by SHOW as the first prompt.
2527-252BDDELAY
DEFM " , " 20 20 20 2C 20
DDELAY, 2527H-252BH: three spaces that SETMSG fills with the delay in decimal, then the comma and the space before the rate.
252C-2534RMSG
DEFM "Rate = " 52 61 74 65 20 20 20 3D 20
RMSG, 252CH-2534H: the label of the rate, the second half of the line and the second prompt.
2535-2538DRPEAT
DEFM " " / DEFB 0DH 20 20 20 0D
DRPEAT, 2535H-2538H: three spaces that SETMSG fills with the rate, then the 0DH that ends the line and ends SHOW's digits.
2539-253CMDNAME
DEFM "$KI" / DEFB 03H 24 4B 49 03
MDNAME, 2539H-253CH: the name of the keyboard driver's module for @GTMOD at 2434H, ended by 03H.
253D-253FENDSTR
DEFM "? " / DEFB 03H 3F 20 03
ENDSTR, 253DH-253FH: the end of a prompt, a question mark and a space, ended by 03H so that the cursor stays after them.
2540PRMTBL$
DEFB 80H 80
PRMTBL$, 2540H: 80H, the mark of an enhanced parameter table for @PARAM.
2541-2548
DEFB 57H / DEFM "DEFAULT" 57 44 45 46 41 55 4C 54
2541H-2548H: type 57H (a flag, a first letter abbreviation allowed, a name of 7 characters) and the name DEFAULT, or D.
2549
DEFB 00H 00
2549H: the response byte of DEFAULT, set by @PARAM and not read; the value at 246CH is tested instead.
254A-254B
DEFW 246CH 6C 24
254AH-254BH: where DEFAULT's value goes, 246CH, DFPARM, the operand of the LD DE at 246BH.
254C-2550
DEFB 94H / DEFM "RATE" 94 52 41 54 45
254CH-2550H: type 94H (a number, a first letter abbreviation allowed, 4 characters) and the name RATE, or R (source: repeat key rate).
2551RRESP
DEFB 00H 00
RRESP, 2551H: the response byte of RATE, bit 7 set by @PARAM for a number, read at 249EH and 24CBH.
2552-2553
DEFW 24D2H D2 24
2552H-2553H: where RATE's value goes, 24D2H, RPARM, the operand of the LD DE at 24D1H.
2554-2558
DEFB 94H / DEFM "WAIT" 94 57 41 49 54
2554H-2558H: type 94H (a number, a first letter abbreviation allowed, 4 characters) and the name WAIT, or W (source: delay before repeat).
2559WRESP
DEFB 00H 00
WRESP, 2559H: the response byte of WAIT, bit 7 set by @PARAM for a number, read at 2484H and 24B8H.
255A-255B
DEFW 24C0H C0 24
255AH-255BH: where WAIT's value goes, 24C0H, WPARM, the operand of the LD DE at 24BFH.
255C-2561
DEFB 55H / DEFM "QUERY" 55 51 55 45 52 59
255CH-2561H: type 55H (a flag, a first letter abbreviation allowed, 5 characters) and the name QUERY, or Q.
2562
DEFB 00H 00
2562H: the response byte of QUERY, set by @PARAM and not read; the value at 247EH is tested instead.
2563-2564
DEFW 247EH 7E 24
2563H-2564H: where QUERY's value goes, 247EH, QPARM, the operand of the LD DE at 247DH.
2565
DEFB 00H 00
2565H: the 00H where a next entry's type byte would be, which ends the table for @PARAM (source: NOP, note end of parm table).

2566H - HEXDEC: A Byte in Decimal

A 631 change: @HEXD with a field of three characters takes the place of 6.3.0's own conversion (CVD1). Registers B, C, H, L and A are kept; Register Pair DE returns after the field.

2566HEXDEC
PUSH BC C5
HEXDEC: save Register Pair BC on the stack (source: save regs).
2567
PUSH HL E5
Save Register Pair HL on the stack, kept for the caller.
2568
PUSH AF F5
Save Register Pair AF, the value in Register A, on the stack.
2569
LD H,00H 26 00
Load Register H with 00H, the high byte of the number to convert (source: set HL = #).
256B
LD L,A 6F
Load Register L with Register A, the value: Register Pair HL = 0 to 255.
256C
LD B,03H 06 03
Load Register B with 03H, the width of the field for @HEXD (631 change).
256E
LD A,5FH 3E 5F
Load Register A with 5FH, SVC 95, @HEXD, which writes Register Pair HL in decimal into a field of Register B characters at Register Pair DE.
2570
RST 28H EF
Call @HEXD with RST 28H (BOOT/SYS): three characters at Register Pair DE, spaces then the digits, with Register Pair DE left after them.
2571
POP AF F1
Restore Register Pair AF, the value, from the stack (source: recover #).
2572
POP HL E1
Restore Register Pair HL from the stack (source: and other regs).
2573
POP BC C1
Restore Register Pair BC from the stack, kept for the caller.
2574
RET C9
Return to the caller with Register Pair DE three bytes on.

2575H - RCHECK, DCHECK and CHECK: The Lower Limits

The value in Register E is taken modulo 128, as the manual says, and compared with the lower limit in Register D: 1 for the rate, 10 for the delay. There is no upper limit, 127 being the largest value the modulo leaves; Register D on entry, the high byte of the value, is not looked at.

2575RCHECK
LD D,01H 16 01
RCHECK: load Register D with 01H, the smallest rate (source: rate minimum value).
2577
Jump to CHECK at 257BH, which compares the value with the limit in Register D.
2579DCHECK
LD D,0AH 16 0A
DCHECK: load Register D with 0AH (10), the smallest delay (source: wait minimum value).
257BCHECK
LD A,E 7B
CHECK: load Register A with Register E, the low byte of the value (source: get number).
257C
AND 7FH E6 7F
AND Register A with 7FH: the value modulo 128 (source: keep positive).
257E
CP D BA
Compare Register A with Register D, the lower limit (source: lowest allowed).
257F
RET C D8
Return NZ with the Carry flag if Register A is below the limit (source: too low).
2580
CP A BF
Compare Register A with itself, which sets Z (source: set Z if good value).
2581
RET C9
Return Z with Register A = the value to store.

2582H - GETIT: An Answer to a Prompt of QUERY

@KEYIN reads up to three keys into INBUF (2596H, after the member). In the member's own load blocks GETIT ends after the JP C at 258BH: the 631 source dropped 6.3.0's DECHEX for the SVC @DECHEX but did not put in the call, so in 6.3.1 Level 1B the keys of an answer, even ENTER alone, were run as code at INBUF, which was 258EH in the unpatched member. The patch SETKI1 (FIX631B/JCL, the Level 1C fix), which the release file carries as a patch record after the member's blocks, sets the low byte of INBUF's address at 2583H to 96H and adds the eight bytes at 258EH-2595H: @DECHEX and the value in Register Pair DE. The rows show the bytes the loader leaves in memory, the patch included.

2582GETIT
LD HL,2596H 21 96 25LD HL,INBUF
GETIT: load Register Pair HL with 2596H, INBUF, after the member; the low byte 96H at 2583H comes from the patch SETKI1 (8EH in the member's own block) (source: key buffer).
2585
LD BC,0300H 01 00 03
Load Register Pair BC with 0300H: Register B = 3, the most keys @KEYIN takes, Register C = 00H (source: 3 chars max).
2588
LD A,09H 3E 09
Load Register A with 09H, SVC 9, @KEYIN, which reads a line from the keyboard into the buffer at Register Pair HL.
258A
RST 28H EF
Call @KEYIN with RST 28H (BOOT/SYS): up to three characters and the 0DH at 2596H-2599H, the Carry flag for BREAK.
258B
If @KEYIN returned the Carry flag (BREAK) jump to $ABORT at 2411H: SETKI ends with FFFFH, with DEFAULT and an earlier answer already stored (B167) (source: quit if Break).
258E
LD A,60H 3E 60
Load Register A with 60H, SVC 96, @DECHEX, which reads a decimal number at Register Pair HL; this row and the six after it are the patch SETKI1.
2590
RST 28H EF
Call @DECHEX with RST 28H (SYS0/SYS) at Register Pair HL, 2596H: Register Pair BC = the value of the digits up to the first other character, 0000H when the answer does not begin with a digit.
2591
LD D,B 50
Load Register D with Register B, the high byte of the value (patch SETKI1).
2592
LD E,C 59
Load Register E with Register C, the low byte: Register Pair DE = the value, which CHECK takes modulo 128 (patch SETKI1).
2593
LD A,C 79
Load Register A with Register C, the low byte of the value (patch SETKI1).
2594
OR A B7
OR Register A with itself: Z when the low byte is 00H, for ENTER alone, an answer that does not begin with a digit, or a value of 0, 256, 512 or 768 (B168) (patch SETKI1).
2595
RET C9
Return to the caller with Register Pair DE = the value; the last byte of the patch SETKI1 and of the member.