RAM Addresses and Routines
Page Customization
Note:
This page documents every RAM address referenced by the TRS-80 Model I (12KB, 0000H–2FFFH) and Model III (14KB, 0000H–37FFH) Level II BASIC ROMs, plus Model 4 ROM entries (tagged “Model 4 ROM”) added as the Model 4 disassembly proceeds. All ROM entries are derived exclusively from verified disassembly analysis. DOS-specific entries (where present) are derived from disassembly of the respective DOS overlays.
Model I ROM vs Model III ROM:
The “Model I ROM” and “Model III ROM” designations indicate that the address is referenced directly by the respective machine’s Level II BASIC ROM code. A DOS running on a given model does NOT make its addresses “Model I ROM” or “Model III ROM” entries — those are tagged separately with their DOS codes (T1, N1, etc.).
73% of all ROM RAM addresses (192 of 263) are completely identical between the two ROMs, down to the exact same ROM reference addresses. The Level II BASIC interpreter core from roughly 0700H–2FFFH is byte-identical between machines.
Model I ROM Specific:
12 addresses: The Expansion Interface registers (FB00H–FC02H, FF04H), the port FFH shadow register at 403DH (10 references), the disk boot sector buffer at 4200H, and the lower workspace addresses (41F8H, 42E8H, 434CH, 4414H) that sit 100H below their Model III equivalents.
Model III ROM Specific:
46 addresses: Dominated by the built-in disk ROM (34 addresses for FDC variables, disk FCBs, directory pointers), plus the three separate Device Control Blocks (41E5H/41EDH/41F5H replacing the Model I’s single DCB), the 409FH run-mode flags (9 refs from the rewritten tokenizer), the 4210H device selector (14 refs replacing the port FFH shadow), and the PCG interface.
DOS Code Key:
| N1 | NEWDOS/80 v2.0 (Model I) |
| T1 | Model I TRSDOS v2.3 |
| T3 | Model III TRSDOS v1.3 |
Memory-Mapped I/O and ROM Extension Area
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 3000H-37FFH ↳12288 | Model I ROM | Reserved. Unused expansion ROM space on the Model I (3000H-37FFH). The Model I ROM is only 12KB (0000H-2FFFH); this 2KB region is not populated. |
| 3000H ↳12288 | Model III ROM | Write 500 baud cassette leader and sync byte. Entry point in the Model III disk/cassette ROM extension (3000H-37FFH). |
| 3003H ↳12291 | Model III ROM | Write 1500 baud cassette leader and sync byte. |
| 3006H ↳12294 | Model III ROM | Search for 500 baud cassette leader and sync byte. |
| 3009H ↳12297 | Model III ROM | Search for 1500 baud cassette leader and sync byte. |
| 300CH ↳12300 | Model III ROM | Turn off cassette motor. |
| 300FH ↳12303 | Model III ROM | Turn on cassette motor. |
| 3012H ↳12306 | Model III ROM | Disk bootstrap routine entry point. |
| 3015H ↳12309 | Model III ROM | Power-up/cold-start routine. The Model III boot vector at 0002H jumps here (JP 3015H). This initializes the disk ROM, installs DCBs, and either boots from disk or falls through to BASIC. |
| 3018H ↳12312 | Model III ROM | Maskable interrupt handler entry point. |
| 301BH ↳12315 | Model III ROM | RS-232-C initialization driver routine. |
| 301EH ↳12318 | Model III ROM | RS-232-C input driver routine. |
| 3021H ↳12321 | Model III ROM | RS-232-C output driver routine. |
| 3024H ↳12324 | Model III ROM | Keyboard driver routine. |
| 3027H ↳12327 | Model III ROM | I/O Route driver routine. |
| 302AH ↳12330 | Model III ROM | Part of routine to search for cassette leader and sync byte (jumped to from 0229H). |
| 302DH ↳12333 | Model III ROM | Part of LIST command (jumped to from 2B91H). |
| 3030H ↳12336 | Model III ROM | BASIC TIME$ function routine. |
| 3033H ↳12339 | Model III ROM | $DATE routine (date to 8-character buffer pointed to by HL). |
| 3036H ↳12342 | Model III ROM | $TIME routine (time to 8-character buffer pointed to by HL). |
| 3039H ↳12345 | Model III ROM | Non-maskable interrupt handler entry point. |
| 3042H ↳12354 | Model III ROM | $SETCAS routine (prompt user to set cassette baud rate). |
| 37DEH ↳14302 | Model I ROM | Communication Status Address (RS-232-C UART status register on the Expansion Interface). |
| 37DFH ↳14303 | Model I ROM | Communication Data Address (RS-232-C UART data register on the Expansion Interface). |
| 37E0H ↳14304 | Model I ROM | Interrupt Latch Address (Expansion Interface interrupt status register). |
| 37E1H ↳14305 ↳DSEL$ | Model I ROM | Disk Drive Select Latch Address. Writing to this location selects the active floppy drive. 01H=Drive :0, 02H=Drive :1, 04H=Drive :2, 08H=Drive :3. |
| 37E4H ↳14308 | Model I ROM | Cassette Select Latch Address. 0=Tape Drive #1, 1=Tape Drive #2. |
| 37E8H ↳14312 ↳PRTAD$ | Both Model I and III ROM | $PRSTAT: Printer Status Byte / Line Printer Address. Writing a byte sends it to the printer; reading returns printer status. Bit 7=0 if NOT BUSY, Bit 6=0 if NOT OUT OF PAPER, Bit 5=1 if DEVICE SELECTED, Bit 4=1 if NO PRINTER FAULT, Bits 0-3 NOT USED. |
| 37E9H ↳14313 | Both Model I and III ROM | $PROUT: Output a Byte to the Printer. |
| 37ECH ↳14316 ↳FDCAD$ | Model I ROM | Floppy Disk Controller COMMAND/STATUS register (Expansion Interface). Tested during power-up to determine if an FDC is present. 00H or FFH=No disk controller; 1BH=SEEK; 88H=READ SECTOR; D0H=FORCE INTERRUPT. |
| 37EDH ↳14317 | Model I ROM | Disk Track Select register (Expansion Interface FDC). |
| 37EEH ↳14318 ↳FDCAD$+2 | Model I ROM | Disk Sector Select register (Expansion Interface FDC). |
| 37EFH ↳14319 ↳FDCAD$+3 | Model I ROM | Disk Data register (Expansion Interface FDC). Byte read from or written to disk. |
| 3800H-3BFFH ↳14336 ↳KEYAD$ | Both Model I and III ROM | Keyboard Memory / Address Matrix. Memory-mapped from 3800H through 3BFFH. Each address=one row of keyboard scan matrix; reading returns bitmask of pressed keys. |
| 3840H ↳14400 ↳DNAROW | Both Model I and III ROM | Keyboard scan RAM row for the 7th keyboard matrix line (address 3840h), which maps to the key group containing ENTER (bit 0), CLEAR (bit 1), BREAK (bit 2), RIGHT ARROW (bit 3), LINE FEED (bit 4), LEFT ARROW (bit 5), and SPACE (bit 6). |
| 3880H ↳14464 ↳SHFKEY | Both Model I and III ROM | Single byte at 3880h holding the current shift-key state, read directly from the shift-key keyboard row hardware port. Each bit represents a shift key: bit 0 = Left Shift, bit 1 = Right Shift. |
| 3C00H-3FFFH ↳15360 ↳DSPAD$ / CRT | Both Model I and III ROM | Start of the 1024-byte video display RAM at 3C00h–3FFFh, organized as 16 rows × 64 columns. Each byte holds the ASCII character code displayed at that screen position; writing any byte here immediately changes what is shown. The screen is addressed linearly: row 0 is 3C00h–3C3Fh, row 1 is 3C40h–3C7Fh, …, row 15 is 3FC0h–3FFFh. Characters 00h–7Fh display standard ASCII; 80h–FFh display the alternate (graphics) character set. |
| 3C3EH ↳15422 ↳CRT+62 | Both Model I and III ROM | Video RAM address for column 62 of row 0. |
| 3C3FH ↳15423 ↳CRT+63 | Both Model I and III ROM | Video RAM address 3C3Fh, the rightmost character position (column 63) of the first screen row (3C00h + 63). Used as a cassette activity indicator: the ROM alternates a '*' (2Ah) and a space (20h) at this position during cassette I/O to provide a visible blink showing the cassette is active. |
| 3C40H ↳15424 | Model I ROM | Video RAM - start of line 2. Scroll destination in Model I video scroll routine. Model III uses different scroll calculation. |
RST Vector Jump Table (4000H-4027H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4000H ↳16384 ↳DSPAD$+^D1024 | Both Model I and III ROM, N1 | RST 00H / RST 08H vector target (3 bytes). JP 4000H at 0005H and 0008H. Default: cold start/reset. Also loaded as DE pointer during init. The address immediately past the end of video RAM (3C00h + 1024 = 4000h), used as a sentinel end address. |
| 4003H ↳16387 | Both Model I and III ROM | RST 10H vector target (3 bytes). Character output dispatch. JP 4003H at 0010H. |
| 4006H ↳16390 | Both Model I and III ROM | RST 18H vector target (3 bytes). Compare HL to DE utility. JP 4006H at 0018H. |
| 4009H ↳16393 | Both Model I and III ROM | RST 20H vector target (3 bytes). BASIC next character fetch. JP 4009H at 0020H. |
| 400CH ↳16396 | Both Model I and III ROM, T1 | RST 28H vector target (3 bytes). BASIC byte comparison utility. JP 400CH at 0028H. |
TRSDOS 1.3 SYS0 System Vectors (400CH-4048H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 400CH ↳16396 ↳RST28 | Model III ROM, T3 | RST 28H vector: JP to SYSLD overlay loader |
RST Vector Jump Table (4000H-4027H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 400FH ↳16399 | Both Model I and III ROM, T1 | RST 30H vector target (3 bytes). Expression evaluator call. JP 400FH at 0030H. |
TRSDOS 1.3 SYS0 System Vectors (400CH-4048H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 400FH ↳16399 ↳RST30 | Model III ROM, T3 | RST 30H vector: JP to DEBUG breakpoint handler |
RST Vector Jump Table (4000H-4027H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4012H ↳16402 | Both Model I and III ROM, T1, N1 | RST 38H vector target (3 bytes). BASIC Syntax Error handler. JP 4012H at 0038H. |
| 4015H ↳16405 ↳KDCB$ / KDCB | Both Model I and III ROM | Start of the Keyboard Device Control Block (8 bytes at 4015h–401Ch). |
TRSDOS 1.3 Error Handler Overlay – SYS4 (4E00H–50E6H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4015H ↳16405 ↳KDCB | T3 | TRSDOS 1.3 SYS4: Keyboard Device Control Block base. SYS4 reloads the keyboard driver address into the vector slot at KDCB+1 (4016H) from GOSAVE (42B1H) after the DO-file flag is cleared, restoring the normal keyboard handler when an error aborts DO-file execution. |
RST Vector Jump Table (4000H-4027H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4016H ↳16406 | N1 | NEWDOS/80: Store at 4016H - set interrupt handler. |
| 4018H ↳16408 ↳SKROB | Model III ROM | Single byte at 4018h: the shift-key shadow (last-read) image byte, used to detect transitions in the shift-key state. Stores the previous reading of the SHFKEY row (3880h) so the keyboard scan can XOR against it to find which shift bits have changed. |
| 4019H ↳16409 ↳SHFLCK | Model III ROM | Single byte at 4019h: the CAPS LOCK toggle flag. 00h = caps lock off (lower-case letters produced when Shift is held); non-zero = caps lock on (upper-case forced). On the Model III there is no dedicated CAPS LOCK key; instead, pressing Right Shift toggles this flag. This is the only write to SHFLCK in the ROM. POKE 4019h,1 activates caps lock; POKE 4019h,0 deactivates it. |
| 401AH ↳16410 ↳BLKCNT | Model III ROM | Single byte at 401Ah: the cursor blink countdown counter. Counts down on each real-time clock interrupt (30 Hz heartbeat); when it reaches zero it is reloaded to 7 and the cursor blink state (at 401Bh) is toggled. |
| 401CH ↳16412 ↳BLKON | Model III ROM | Single byte at 401Ch: the cursor blink-mode switch. 00h = blink mode enabled (cursor alternates on/off using BLKCNT); non-zero = no-blink mode (cursor is always on if CURCAR is non-zero). |
| 401DH ↳16413 ↳DDCB$ | Both Model I and III ROM, N1 | Start of the Video Display Device Control Block (8 bytes at 401Dh–4024h). |
| 401EH ↳16414 | N1 | NEWDOS/80: Store at 401EH. |
System Workspace and DOS Linkage (4033H-407DH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4020H ↳16416 | T1, N1 | Video RAM cursor / display position used by SYS5 DEBUG monitor for screen output positioning. SYS5 writes the cursor address here before outputting diagnostic text. |
| 4020H-4021H ↳16416 ↳CURSOR | T3 | Model III ROM cursor address (2 bytes): the video RAM address (3C00H-3FFFH) where the next character is displayed. TRSDOS 1.3 SYS1 reads its low byte (column = bits 5-0) before displaying TRSDOS Ready, and moves it back over the typed command to erase the periods after it. SYS8 (HELP) reads its low byte to place the names of its list in columns (4E20H). |
RST Vector Jump Table (4000H-4027H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4022H ↳16418 ↳CURCAR | Model III ROM | Single byte at 4022h: the cursor ON/OFF flag, forming byte DCB+5 of the video display DCB (DDCB$ at 401Dh). 00h = cursor is off (disabled); any non-zero value = cursor is on, and that value is the underscore character (5Fh by default) displayed at the cursor position. |
| 4023H ↳16419 ↳CURCAR+1 | Model III ROM | Single byte at 4023h: the cursor character, forming byte DCB+6 of the video display DCB (DDCB$ at 401Dh). Holds the ASCII character code that is written to the screen at the cursor position when the cursor blink is in the 'on' phase. Default value is 5Fh (underscore '_'). |
| 4025H ↳16421 ↳PDCB$ | Both Model I and III ROM, N1 | Start of the Printer Device Control Block (8 bytes at 4025h–402Ch). The driver uses IX = 4025h to access printer DCB fields: device type at IX+0, driver address at IX+1,2, line count at IX+3, lines-per-page at IX+4 (= 66 by default), characters-per-line at IX+5, max print width at IX+6. Every character sent to the printer with LPRINT passes through this DCB. |
| 4026H-4027H ↳16422 ↳PDCB+1 | T3 | TRSDOS 1.3 LPC/CMD (line printer control): loads only while this driver address of the printer DCB is 03C2H (the ROM's driver); it then stores the address of its own driver here, 42 bytes moved to the top of memory (MEMEND, 4411H, lowered by 42). |
System Workspace and DOS Linkage (4033H-407DH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4028H ↳16424 | N1 | NEWDOS/80: If A overflowed to 00H (was FFH), fetch the current LINES setting from system variable at 4028H into Register A to use as default. |
| 402AH ↳16426 | N1 | NEWDOS/80: Store Register Pair HL (00WWH) into memory location 402AH, updating a related display parameter in the SYS0 area. |
| 402BH ↳16427 | N1 | NEWDOS/80: Fetch the current WIDTH setting from system variable at 402BH into Register A. |
| 402DH ↳16429 | T1, N1 | TRSDOS 2.3 / NEWDOS/80: Warm start / DOS Ready entry point. NEWDOS/80: SYS0 routine at 402DH is the warm start; reached by a conditional JUMP when the Z flag is set (flag pattern 40H). TRSDOS 2.3: equivalent no-error exit point (same as 4400H DOS READY vector). |
TRSDOS 1.3 SYS0 System Vectors (400CH-4048H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 402DH ↳16429 ↳SYS1IN | Model III ROM, T3 | Normal return-to-DOS entry point (JP to S1RST1 via DO 10,1) |
System Workspace and DOS Linkage (4033H-407DH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4030H ↳16432 | T1, N1 | Error-already-displayed exit vector (3 bytes). Patched by the TRSDOS DEBUG command: normally contains LD A,A3H (no-op), patched to CALL 400FH (RST 30H) when DEBUG is active. |
TRSDOS 1.3 SYS0 System Vectors (400CH-4048H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4030H ↳16432 ↳ABORT | Model III ROM, T3 | Abort operation, re-entry to DOS (DO 20,1) |
System Workspace and DOS Linkage (4033H-407DH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4031H ↳16433 | T1 | Address operand portion of the patched instruction at 4030H. Set to 400FH (RST 30H vector) by the DEBUG command handler in SYS1. |
| 4033H ↳16435 | Model I ROM, T1 | DOS command dispatch vector (3 bytes). Conditional JP at 03D1H. |
| 4033H ↳16435 | Model III ROM | DOS character I/O link (CIOEX, 3 bytes). CIO1 jumps here (JP NZ at 0687H) when a DCB's type byte does not match the requested device code. The ROM's power-up copy (from 36DDH) loads AF C9 00: XOR A / RET. |
TRSDOS 1.3 SYS0 System Vectors (400CH-4048H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4033H ↳16435 ↳ROMCIO | Model III ROM, T3 | Continuation of ROM character I/O dispatcher (JP CIO1) |
System Workspace and DOS Linkage (4033H-407DH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4036H ↳16438 | Model I ROM, T1, N1 | DOS parameter block pointer (3+ bytes). Loaded as HL at 03E3H. |
| 4036H ↳16438 ↳KBROLT | Model III ROM | Start of the 8-byte keyboard last-state shadow buffer (KBROLT spans 4036h–403Dh), mirroring the 8 keyboard-row hardware registers. Each byte holds the last-read state of one keyboard row, used to detect key-up and key-down transitions by XORing against the current hardware read. Corrupting KBROLT causes phantom key-up or key-down transitions in the corresponding row on the next scan. |
| 403DH ↳16445 | Model I ROM, T1 | Port FFH shadow register (1 byte). 10 references. Model I uses port FFH for cassette motor, video mode, expansion interface control. This shadow tracks current port value. Read at 0221H, 0348H, 04C3H, 04CFH, 04DAH, 04F6H, 0543H; written at 0228H, 04C8H, 04FBH. TRSDOS 2.3: Written and tested by SYS0 disk I/O routines; used as the port FFH drive-select shadow register throughout DOS operation. |
| 403DH ↳16445 | Model III ROM | Interrupt vector for bit 3 of the maskable interrupt latch, the I/O bus (IODRVZ, 3 bytes). The ROM's power-up copy (from 36E7H) loads JP 35FAH, a RET; the interrupt poll jumps here at 35DDH. Also read at 0348H (a leftover of the Model I's port FFH shadow test; it reads the JP opcode). The Model III keeps its port ECH shadow at 4210H. |
| 403EH ↳16446 | T1, N1 | TRSDOS 2.3 / NEWDOS/80: DOS version number byte (1 byte). TRSDOS 2.3 stores its version identifier here during cold boot initialization. NEWDOS/80 similarly uses this location for its version/identity byte. Read by utilities and DOS routines that need to identify the resident DOS version. |
| 4040H ↳16448 | Model III ROM | Interrupt vector for bit 6 of the maskable interrupt latch, RS-232 error (POL6ZZ, 3 bytes). The ROM's power-up copy (from 36EAH) loads JP 35FAH, a RET; the interrupt poll jumps here at 35E9H. |
| 4040H ↳16448 | T1, N1 | TRSDOS 2.3 / NEWDOS/80: DOS timer ticks counter (1 byte). Incremented by the interrupt service routine on every interrupt tick (approximately 25 Hz). Used by the DOS for time-delay loops and drive-motor timeout tracking. |
| 4041H ↳16449 | T1, N1 | TRSDOS 2.3 real-time clock: seconds counter (binary, 00H–3BH). Incremented by the timer interrupt handler at 45AFH once per second. |
| 4042H ↳16450 | T1 | TRSDOS 2.3 real-time clock: minutes counter (binary, 00H–3BH). Incremented when seconds rolls over from 59. |
| 4043H ↳16451 | Model III ROM | Interrupt vector for bit 7 of the maskable interrupt latch (POL7ZZ, 3 bytes; the bit is undefined in the ROM source). The ROM's power-up copy (from 36EDH) loads JP 35FAH, a RET; the interrupt poll jumps here at 35EDH. |
| 4043H ↳16451 | T1, N1 | TRSDOS 2.3 real-time clock: hours counter (binary, 00H–17H). Incremented when minutes rolls over from 59. |
| 4044H ↳16452 | T1, N1 | TRSDOS 2.3 date: year (binary, 2 digits). Set by the DATE command (SYS6). Displayed as YY by the TRSDOS clock display routine at 4CD2H. |
| 4045H ↳16453 | T1 | TRSDOS 2.3 date: day of month (binary, 01H–1FH). Set by the DATE command (SYS6). |
| 4046H ↳16454 | Model III ROM | Real-time clock interrupt vector, bit 2 of the maskable interrupt latch (CLKZZ, 3 bytes). The ROM's power-up copy (from 36F0H) loads JP 3529H, the clock routine; the interrupt poll jumps here at 35D9H. |
| 4046H ↳16454 | T1, N1 | TRSDOS 2.3 date: month (binary, 01H–0CH). Set by the DATE command (SYS6). Also referenced by BASIC/CMD as the base of the date word: LD DE,4046H. |
TRSDOS 1.3 SYS0 System Vectors (400CH-4048H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4046H ↳16454 | Model III ROM, T3 | Real-time clock interrupt vector 2 (JP 3529H in ROM). Handles cursor flash and clock/calendar update. |
System Workspace and DOS Linkage (4033H-407DH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4047H ↳16455 | T1 | TRSDOS 2.3: high memory limit pointer (2 bytes, little-endian). Initialized to 5200H during cold boot. Marks the top of DOS-resident code; BASIC/CMD uses this as the answer to the MEMORY SIZE? question if the user presses ENTER. |
| 4049H ↳16457 ↳DOS | Model III ROM, N1 | 3-byte Non-Maskable Interrupt (NMI) vector at 4049H-404BH (DOS in the ROM source). 3039H, reached from the NMI entry at 0066H, jumps here for every NMI except a reset. The ROM's power-up copy (from 36F3H) loads C7 00 00, RST 00H, so an NMI before a DOS is loaded restarts the machine. The ROM's boot loader plants a JP to its transfer-done handler here for the boot sector read, then stores 45EDH at 4049H-404AH, the bytes ED 45, a RETN. A DOS keeps its own JP here. |
| 4049H ↳16457 | T1, N1 | TRSDOS 2.3: detected RAM top address (2 bytes). Set during cold boot by the RAM detection routine at 4E00H. Holds the highest usable RAM address found. Also read by BASIC/CMD: LD HL,(4049H) to get DOS memory size. |
| 404AH ↳16458 ↳DOS+1 | Model III ROM | 16-bit destination address word at 404Ah–404Bh, the operand of the JP instruction at 4049h (DOS) forming the NMI vector. Holds the address of the current NMI service routine. |
| 404BH ↳16459 | N1 | NEWDOS/80: Point Register HL to 404BH, the breakpoint table in the DOS system area. This table holds up to 2 breakpoint entries, each consisting of: address (2 bytes) + original opcode (1 byte). |
| 404CH ↳16460 | T1 | TRSDOS 2.3: system capability flags (1 byte). Bit 7 = keyboard interrupt handler installed; Bit 6 = disk I/O handler installed. Tested during DOS READY initialization at 4E1FH. |
| 4051H ↳16465 | N1 | NEWDOS/80: Store Register Pair HL (0000H) into memory location 4051H in the SYS0 area. This appears to be the disk interrupt handler hook, clearing it to disable disk interrupts during memory operations. |
| 4053H ↳16467 | N1 | NEWDOS/80: GOSUB to disk interrupt handler hook at 4053H. (Patched Code) |
| 4058H ↳16472 | N1 | NEWDOS/80: Load Register Pair DE with the 16-bit value stored at memory locations 4058H-4059H. This is the current stack pointer for the '+' command stack. |
| 4059H ↳16473 | T1 | TRSDOS 2.3: disk I/O vector target (2 bytes). Contains the address portion of a JP nnnn instruction; initialized to 4669H (Disk I/O Core). Allows DOS to redirect disk I/O at runtime. |
| 405BH ↳16475 | T1 | TRSDOS 2.3: character output vector target (2 bytes). Contains the address portion of a JP nnnn instruction; initialized to 4560H (Character Output / RST 18H handler). Allows output redirection. |
| 405DH ↳16477 | T1, N1 | TRSDOS 2.3 SYS5 DEBUG: command character / address input storage. The A/H command stores the command byte here via the SetAddress routine at 4ECBH. Also used as a scratch byte by several DEBUG display routines. |
| 405EH ↳16478 | T1 | TRSDOS 2.3 SYS5 DEBUG: single-step mode flag. 00H = normal execution; non-zero = single-step mode active. Written by the S (Step) command at 4E9AH. |
| 4060H ↳16480 | T1 | TRSDOS 2.3 SYS5 DEBUG: memory modify address pointer (2 bytes). Current address being examined or modified by the M command at 4FDBH. |
| 4062H ↳16482 | T1 | TRSDOS 2.3 SYS5 DEBUG: breakpoint save area (2 bytes). Holds the original instruction bytes displaced by F7H breakpoint insertions. Restored when the Go command at 4F80H removes breakpoints. |
| 4063H ↳16483 | T1, N1 | TRSDOS 2.3 SYS5 DEBUG: display address (2 bytes). Current address for the D (Dump) command and scroll commands (;, −). Advanced by 64 bytes by the Scroll Forward command at 4EAEH. |
| 4065H ↳16485 | T1 | TRSDOS 2.3 SYS5 DEBUG: saved register save area (20 bytes, 4065H–4078H). Contains the user program's Z80 register set at the time DEBUG took control: AF, BC, DE, HL, IX, IY, AF', BC', DE', HL'. Displayed by the Register Dump routine at 4ECFH. |
| 4068H ↳16488 | N1 | NEWDOS/80: GOSUB to 4068H to display byte A as 2 hex digits at video position HL. |
| 4071H ↳16497 | N1 | NEWDOS/80: GOSUB to convert this nibble to ASCII and store it. |
| 4079H ↳16505 | T1 | TRSDOS 2.3 SYS5 DEBUG: saved stack pointer (2 bytes). User program SP value saved when DEBUG takes control. Restored by the Go command at 4F80H when resuming execution. |
| 407BH ↳16507 | T1 | TRSDOS 2.3 SYS5 DEBUG: saved program counter / breakpoint continuation address (2 bytes). Holds the PC value at the time of the breakpoint or interrupt. Used by the Go command to resume execution at the correct address. |
| 407CH ↳16508 | N1 | NEWDOS/80: Point DE to time limits table at 407CH (59, 59, 23 for sec, min, hour). |
| 407DH ↳16509 ↳TSTK$ | Model I ROM, T1 | Disk boot stack pointer. SP loaded at 0693H during disk bootstrap. |
| 407DH ↳16509 ↳MSTACK / TSTK$ | Model III ROM | 16-bit bootstrap stack pointer anchor at 407Dh. Used as the initial Z-80 stack pointer during the Model III ROM bootstrap sequence, before the main RAM has been tested and the normal STKTOP (40A0h) established. |
RS-232 / Serial Communication Workspace (4080H-408FH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4080H ↳16512 ↳RAMLOW / FDIVC | Both Model I and III ROM | Start of the RAM data block that receives a copy of the ROM's relocatable data table (39 bytes from 18F7h). This table contains system constants and variables that the ROM needs to be in writable RAM (e.g., math register seed data for the floating-point routines at 4081h–40ACh). After this copy, 4080h begins the RAM variable area and is the base address from which derived pointers like FDIVC+1, FDIVB+1, etc. are offset. |
| 4081H ↳16513 ↳FDIVC+1 | Both Model I and III ROM | Single byte at 4081h acting as the operand for the SUB n instruction at ROM address 08BBh. This is the third byte of a 24-bit subtraction sequence in the FDIV (floating-point divide) routine. During calculation, the ROM patches this byte to perform a multi-byte subtraction with borrow against the mantissa, allowing for high-precision division without using a dedicated multi-byte register. |
| 4085H ↳16517 ↳FDIVB+1 / FDIVB | Both Model I and III ROM | Single byte at 4085h acting as the operand for the SUB n instruction at ROM address 08B6h. This is the middle byte of the 24-bit mantissa subtraction sequence within the FDIV routine. Like FDIVC, it is a self-modifying code target used to store intermediate borrow/subtrahend values during a division operation. |
| 4089H ↳16521 ↳FDIVA+1 / FDIVA | Both Model I and III ROM | Single byte at 4089h acting as the operand for the SUB n instruction at ROM address 08B1h. This is the most significant byte (MSB) of the 24-bit mantissa subtraction sequence in the FDIV routine. It is updated dynamically by the division logic to manage the high-order byte of the subtraction. |
| 408CH ↳16524 ↳FDIVG+1 / FDIVG | Both Model I and III ROM | Single byte at 408Ch acting as the operand for the LD A,n instruction at 08C4h and referenced by multiple branches in the division routine. This location serves as the sign and overflow status flag for the floating-point division process. |
| 408EH ↳16526 ↳MAXFIL | T1 | TRSDOS 2.3 / Disk BASIC: MAXFIL — maximum number of open files (1 byte). Set from the answer to the HOW MANY FILES? question at BASIC startup. Read by BASIC/CMD: LD HL,(408EH); the ROM tape-BASIC meaning (USR jump address) is replaced under DOS. |
| 408EH ↳16526 ↳LSTEND / USRTAB | Both Model I and III ROM, T1 | 16-bit address at 408Eh–408Fh, serving dual purpose as LSTEND (the end-of-LIST pointer used by LLIST) and USRTAB (the USR function entry address). |
| 408FH ↳16527 ↳VARREC | T1 | TRSDOS 2.3 / Disk BASIC: VARREC — variable-length record flag (1 byte). Written by the OPEN statement processor when FILES are opened for variable-length I/O. 00H = fixed-length records; non-zero = variable-length. |
BASIC System Variables (4090H-40FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4090H ↳16528 ↳MULTR | Both Model I and III ROM | 8-byte scratch area at 4090h–4097h used as the multiplicand register during the RND pseudo-random number generation computation. The RND function implements a 24-bit linear congruential multiply using a fixed constant; MULTR holds the multiplicand bytes during the multiply loop. |
| 4093H-4098H ↳16531 ↳STAINP | Both Model I and III ROM | BASIC ON ERROR handler vector (3 bytes). Called at 2AF5H. |
| 4094H ↳16532 ↳STAINP+1 | Both Model I and III ROM | Single byte at 4094h, the operand byte of the IN A,(N) instruction at 4093h (STAINP), forming a self-modifying I/O instruction. Holds the port number from which the INPORT function reads. Writing to 4094h changes which hardware port the next INPORT call reads; corrupting it will cause INPORT to read from the wrong I/O port. |
| 4096H ↳16534 ↳OUTWRD | Both Model I and III ROM | Error handler address (3 bytes). JP target at 2AFEH. Also tape RAM OUT support. |
| 4097H ↳16535 ↳OUTWRD+1 | Both Model I and III ROM | Single byte at 4097h, the operand byte of the OUT (N),A instruction at 4096h (OUTWRD), forming a self-modifying I/O instruction. Holds the port number to which the OUTPORT function writes. Writing to 4097h changes which hardware port the next OUTPORT call targets; corrupting it will send output to the wrong I/O port. |
| 4099H ↳16537 ↳CHARC | Both Model I and III ROM | Single-byte keyboard type-ahead / lookahead buffer at 4099h. Holds the most recently read keyboard character that has not yet been consumed by the BASIC interpreter or an input routine. 00h = buffer empty (no character waiting); non-zero = a character is pending. CHARC acts as a one-character lookahead: the keyboard scanner or INKEY$ deposits a character here, and the next call to the character-fetch routine picks it up and clears it to 00h. Corrupting CHARC inserts a phantom keystroke or swallows a pending one. |
| 409AH ↳16538 ↳ERRFLG | Both Model I and III ROM, N1 | Single-byte error-number flag. Holds the BASIC error code of the most recent error (e.g., 02h = SN, 06h = OD, 2Ah = FD), or 00h if no error has occurred. Also serves as the RESUME flag: non-zero indicates an error has been trapped and not yet RESUMEd. Corrupting ERRFLG will cause ERR to return the wrong value and RESUME to malfunction. |
| 409BH ↳16539 ↳LPTPOS | Both Model I and III ROM | Single-byte printer carriage position counter: 00h = printer is at the left margin; any non-zero value is the number of characters already printed on the current line. Corrupting LPTPOS causes LPRINT output to miscount columns and break at the wrong position. |
| 409CH ↳16540 ↳PRTFLG / OUTSEL | Both Model I and III ROM | Single-byte output device selector: FFh (−1) = cassette output, 00h = video display, 01h = printer. Corrupting PRTFLG misdirects all PRINT output. |
| 409DH ↳16541 ↳LPTCFG / LINLEN | Both Model I and III ROM | Single byte at 409Dh holding the BASIC PRINT output line length used for comma-field and TAB calculations. Named LINLEN in the Gates source; initialized to 80 (50h) — the logical line width assumed by the BASIC comma-field formatter, regardless of the Model III's physical 64-column video screen. LINLEN controls where PRINT comma fields wrap: a value of 80 means the BASIC output model treats each printed line as 80 characters wide for purposes of TAB() and comma-field advancement, consistent with the original TRS-80 Model I BASIC. Changing 409Dh narrows or widens the logical output width for PRINT TAB and comma-field calculations; setting it to 40h (64) aligns the BASIC field model with the physical screen. |
| 409EH ↳16542 ↳CLMLST | Model I ROM | Size of print line. Read at 2123H. |
| 409EH ↳16542 ↳CLMLST | Model III ROM | Single byte at 409Eh holding the column position of the last valid PRINT comma field start (NCMPOS). Initialized from the compile-time constant NCMPOS = (((LINLEN / CLMWID) − 1) × CLMWID) = (((80 / 14) − 1) × 14) = 56 (38h): there are five complete 14-column comma zones (at columns 0, 14, 28, 42, 56) in an 80-column line, so 56 is the last column at which a new comma field can begin. When the current cursor column is at or past CLMLST, the next PRINT comma wraps to a new line rather than advancing to a non-existent sixth field. Changing 409Eh alters how many comma zones fit on a line. |
| 409FH ↳16543 | Model I ROM | Reserved / unused on Model I. |
| 409FH ↳16543 ↳DORES-durda | Model III ROM | Single byte at 409Fh: the DATA/string-quote flag used by the keyboard driver's character-scan path, tracking whether the current position in the BASIC line being scanned is inside a quoted string or a DATA statement body. 00h = normal token mode; 01h = inside a quoted string or DATA literal (characters should pass through unmodified rather than being tokenized). Corrupting this flag causes quoted strings or DATA literals to be incorrectly tokenized. Sources 069Bh, 06A5h, 06AEh, 06E5h, 06EAh, 06EFh are in Part 1 (the keyboard driver / line-entry routine, 0600h range) and access 409Fh to read or set the in-quote/in-DATA flag during line tokenization. |
System Workspace and DOS Linkage (4033H–4407DH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 409FH ↳16543 ↳S3STCK | T3 | TRSDOS 1.3: S3STCK — DOS system stack pointer. The command interpreter (SYS01/SYS) resets SP to this address on every entry to CMDABT and CMDRDY. |
TRSDOS 1.3 SYS0 System Workspace (4225H-42FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 40A0H ↳16544 ↳MEM1 | Model III ROM, T3 | End-of-memory pointer used by Disk BASIC |
BASIC System Variables (4090H-40FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 40A0H-40A1H ↳16544 ↳STKTOP | Both Model I and III ROM, N1 | 16-bit pointer to the top of string space (the highest RAM address available for string data, immediately below the return-address stack). Computed as MEMSIZ − 50 by default. STKTOP defines the upper boundary of the string heap and the lower boundary of the BASIC return stack. Corrupting STKTOP causes string allocations to overlap the stack (resulting in stack corruption) or to falsely report Out-Of-String-Space when memory is actually available. POKE-ing 40A0h,40A1h to a lower value is equivalent to a CLEAR with reduced string space. |
| 40A2H-40A3H ↳16546 ↳CURLIN | Both Model I and III ROM, N1 | 16-bit currently-executing BASIC line number, updated on every line entry and tested by the error handler and CONT logic. FFFFh = immediate/command mode. FFFFh in CURLIN always signals command/immediate mode; any other value is the active BASIC line number. |
| 40A4H-40A5H ↳16548 ↳TXTTAB | Both Model I and III ROM, N1 | 16-bit pointer to the start of the BASIC program text area in RAM, normally 42E9h on the Model III. TXTTAB always points one byte before the first BASIC line's link-pointer; the program is stored as a linked list of tokenized lines starting here. Corrupting TXTTAB causes the BASIC program to be lost or to point at random RAM, typically resulting in NEW or stack-corruption symptoms. |
| 40A6H ↳16550 ↳TTYPOS | Both Model I and III ROM | Single-byte cursor column position (0-based, 0–63 for 64-column mode, 0–31 for 32-column mode). Tracks the current horizontal output position for PRINT comma- and TAB-positioning logic. POKE 40A6h,n forces the cursor-column tracker to a specific value, which can confuse subsequent PRINT TAB/comma positioning until the next CR or HOME. |
| 40A7H-40A8H ↳16551 ↳BUFPNT | Both Model I and III ROM, N1 | 16-bit pointer to the keyboard input buffer. Holds the RAM address where the next keyboard input line will be stored; initialized to 42E8h during power-on. Corrupting BUFPNT causes the keyboard input routine to write the input line at the wrong RAM address, typically destroying part of the BASIC program or variable area. |
| 40A9H ↳16553 ↳CASFLG | Both Model I and III ROM, N1 | Single-byte cassette input flag. 00h = keyboard is the current input device; non-zero = cassette is the current input device for INPUT/READ operations. |
| 40AAH-40ACH ↳16554 ↳RNDX | Both Model I and III ROM | 16-bit low word (bytes 0–1) of the 3-byte pseudo-random number seed at 40AAh–40ACh. The RND function uses all three bytes as a 24-bit linear congruential generator: each call multiplies the current 24-bit seed by a fixed constant (stored in MULTR, 4090h) to produce the next seed, then scales the result into a floating-point value between 0 and 1. The sequence has a period of 2^24 (about 16.7 million) before repeating. POKE 40AAh,n and POKE 40ABh,n modify the low seed bytes, biasing subsequent RND results. |
| 40ABH ↳16555 ↳RNDX+1 | Both Model I and III ROM | Second byte of the 3-byte pseudo-random number seed at 40AAh–40ACh (RNDX). |
| 40ACH ↳16556 ↳RNDX+2 | Both Model I and III ROM | Single byte at 40ACh, the high (third) byte of the 3-byte pseudo-random number seed at 40AAh–40ACh. POKE 40ACh,n biases the high byte of the seed, producing a different sequence of pseudo-random numbers. |
| 40AEH ↳16558 ↳DIMFLG | Both Model I and III ROM | Single-byte variable locate/create flag. 00h = locate mode (find an existing variable, error if not found); non-zero = create mode (create the variable if it does not exist, as in DIM). Also carries subscript-presence information. Corrupting DIMFLG causes the variable-lookup to either always create or always error on missing variables. |
| 40AFH ↳16559 ↳VALTYP / SAFLAG | Both Model I and III ROM, N1 | Single-byte current value type flag: 02h = integer, 03h = string, 04h = single-precision float, 08h = double-precision float. Set whenever a value is loaded into the FAC (REG 1) and consulted by every expression-evaluation, type-coercion, and assignment routine. Corrupting VALTYP causes the interpreter to misinterpret the FAC's contents — for example, treating a floating-point number as a string descriptor, which produces ?TM ERROR or random-data BASIC results. |
| 40B0H ↳16560 ↳DORES / OPRTYP | Both Model I and III ROM | Single byte at 40B0h, used as a temporary operator-token store during expression evaluation (named OPRTYP in Part 3). Corrupting OPRTYP mid-expression will cause the wrong operator to be executed. |
| 40B1H-40B2H ↳16561 ↳MEMSIZ / MEMTOP | Both Model I and III ROM, N1 | 16-bit word holding the top of usable RAM as supplied by the user (or detected automatically) at the 'MEMORY SIZE?' prompt. MEMSIZ defines the highest address available to BASIC; above it lies any DOS workspace or memory-protected machine-language area. Corrupting MEMSIZ causes BASIC to either crash by writing past physical RAM or to underutilize available memory. |
| 40B3H-40B4H ↳16563 ↳TEMPPT | Both Model I and III ROM, N1 | 16-bit pointer to the next available slot in the temporary string descriptor work area (TEMPST, at 40B5h). Temporary string descriptors (3 bytes each: length, address low, address high) are stacked here during string expression evaluation. Corrupting TEMPPT causes temporary string descriptors to be written to the wrong location, overwriting live data or missing live descriptors during garbage collection. |
| 40B5H-40D2H ↳16565 ↳TEMPST | Both Model I and III ROM | Base address of the temporary string descriptor work area. TEMPST spans 40B5h–40D2h (30 bytes = room for up to 10 three-byte string descriptors). Corrupting the content of TEMPST (40B5h–40D2h) without updating TEMPPT correctly will leave dangling or phantom string descriptors. TEMPST itself is never written directly; only TEMPPT is moved within it. |
| 40D3H-40D5H ↳16595 ↳DSCTMP | Both Model I and III ROM | 3-byte temporary string descriptor (DSCTMP spans 40D3h–40D5h: byte at 40D3h = string length, 16-bit word at 40D4h = string data address). Used to build a new string descriptor before it is registered in TEMPST. Corrupting DSCTMP before PUTNEW is called will register a descriptor pointing to the wrong string data or with the wrong length. |
| 40D4H-40D5H ↳16598 ↳DSCTMP+1 | Both Model I and III ROM | 16-bit word at 40D4h–40D5h (bytes 1–2 of the DSCTMP string descriptor), holding the RAM address of the string data for the most recently allocated temporary string. Corrupting DSCTMP+1 causes string operations to write into the wrong RAM area. |
| 40D6H-40D7H ↳16600 ↳FRETOP | Both Model I and III ROM, N1 | 16-bit pointer to the next available byte at the top of string space (the free area grows downward from MEMSIZ toward the program). FRETOP is the high-water mark: all string data below FRETOP is live; all above is free. If FRETOP advances past STREND (40FDh), the next string allocation will trigger an OS (Out of String Space) error. |
| 40DAH-40DBH ↳16602 ↳DATLIN | Both Model I and III ROM | 16-bit line number of the DATA statement currently being scanned by a READ operation. Updated each time the DATA-finder advances to a new BASIC line, so that if a type mismatch or other error occurs during READ, the error message can cite the DATA line rather than the READ line. If no DATA statement has been reached yet, DATLIN holds whatever was last written (possibly a stale value); a RESTORE resets DATPTR but does not clear DATLIN. |
| 40D8H-40D9H ↳16602 ↳TEMP3 | Both Model I and III ROM | 16-bit general-purpose temporary storage, used by several unrelated routines as a scratch pointer or saved value. Sources 0FDCh, 0FFBh, 1034h, and 1289h are in Parts 1 and 2 and are used during floating-point output (FOUT) to save and restore a buffer or digit-count pointer. |
| 40DCH ↳16604 ↳SUBFLG | Both Model I and III ROM, N1 | Single-byte subscript/FOR flag. Carries two overloaded meanings: (a) non-zero = the variable name being looked up has array subscripts (i.e. it is an array element access, not a simple variable); (b) a specific non-zero value (64h) distinguishes a FOR-loop variable lookup from an ordinary subscripted access. Corrupting SUBFLG causes simple variables to be treated as arrays or vice versa. |
| 40DDH ↳16605 ↳BFKLFL | Both Model I and III ROM | Single-byte flag used by the interpreter's line-input and tokenizer path, tracking whether a line-feed or function-key prefix byte was seen during keyboard input. 00h = no prefix; non-zero = a special prefix character was detected. Corrupting BFKLFL can cause the interpreter to re-enter the input loop spuriously or to misinterpret a multi-byte key sequence. |
| 40DEH ↳16606 ↳FLGINP | Both Model I and III ROM | Single-byte READ/INPUT discriminator flag, also reused as the PRINT USING string-separator flag (USFLAG/USFLG). 00h = INPUT statement is active; non-zero (AFh) = READ statement is active. Corrupting FLGINP during an active READ will cause INPUT-style re-prompting instead of a syntax error, or vice versa. |
| 40DFH-40E0H ↳16607 ↳TEMP | Both Model I and III ROM, N1 | 16-bit general-purpose temporary storage, used by several unrelated routines. Corrupting TEMP mid-expression will cause the interpreter to branch to an arbitrary program address. |
| 40E1H ↳16609 ↳AUTFLG | Both Model I and III ROM | Single-byte AUTO-mode flag at 40E1h: 00h = AUTO mode is off (normal interactive line entry); non-zero = AUTO mode is active and the interpreter prints a tentative line number before each input prompt. POKE 40E1h,1 enables AUTO mode without going through the AUTO command; POKE 40E1h,0 disables it without pressing BREAK. |
| 40E2H-40E3H ↳16610 ↳AUTLIN | Both Model I and III ROM | 16-bit current AUTO line number. Holds the next line number that will be offered to the user in AUTO mode. Modifying AUTLIN directly changes the next line number offered in AUTO mode. |
| 40E4H-40E5H ↳16612 ↳AUTINC | Both Model I and III ROM | 16-bit AUTO increment value. Holds the step size added to AUTLIN after each AUTO-mode input line. Setting AUTINC to 0 would cause AUTO to repeat the same line number endlessly. |
| 40E6H-40E7H ↳16614 ↳SAVTXT | Both Model I and III ROM | 16-bit saved BASIC program-text pointer. Holds the address of the last BASIC byte being executed, used to preserve the interpreter's position across error handling, BREAK, and STOP. Corrupting SAVTXT causes RESUME to branch to the wrong instruction. |
| 40E8H-40E9H ↳16616 ↳SAVSTK / ERRMORH | Both Model I and III ROM | 16-bit saved stack-pointer value. Holds the Z-80 SP value at the point where the current BASIC statement began executing, used by the error handler to restore the stack to a known-good state before dispatching an error or restarting execution. |
| 40EAH-40EBH ↳16618 ↳CURLIN / ERRLIN | Both Model I and III ROM | 16-bit current BASIC line number being executed (or FFFFh in immediate/command mode). FFFFh in CURLIN indicates immediate mode; any other value is the line number of the last executed (or erroring) statement. |
| 40ECH-40EDH ↳16620 ↳ERRLIN / DOT | Both Model I and III ROM, N1 | 16-bit EDIT line number / DOT variable (last-referenced line number). Used both as the line number for the EDIT command target and as the implicit "." (dot) variable in the EDIT and LIST commands meaning "current line". If ERRLIN/DOT is corrupted, EDIT and LIST with "." will reference the wrong line. |
| 40EEH-40EFH ↳16622 ↳ERRTXT | Both Model I and III ROM | 16-bit saved program-text pointer used by RESUME. Holds the address in the BASIC program text where an error occurred, so that RESUME or RESUME 0 can return execution to the correct point. If ERRTXT is corrupted, RESUME will branch to an arbitrary address. |
| 40F0H-40F1H ↳16624 ↳ONELIN | Both Model I and III ROM, N1 | 16-bit address of the BASIC line to branch to on an ON ERROR GOTO. Holds the internal line-address (not line number) of the error handler set by ON ERROR GOTO; 0000h means no ON ERROR handler is active. Setting ONELIN to 0000h disables ON ERROR handling; setting it to a non-zero value directs errors to that BASIC line. |
| 40F2H ↳16626 ↳ONEFLG | Both Model I and III ROM | Single-byte ON ERROR active flag: 00h = not inside an ON ERROR handler; non-zero (FFh) = currently executing inside the ON ERROR routine. Prevents recursive ON ERROR handling. Corrupting ONEFLG can either prevent ON ERROR handlers from running or allow infinite error-handler recursion. |
| 40F3H-40F4H ↳16627 ↳TEMP2 / VARPTR base | Both Model I and III ROM | 16-bit general-purpose temporary storage, used during floating-point number formatting (FOUT) to hold the position of the decimal point within the ASCII output buffer. This location is strictly a scratch register; its value is only valid within the scope of the routine that wrote it. |
| 40F5H-40F6H ↳16629 ↳OLDLIN | Both Model I and III ROM | 16-bit line number of the last BASIC line that was executed before a BREAK, STOP, or END, used to support the CONT command. If OLDLIN is zero, CONT reports "Can't CONTINUE". |
| 40F7H-40F8H ↳16631 ↳OLDTXT | Both Model I and III ROM | 16-bit saved program-text pointer for CONT. Holds the byte address within the BASIC program where execution was interrupted by BREAK, STOP, or END, allowing CONT to resume at the exact statement. CONT cannot resume if OLDTXT is 0000h. |
| 40F9H-40FAH ↳16633 ↳VARTAB | Both Model I and III ROM, N1 | 16-bit pointer to the start of the simple-variable storage area (immediately after the end of the BASIC program text). VARTAB must equal TXTTAB + program-length; any corruption causes variable operations to overwrite program text or miss variables. |
| 40FBH-40FCH ↳16635 ↳ARYTAB | Both Model I and III ROM, N1 | 16-bit pointer to the start of the BASIC array-variable storage area (immediately after the simple-variable area). Corrupting ARYTAB causes the interpreter to overlap the simple-variable and array areas, corrupting both. |
| 40FDH-40FEH ↳16637 ↳STREND | Both Model I and III ROM, N1 | 16-bit pointer to the first byte of free memory above all variables and arrays (the high-water mark of the heap). If STREND is set too low it will overlap live variable data; set too high it will waste or overwrite string space. |
| 40FFH-4100H ↳16639 ↳DATPTR | Both Model I and III ROM | 16-bit READ/DATA pointer. Holds the address of the next DATA item to be consumed by a READ statement. Corrupting DATPTR causes READ to fetch values from the wrong location; a pointer past the end of all DATA produces an OD (Out of Data) error. |
| 4100H-4102H ↳16640 ↳MEM | T3 | TRSDOS 1.3 SYS5 (DEBUG): breakpoint 2 while DEBUG is in use (SINGLE puts the jump target here): address LSB, MSB, then the byte the F7H (RST 30H) replaced. START2 puts the byte back and clears the address on every entry. |
Variable Type Table and Trace Flag (4101H-411BH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4101H-411AH ↳16641 ↳DEFTBL | Both Model I and III ROM | 26-byte DEFINT/DEFSNG/DEFDBL/DEFSTR variable-type declaration table, one byte per letter A–Z (4101h = 'A', 4102h = 'B', … 411Ah = 'Z'). Each byte holds the default numeric type for variables starting with that letter: 02h = integer, 04h = single-precision, 08h = double-precision, 03h = string. Corrupting DEFTBL causes variables to be treated as the wrong type, producing incorrect computation results or type-mismatch errors. |
| 4101H ↳16641 ↳MEM+1 | T3 | TRSDOS 1.3 SYS5 (DEBUG): also the display mode flag: 00H = half page (8 lines), not zero = full page (16 lines, the S command). START2 clears it on every entry. |
| 4103H-4105H ↳16643 ↳MEM+3 | T3 | TRSDOS 1.3 SYS5 (DEBUG): breakpoint 1 (SINGLE puts the next instruction here): address LSB, MSB, then the replaced byte. 4103H-4104H is also the address of the M command, rounded down to nn00H. |
| 4106H-4107H ↳16646 ↳MEM+6 | T3 | TRSDOS 1.3 SYS5 (DEBUG): the memory display address (D, ; and - commands), a multiple of 10H, not below ENDBUG (5600H). |
| 4108H-411FH ↳16648 ↳MEM+8 | T3 | TRSDOS 1.3 SYS5 (DEBUG): the program's registers, copied from the STACK by START: AF 4108H, BC 410AH, DE 410CH, HL 410EH, AF' 4110H, BC' 4112H, DE' 4114H, HL' 4116H, IX 4118H, IY 411AH, SP 411CH (MEM+28, also the top of DEBUG's own STACK), PC 411EH (MEM+30). The R command changes them; GO (MISS1, 5016H) loads them back. |
| 411BH ↳16667 ↳TRCFLG | Both Model I and III ROM | Single-byte TRON/TROFF flag: 00h = TROFF (trace off); non-zero (AFh) = TRON (trace on). Programs can query or set TRCFLG directly via POKE to enable or disable tracing without the TRON/TROFF commands. |
Floating-Point Accumulator / Math Workspace (411CH-4130H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 411CH ↳16668 ↳DFACLO-1 | Both Model I and III ROM | Single byte at 411Ch, one byte below the double-precision floating-point accumulator DFACLO (411Dh). Serves as an extension byte for double-precision shift and normalization operations. |
| 411DH-4124H ↳16669 ↳DFACLO | Both Model I and III ROM | 16-bit low word (bytes 0–1) of the 8-byte double-precision floating-point accumulator (DFAC), at 411Dh–411Eh. The DFAC spans 411Ch–4124h (with guard byte at 411Ch); DFACLO holds the two least-significant mantissa bytes. |
| 411FH ↳16671 ↳DFACLO+2 | Both Model I and III ROM | Single byte at 411Fh, the third byte (bytes 2) of the double-precision accumulator DFAC (411Dh–4124h). |
| 4120H ↳16672 ↳FACLO-1 | Both Model I and III ROM | Single byte at 4120h, one byte below the single-precision floating-point accumulator FACLO (4121h). |
| 4121H-4122H ↳16673 ↳FACLO | Both Model I and III ROM, N1 | 16-bit word at 4121h–4122h: the low two bytes of the floating-point mantissa in the FAC (Floating-point ACcumulator), and the standard low-address entry point into the FAC block (4121h–4124h). For Integer: FACLO holds the 16-bit signed integer value directly (LHLD/SHLD FACLO reads or writes the integer). For Single Precision: bytes at 4121h (bits 1–8 of mantissa), 4122h (bits 9–16), and 4123h (FAC-1, bits 17–24 plus sign) form the 24-bit mantissa; the exponent is at FAC (4124h). The full single-precision number occupies 4121h–4124h. For Double Precision: FACLO is the upper portion of the double-precision mantissa; the four additional least-significant bytes are in DFACLO (411Dh–4120h). For Strings: FACLO holds a 16-bit pointer to the string descriptor; LHLD FACLO retrieves the descriptor address. All arithmetic routines (FADD, FSUBS, FMULT, FDIV, FCOMP, MOVRF, MOVMF, MOVFR, PUSHF, integer conversion, double-precision operations, string operations) use FACLO as the standard FAC base address for block copies, compares, loads, and stores. The result of every one-argument function is left in FACLO/FAC. For two-argument operations: Integer and Single Precision place the first argument in registers B,C,D,E and the second in FAC/FACLO, leaving the result in FACLO/FAC. Double Precision places the first argument in FAC/FACLO and the second in ARG/ARGLO, leaving the result in FACLO/FAC. POKE 4121h,n and POKE 4122h,n alter the low mantissa bytes of the FAC; setting both to 0 while also zeroing FAC (4124h) produces a clean zero. |
| 4123H-4124H ↳16675 ↳FAC-1 | Both Model I and III ROM, N1 | Single byte at 4123h: the most significant byte (MSB) of the floating-point mantissa in the FAC, holding the sign bit in bit 7 and mantissa bits 2–8 in bits 0–6 (bit 1 of the mantissa is always an implicit 1 and is not stored). For Integer and Single Precision: this is the third mantissa byte of the 3-byte FACLO block (4121h–4123h); bit 7 is the sign (0=positive, 1=negative). For Double Precision: FAC-1 is the high mantissa byte of the 8-byte double-precision FAC (411Ch–4124h). Sign is stored in bit 7: the sign of the entire FAC number is the sign bit of FAC-1 regardless of numeric type. Negation flips bit 7 of FAC-1 via XRI 80h (Gates: NEG, NEGR, ABS all operate on FAC-1 to toggle or clear the sign). The comparison routine SIGNC reads FAC-1 to determine the sign of the FAC for SGN() and comparison operations. During FADD/FSUBS, FAC-1 is unpacked before addition: the assumed 1-bit is inserted into position, the sign is separated, and after the operation the result sign is placed back into bit 7 of FAC-1. During FMULT/FDIV, the product sign is computed from the XOR of both operand signs and written into FAC-1 at the end. The high half of the FAC (FAC-1 at 4123h and FAC exponent at 4124h) is routinely saved and restored as a 16-bit word via LD HL,(4123H) / LD (4123H),HL during stack-based save/restore sequences. POKE 4123h,n+128 makes the FAC negative; POKE 4123h,n without bit 7 set makes it positive. |
| 4124H ↳16676 ↳FAC | Both Model I and III ROM | Single byte at 4124h: the biased binary exponent of the FAC (Floating-point ACcumulator). For Integer and Single Precision: exponent is biased by 80h (128 decimal) — a stored value of 81h means 2^1, 80h means 2^0, 82h means 2^2, etc. A stored value of 00h is the special zero sentinel: the entire FAC is treated as exactly 0.0 regardless of the mantissa bytes, and FACLO/FAC-1 are ignored. For Double Precision: FAC holds the exponent of the 8-byte double-precision accumulator using the same excess-80h bias, with the additional mantissa bytes in DFACLO (411Dh). The exponent range is 01h–FFh representing 2^(-127) through 2^127; 00h always means zero. To shift the FAC right by 1 bit: INC (FAC). To shift left by 1 bit: DEC (FAC). Every arithmetic operation (FADD, FSUBS, FMULT, FDIV, DADD, DMUL, DDIV) tests FAC for zero before operating, aligns operand exponents by comparing FAC against the other operand's exponent, and writes the result exponent back to FAC. Overflow (exponent wraps above FFh) jumps to ERROV; underflow (wraps below 01h) produces zero. POKE 4124h,0 zeros the FAC regardless of other bytes; POKE 4124h,n sets the magnitude of the FAC's next use. |
| 4125H ↳16677 ↳FAC+1 | Both Model I and III ROM | Single byte at 4125h: the temporary sign-storage byte for the floating-point routines, holding the sign bit (in bit 7) of an intermediate floating-point computation. Although this is just past the 5-byte single-precision FAC (4121h–4124h plus the implicit sign in 4123h), it is reused by the math routines as scratch space for sign manipulation. The HTM annotation explicitly notes 'NOTE: 4125H-4126H is used by floating point routines.' POKE 4125h alters the temporary sign byte; this is normally only meaningful while a floating-point operation is in progress, since the byte is rewritten by every math routine that touches it. |
| 4126H ↳16678 ↳ARGLO-1 | Both Model I and III ROM | Single byte at 4126h: the overflow/guard byte one position below ARGLO (4127h), used exclusively during double-precision arithmetic. For Integer and Single Precision: unused. For Double Precision: when DSHFTR right-shifts the ARG mantissa during exponent alignment in DADD/DSUB, the bits shifted out of the least-significant byte of ARG fall into this byte. After the shift, the code at 0CB3h reads (4126h) and copies it to DFACLO-1 (411Ch) via LD A,(4126H) / LD (411CH),A, transferring the shifted-out bits into the FAC's guard byte so the rounding logic at the end of double-precision add/subtract can account for the lost precision. Outside an active double-precision add or subtract, this byte is transient and meaningless. |
| 4127H-412EH ↳16679 ↳ARGLO / ARG-7 | Both Model I and III ROM | Base address of the ARG (second-operand) register's mantissa bytes, at 4127h. ARG is the second floating-point operand used by two-argument math operations. For Integer and Single Precision: the first argument is passed in CPU registers B,C,D,E and the second is in FAC/FACLO; ARG/ARGLO are not used. For Double Precision: the calling convention is reversed — the first operand is in FAC/FACLO and the second operand is in ARG/ARGLO. ARGLO (4127h) is the least-significant byte of the ARG mantissa. The full double-precision ARG block runs from ARGLO (4127h, least significant) up through ARG-1 (412Ch, sign and high mantissa byte) to ARG (412Dh, exponent) — eight bytes total. (Note: the single-precision ARG exponent is at 412Eh, which is ARG for the single-precision layout.) All sources load HL or DE with 4127h to point at the base of the ARG mantissa block for block-copy (VMOVE, VMOVFA), byte-by-byte comparison (DCOMP/DCOMPD), or multi-byte arithmetic operations (DADD, DSUB, DMUL, DDIV). VMOVAF (move FAC to ARG) stores the current FAC into ARG/ARGLO; VMOVFA (move ARG to FAC) loads ARGLO into the FAC. During double-precision operations, the shift routine DSHFTR operates on the ARG block starting from ARG-1 downward toward ARGLO, with overflow falling into ARGLO-1 (4126h). |
| 412DH ↳16685 ↳ARG-1 | Both Model I and III ROM | Single byte at 412Dh: the high-mantissa-and-sign byte of the ARG register (one byte below the ARG exponent at 412Eh). In the ARG block layout, ARGLO (4127h) is the least-significant mantissa byte and ARG-1 (412Dh = ARGLO+6) is the most significant mantissa byte; it holds the sign of ARG in bit 7 and the high mantissa bits in bits 0–6. For Integer and Single Precision: ARG is the second operand of two-argument operations. ARG-1 carries the sign of the single-precision ARG value; negating ARG flips bit 7 of ARG-1. For Double Precision: ARG-1 is the high byte of the 7-byte ARG mantissa (ARGLO through ARG-1), carrying the sign in bit 7. |
| 412EH ↳16686 ↳ARG | Both Model I and III ROM | Single byte at 412Eh: the biased binary exponent of the ARG register (second operand). Uses the same excess-80h bias as FAC (4124h): 00h means ARG is exactly zero, 81h means 2^1, 80h means 2^0, etc. For Integer and Single Precision: the first argument is in registers B,C,D,E and the second is in FAC; ARG/412Eh is used here as a scratch exponent byte for the single-precision ARG (second operand in compare and negate operations). A zero at 412Eh means the single-precision ARG is zero — the negate routine (0C77h) tests this to avoid flipping the sign of a zero. For Double Precision: the calling convention reverses — the first operand is in FAC and the second is in ARG. The double-precision ARG exponent is at 412Eh; the 7-byte mantissa runs from ARGLO (4127h) through ARG-1 (412Dh). DADD/DSUB read the ARG exponent at 412Eh to align the two operands' mantissas before adding. POKE 412Eh,0 makes the ARG appear to be zero to any subsequent operation that checks it. |
| 412FH ↳16687 ↳FBUFFR | Both Model I and III ROM | 16-bit base address of the 35-byte floating-point ASCII output buffer (FBUFFR spans 412Fh–4151h). The base address 412Fh is used as a reference sentinel; the actual digit output starts at FBUFFR+1 (4130h). This entry point is reached after the conversion loop at 10C0h completes, marking the end of the mantissa digit collection phase. |
| 4130H-4149H ↳16688 ↳FBUFFR+1 | Both Model I and III ROM | First usable byte of the floating-point ASCII output buffer (FBUFFR+1 = 4130h), used to accumulate the digit characters and formatting marks during floating-point-to-ASCII (FOUT) conversion. All three sources load HL with 4130h to access the buffer. Corrupting FBUFFR+1 during an active FOUT call will produce garbled number output. |
| 414AH ↳16714 ↳FBUFFR+27 | Both Model I and III ROM | Byte at 414Ah (FBUFFR+27), used as the destination address for double-precision ARG block-copy operations during floating-point divide and normalize routines. This reuse of the upper FBUFFR as a scratch area means FBUFFR+27 through FBUFFR+34 (414Ah–4151h) must not be disturbed during double-precision divide operations. |
| 414FH ↳16719 ↳FMLTT1 | Both Model I and III ROM | Single byte at 414Fh: temporary accumulator for the carry/partial-product byte during the single-precision floating-point multiply loop. This byte acts as the intermediate carry accumulator between successive 8-bit multiply steps; its value is only valid inside the FMULT loop. |
| 4150H-4151H ↳16720 ↳FMLTT2 | Both Model I and III ROM | 16-bit temporary partial-product word at 4150h–4151h, used during the single-precision floating-point multiply loop and as a scratch block-copy destination in double-precision operations. The overlap between FMULT use (4150h–4151h as a 16-bit word) and DFLOAT use (4150h as block destination) means these two routines must not interleave. |
| 4151H ↳16721 ↳FBUFFR+34 | Both Model I and III ROM | Byte at 4151h (FBUFFR+34), the last byte of the floating-point ASCII output buffer, reused as a single-byte scratch location during double-precision arithmetic. This is the final byte of the FBUFFR scratch region used by the double-precision routines; it holds a transient value only valid within the immediate instruction sequence. |
Disk BASIC Entry Points / Driver Vector Table (4152H-41E4H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4152H ↳16722 ↳ERCALL | Both Model I and III ROM, T3 | Start of the error-handler jump table installed in RAM at 4152h. Changing the destination address at init time would redirect all unpatched error calls. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5A96H (CVI) here. |
| 4155H ↳16725 | Both Model I and III ROM, T3 | Disk BASIC: FN / VARPTR vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 523AH (FNDOER, FN) here. |
| 4158H ↳16728 | Both Model I and III ROM, T3 | Disk BASIC: CVS vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5A99H (CVS) here. |
| 415BH ↳16731 | Both Model I and III ROM, T3 | Disk BASIC: DEF vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 52FFH (DEF) here. |
| 415EH ↳16734 | Both Model I and III ROM, T3 | Disk BASIC: CVD vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5A9CH (CVD) here. |
| 4161H ↳16737 | Both Model I and III ROM, T3 | Disk BASIC: EOF vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5DEFH (EOF) here. |
| 4164H ↳16740 | Both Model I and III ROM, T3 | Disk BASIC: LOC vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5E33H (LOC) here. |
| 4167H ↳16743 | Both Model I and III ROM, T3 | Disk BASIC: LOF vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5E7CH (LOF) here. |
| 416AH ↳16746 | Model III ROM, T3 | Disk BASIC: MKI$ vector (Model III only). TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5A7DH (MKI$) here. |
| 416DH ↳16749 | Model III ROM, T3 | Disk BASIC: MKS$ vector (Model III only). TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5A80H (MKS$) here. |
| 4170H ↳16752 | Both Model I and III ROM, T3 | Disk BASIC: MKD$ vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5A83H (MKD$) here. |
| 4173H ↳16755 | Both Model I and III ROM, T3 | Disk BASIC: CMD vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5374H (CMD) here. |
| 4176H ↳16758 | Both Model I and III ROM, T3 | Disk BASIC: TIME$ / SGN function vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 3030H (the ROM's TIME$) here. |
| 4177H ↳16759 ↳TIME+1 | Model III ROM | 16-bit operand word at 4177h–4178h, forming bytes 1–2 of the 3-byte JP instruction at 4176h (TIME$). The TIME$ vector at 4176h is initialized during ERCALL table setup to JP 012Dh (?L3 ERROR), because the base Model III ROM treats TIME$ as a DOS-only function. |
| 4179H ↳16761 | Both Model I and III ROM, T3 | Disk BASIC: OPEN vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5FC3H (OPEN) here. |
| 417CH ↳16764 | Both Model I and III ROM, T3 | Disk BASIC: FIELD vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5CF3H (FIELD) here. |
| 417FH ↳16767 | Both Model I and III ROM, T3 | Disk BASIC: GET vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5EC0H (GET) here. |
| 4182H ↳16770 | Both Model I and III ROM, T3 | Disk BASIC: PUT vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5EBFH (PUT) here. |
| 4185H ↳16773 | Both Model I and III ROM, T3 | Disk BASIC: CLOSE vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5CB8H (CLOSE) here. |
| 4188H ↳16776 | Both Model I and III ROM, T3 | Disk BASIC: LOAD vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5BBBH (LOAD) here. |
| 418BH ↳16779 | Both Model I and III ROM, T3 | Disk BASIC: MERGE vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5C52H (MERGE) here. |
| 418EH ↳16782 | Both Model I and III ROM, T3 | Disk BASIC: NAME vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 566FH (RENUMB: NAME, through SYS12) here. |
| 4191H ↳16785 | Both Model I and III ROM, T3 | Disk BASIC: KILL vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 60CDH (KILL) here. |
| 4194H ↳16788 | Both Model I and III ROM, T3 | Disk BASIC: & (ampersand) vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5703H (OCTCNS: &H and &O) here. |
| 4197H ↳16791 | Both Model I and III ROM, T3 | Disk BASIC: LSET vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5D4CH (LSET) here. |
| 419AH ↳16794 | Both Model I and III ROM, T3 | Disk BASIC: RSET vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5D4BH (RSET) here. |
| 419DH ↳16797 | Both Model I and III ROM, T3 | Disk BASIC: INSTR vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 567BH (INSTR) here. |
| 41A0H ↳16800 | Both Model I and III ROM, T3 | Disk BASIC: SAVE vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5C90H (SAVE) here. |
| 41A3H ↳16803 | Both Model I and III ROM, T3 | Disk BASIC: LINE vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5427H (LINE INPUT) here. |
| 41A6H ↳16806 ↳RETCNT | Both Model I and III ROM, T3 | Error processing vector. RET in cassette BASIC; JP to long error messages in Disk BASIC. Start of 21 hookable RET stubs. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 427BH (SYSS10: SYS10 shows the full error text) here. |
| 41A9H ↳16809 | Both Model I and III ROM, T3 | DOS link for USR N (3 bytes). Called at 27FEH. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5322H (USROUT: USR0-USR9 from USRTAB) here. |
| 41ACH ↳16812 | Both Model I and III ROM, T3 | DOS link for READY prompt. Called at 1A1CH. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5C38H (PRGFIN: PTRFIL 0000H, close file 0, protection check from READY) here. |
| 41AFH ↳16815 | Model I ROM, T3 | DOS exit from 0368H. Keyboard line input. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 57DAH (a line from the file, or the command mode line editor at 587CH) here. |
| 41AFH ↳16815 | Model III ROM | DOS link for INKEY$ / keyboard input. Called at 0368H. |
| 41B2H ↳16818 | Both Model I and III ROM, T3 | DOS exit from 1AA1H. After BASIC line tokenized. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5C7BH (DIRDO: Direct statement in file error; protection check) here. |
| 41B5H ↳16821 | Both Model I and III ROM, T3 | DOS exit from 1AECH. After program line table updated. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 59FDH (EXFIND: keep file 0 open) here. |
| 41B8H ↳16824 | Both Model I and III ROM, T3 | DOS exit from 1AF2H. After above + CLEAR. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5A0CH (EXFIN2) here. |
| 41BBH ↳16827 | Both Model I and III ROM, T3 | DOS exit from 1B8CH, 1DB0H. NEW/END processing, close files. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5CE9H (CLSALL: close every file) here. |
| 41BEH ↳16830 | Both Model I and III ROM, T3 | PRINT# / PRINT output hook. Called from 2174H. Level II: RESET button vector. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5451H (FINDRT: PTRFIL 0000H) here. |
| 41C1H ↳16833 | Both Model I and III ROM, T3 | Byte output to any device. Called from 032CH. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5813H (EXOUTC: output to the file) here. |
| 41C4H ↳16836 | Both Model I and III ROM, T3 | ROM KB scan hook. Called from 0358H. INKEY$ + BREAK check. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5822H (EXINC: characters from the file) here. |
| 41C7H ↳16839 | Both Model I and III ROM, T3 | DOS exit from 1EA6H. RUN with filename/line number. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5BB3H (LRUN: RUN "file") here. |
| 41CAH ↳16842 | Both Model I and III ROM, T3 | DOS exit from 206FH. Print processing, check for PRINT#. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5368H (FILGTO: PRINT #n) here. |
| 41CDH ↳16845 | Both Model I and III ROM, T3 | DOS exit from 20C6H. After number to ASCII, before print. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5A19H (EXDSKL) here. |
| 41D0H ↳16848 | Both Model I and III ROM, T3 | DOS exit from 2103H. After PRINT sends CR. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5A18H (a RET) here. |
| 41D3H ↳16851 | Both Model I and III ROM, T3 | DOS exit from 2108H, 2141H. Comma tabs and TAB statement. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 59E5H (EXDPOS: comma and TAB with a file) here. |
| 41D6H ↳16854 | Both Model I and III ROM, T3 | INPUT# hook. Called from 219EH. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5459H (FILSTI: INPUT #n) here. |
| 41D9H ↳16857 | Both Model I and III ROM, T3 | Left-side MID$ hook. JP at 2AECH. Only DOS exit that's a JP, not CALL. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5759H (DLHSMD: MID$ =) here. |
| 41DCH ↳16860 | Both Model I and III ROM, T3 | READ/INPUT variable assignment. Called from 222DH. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5AB3H (FILIND: INPUT # item) here. |
| 41DFH ↳16863 | Both Model I and III ROM, T3 | DOS exit from 2278H, 2B44H. After INPUT assign + LIST processing. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 5471H (EXCHDS) here. |
Device Control Blocks (41E5H-41FCH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 41E0H ↳16864 | N1 | NEWDOS/80: Load the Stack Pointer with 41E0H, resetting to the top of the DOS stack area. |
Disk BASIC Entry Points / Driver Vector Table (4152H-41E4H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 41E2H ↳16866 | Both Model I and III ROM, T3 | SYSTEM command hook. Called from 02B2H before *? prompt. TRSDOS 1.3 Disk BASIC (BASIC/CMD) loads JP 59C8H (SYSOUT, a RET) here. |
Device Control Blocks (41E5H-41FCH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 41E5H-42E8H ↳16869 ↳BUFINI-3 | Model I ROM | Single unified DCB. ROM at 0080H inits to 3AH,00H,2CH. I/O buffer at 41E8H (256 bytes) through 42E8H. |
| 41E5H-41ECH ↳16869 ↳RIDCB / BUFINI-3 | Model III ROM | Start of the RS-232 Input Device Control Block (8 bytes at 41E5h–41ECh). |
| 41E8H ↳16872 ↳BUFINI | Both Model I and III ROM | Start of the 1-character RS-232 Input buffer at 41E8h (byte at IX+03h of RIDCB, the RS-232 Input Device Control Block). Holds the most recently received RS-232 byte, or 00h if no character has arrived. The RS-232 receive interrupt stores incoming bytes here; the RSIN driver at 365Ah reads and clears this location via LD (IX+03H),A. |
| 41EBH ↳16875 ↳F1KEY | Model 4 ROM | F1 key definition (used by the Model 4 keyboard driver): the ASCII character returned when F1 is pressed. Normally set to 60H (shift-@) during BASIC initialization; may be changed so any desired character is returned for F1. On the Model III this byte is part of the RS-232 Input DCB (41E5H-41ECH). |
| 41ECH ↳16876 ↳F2KEY | Model 4 ROM | F2 key definition (used by the Model 4 keyboard driver): the ASCII character returned when F2 is pressed. Normally set to 1BH (shift-up-arrow) during BASIC initialization; may be changed so any desired character is returned for F2. On the Model III this byte is part of the RS-232 Input DCB (41E5H-41ECH). |
| 41EDH-41F4H ↳16877 ↳RODCB | Model III ROM | Start of the RS-232 Output Device Control Block (8 bytes at 41EDh–41F4h). |
| 41F0H ↳16880 ↳RODCB+3 / RSTX | Both Model I and III ROM | Byte at 41F0h (IX+03h of RODCB, the RS-232 Output Device Control Block), serving as the 1-character RS-232 output buffer. Holds the byte most recently queued for RS-232 transmission. The RS-232 transmit routine at 3680h writes the character to send into this location via LD (IX+03H),A before activating the transmit interrupt. |
| 41F3H ↳16883 ↳F3KEY | Model 4 ROM | F3 key definition (used by the Model 4 keyboard driver): the ASCII character returned when F3 is pressed. Normally set to 08H (backspace) during BASIC initialization; may be changed so any desired character is returned for F3. On the Model III this byte is part of the RS-232 Output DCB (41EDH-41F4H). |
| 41F4H ↳16884 | Both Model I and III ROM | Value 103. First of 2 to change LINE to LPRINT. |
| 41F4H ↳16884 | Model 4 ROM | Keyboard row storage for 3880H (used by the Model 4 keyboard driver). The keyboard row read at 3880H is stored here. Bit set if the key is pressed: bit 0 LEFT-SHIFT, bit 1 RIGHT-SHIFT, bit 2 CTRL, bit 3 CAPS, bit 4 F1, bit 5 F2, bit 6 F3, bit 7 unused. See 4036H-403CH for the related keyboard-row storage. The keyboard-input entry at 3106H (the 3024H vector target) reads 3880H, and the control-key decoder debounces new presses against this saved copy. |
| 41F5H-41FCH ↳16885 ↳RNDCB | Both Model I and III ROM | Start of the RS-232 Init/Control Device Control Block (8 bytes at 41F5h–41FCh), used to configure the RS-232 interface parameters (baud rate, word length, parity, stop bits). |
| 41F8H ↳16888 ↳BUFINI+20 | Both Model I and III ROM, N1 | $RSINIT: Baud rate code. Bits 7-4=TX, 3-0=RX. Also Model I cold-start stack (SP at 00ACH); Model III uses 42F8H. |
| 41F8H ↳16888 ↳BAUD | T3 | TRSDOS 1.3 SYS9 (library commands part 2): SETCOM stores the baud rate byte here (5D83H, from BADTAB); 55H (300 baud) for SETCOM (); 00H for SETCOM (OFF); then calls the ROM's 005AH. |
| 41F9H ↳16889 | Both Model I and III ROM, N1 | $RSINIT: Parity/word/stop-bit code. Default 108. |
| 41F9H ↳16889 ↳UART | T3 | TRSDOS 1.3 SYS9 (library commands part 2): SETCOM stores the UART byte here: A4H for SETCOM () (7 bits, even parity, 1 stop bit), 00H for SETCOM (OFF); WORD=, STOP= and PARITY= set or clear its bits (SETBYT 5DF1H, UNSET 5DFAH). 00H means the RS-232 is off when SETCOM shows the settings. |
| 41FAH ↳16890 | Both Model I and III ROM, N1 | $RSINIT: Wait switch. 0=wait, non-zero=no wait. |
| 41FAH ↳16890 ↳WAIT | T3 | TRSDOS 1.3 SYS9 (library commands part 2): SETCOM stores the wait switch here: FFH for WAIT or OFF, 00H for NOWAIT, 55H for SETCOM (). |
| 41FBH ↳16891 | Model 4 ROM | Printer-type flag. The Model 4 printer driver fetches this byte at 03E9H (v2.0-family ROMs) to select printer handling. On the Model I/III this byte falls inside the RS-232 Init/Control DCB range (41F5H-41FCH). |
| 41FCH ↳16892 | Model 4 ROM | Expansion/case-fold flag. The Model 4 printer driver fetches this byte at 03F6H (v2.0-family ROMs). On the Model I/III this byte is the last byte of the RS-232 Init/Control DCB range (41F5H-41FCH). |
| 41FDH ↳16893 ↳LROW | Model III ROM | Single byte at 41FDh holding the saved keyboard-row number (0–7) of the last key position detected during the keyboard scan. Named LROW (Last Row). LROW is used alongside LCOL (41FEh) to identify the specific key by its (row, column) coordinates in subsequent debounce and character-lookup steps. |
| 41FEH ↳16894 ↳LCOL | Model III ROM | Single byte at 41FEh holding the saved keyboard-column bit-mask of the last key position detected during the keyboard scan. Named LCOL (Last Column). |
| 41FFH-4200H ↳16895 ↳TDELAY | Model III ROM | 16-bit auto-repeat delay counter reload value at 41FFh–4200h. Holds the number of keyboard interrupt ticks to wait before beginning key auto-repeat after a key is first pressed. The initial TDELAY value is set during RS-232 or keyboard DCB initialization; modifying it via POKE adjusts the auto-repeat onset delay. |
Boot, Stack, and Buffer Workspace (42E5H-43E8H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4200H-42FFH ↳16896 | T1, N1 | TRSDOS 2.3: directory sector buffer (256 bytes, 4200H–42FFH). Loaded from disk by SYS0 routines 4AC1H (read directory sector into 4200H) and 4AD6H (write directory and GAT sectors). The BOOT/SYS bootstrap code is initially loaded here at address 4200H. |
Model III System Variables and Cassette Data (4201H-4224H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4201H-4202H ↳16897 ↳TCOUNT | Model III ROM, N1 | 16-bit auto-repeat tick counter at 4201h–4202h. Counts down from TDELAY (41FFh) on each keyboard interrupt tick; when it reaches zero, an auto-repeat keystroke is generated. |
Boot, Stack, and Buffer Workspace (42E5H-43E8H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4202H ↳16898 | N1 | NEWDOS/80: Fetch byte from 4202H (disk buffer). |
Model III System Variables and Cassette Data (4201H-4224H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4203H-4205H ↳16899 | Model III ROM, T3 | Cassette BREAK key vector (3 bytes). The ROM sets JP 022EH; TRSDOS 1.3 SYS0 loads 4030H (ABORT) into 4204H-4205H, so a BREAK during cassette I/O aborts to TRSDOS READY. |
| 4206H-4208H ↳16902 | Model III ROM | Disk function vector / interrupt #4 (3 bytes). Non-disk: JP 35FAH (RET). |
| 4209H-420BH ↳16905 | Model III ROM | Disk function vector / interrupt #5 (3 bytes). Non-disk: JP 35FAH (RET). |
| 420CH-420DH ↳16908 ↳WRILOC | Model III ROM | 16-bit cassette write vector: holds the address of the ROM routine to actually write one bit or byte to tape. |
| 420EH-420FH ↳16910 ↳REDLOC | Model III ROM | 16-bit cassette read vector: holds the address of the ROM routine to actually read one bit or byte from tape. |
| 4210H ↳16912 ↳IOSTAT / CAST$ | Model III ROM | Single-byte shadow of I/O port ECh (the Miscellaneous Control port). Each bit controls a hardware feature: bit 0 = real-time clock display enable, bit 1 = cassette motor on/off (1=motor on), bit 2 = double-size (wide) character mode, bit 3 = alternate character set (Kana). Writing to port ECh takes effect immediately; 4210h is kept in sync so the ROM can read the current port state without re-reading hardware. |
| 4211H ↳16913 ↳CASDCB | Model III ROM | Single-byte cassette baud-rate selector: 00h = 500 baud, non-zero = 1500 baud. |
| 4212H ↳16914 ↳BLINK | Model III ROM | Single byte at 4212h holding the cassette motor/cursor blink counter. Counts down on each clock interrupt tick to produce a visible blink of the cassette tape-motion indicator on the screen, confirming cassette I/O activity. The initial reload value determines the blink rate; a larger value produces a slower blink. |
| 4213H ↳16915 ↳MSKSTA | Model III ROM | Single byte at 4213h holding the default maskable-interrupt mask value to restore when the cassette stops. Controls which interrupt sources are enabled after cassette I/O completes. |
| 4214H ↳16916 ↳SCRLCT | Model III ROM, T3 | Single-byte protected-lines count (bits 0–2 used, giving a value of 0–7), specifying how many screen rows at the top are protected from scrolling. |
| 4216H ↳16918 ↳TICKIT | Model III ROM | Single byte at 4216h: the real-time clock heartbeat counter. Counts down from 1Eh (30) on each 50 Hz (or 60 Hz) real-time clock interrupt; when it reaches 00h it is reloaded to 1Eh and the clock display and TIME registers are updated. When zero, the counter is reloaded with 1Eh and HL is advanced to 4217h (SECONDS) to begin the seconds/minutes/hours rollover chain. |
| 4217H ↳16919 | Model III ROM | Clock: Seconds (00-59). POKEable. |
| 4218H ↳16920 | Model III ROM, N1 | Clock: Minutes (00-59). POKEable. |
| 4219H ↳16921 ↳TICKIT+3 | Model III ROM | Single byte at 4219h holding the current HOUR (0–23) of the real-time clock. Part of the TICKIT block: 4216h = heartbeat counter, 4217h = seconds, 4218h = minutes, 4219h = hours, 421Ah = year, 421Bh = day, 421Ch = month. |
| 421AH ↳16922 | Model III ROM, T3 | Clock: Year (00-99). POKEable. |
| 421BH ↳16923 | Model III ROM | Clock: Day (01-31). POKEable. |
| 421CH ↳16924 ↳TICKIT+6 | Model III ROM, T3 | Single byte at 421Ch holding the current MONTH (1–12) of the real-time clock date. Part of the TICKIT block: 421Ah = year, 421Bh = day, 421Ch = month. |
| 421DH ↳16925 ↳ROUDCB | Model III ROM | Start of the RS-232 Output-used Device Control Block (8 bytes at 421Dh). This DCB is used for actual RS-232 character output in certain contexts distinct from the main RODCB at 41EDh. |
Boot, Stack, and Buffer Workspace (42E5H-43E8H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 421FH ↳16927 | N1 | NEWDOS/80: Store calculated value to 421FH (GAT size in buffer). |
Model III System Variables and Cassette Data (4201H-4224H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4220H-4221H ↳16928 | Both Model I and III ROM | $ROUTE destination device name (2 bytes). |
| 4222H-4223H ↳16930 | Model III ROM | I/O Router DCB: Source device name (2 bytes). |
| 4224H ↳16932 ↳CNTFLG | Model III ROM | Single byte at 4224h: the Control-key flag. Holds FFh if no Control-key modifier is active, or 1Fh if the Control key (Left Shift + Down Arrow combination on the Model III) is currently pressed. Programs can read CNTFLG via PEEK 4224h to test whether the Control key is being held. |
TRSDOS 1.3 SYS0 System Workspace (4225H-42FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4225H-4264H ↳16933 ↳COMAND | Model III ROM, T3 | 64-byte command line input buffer |
Boot, Stack, and Buffer Workspace (42E5H-43E8H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4234H ↳16948 | N1 | NEWDOS/80: If there are still bytes to read (meaning Register C did not yet hit 0), JUMP to 4234H. |
| 423BH ↳16955 | N1 | NEWDOS/80: LOOP back to 423BH, reducing Register B each time, and continue to LOOP until Register B has been reduced to ZERO, in which case, continue with the next instruction. |
| 4240H ↳16960 | N1 | NEWDOS/80: JUMP to 4240H, reducing Register B each time, and continue to LOOP until Register B has been reduced to ZERO, in which case, continue with the next instruction. |
| 424CH ↳16972 | N1 | NEWDOS/80: If the byte was GREATER THAN 1FH then we know already that there is no DOS present, so JUMP to 424CH to display the "NO SYS" error message and freeze the system. |
| 4252H ↳16978 | N1 | NEWDOS/80: GOSUB to 4252H to bump to the next byte of the RAM BUFFER and then fetch the byte into Register A. |
| 4255H ↳16981 | N1 | NEWDOS/80: If the BUFFER POINTER has just rolled over, then GOSUB to 4255H to read another sector into the RAM BUFFER. |
| 4258H ↳16984 | N1 | NEWDOS/80: LOOP back to 4258H, reducing Register B each time, and continue to LOOP until Register B has been reduced to ZERO, in which case, continue with the next instruction. |
TRSDOS 1.3 SYS0 System Workspace (4225H-42FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4265H-426CH ↳16997 ↳MIKE1 | Model III ROM, T3 | 8-byte work area |
Boot, Stack, and Buffer Workspace (42E5H-43E8H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4267H ↳16999 | N1 | NEWDOS/80: If the Carry Flag is set, then the sector number is too high! JUMP to 4267H. |
TRSDOS 1.3 SYS0 System Workspace (4225H-42FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 426DH-426EH ↳17005 ↳BASICF | Model III ROM, T3 | BASIC pointer storage (2 bytes) |
| 426FH-4270H ↳17007 ↳PROSAV | Model III ROM, T3 | BASIC protection save (2 bytes) |
| 4271H ↳17009 ↳D10SAV | Model III ROM, T3 | Drive save area for SYS10 (1 byte, initialized to 0). The caller of $DSPDIR (4419H) stores the drive here as an ASCII digit '0'-'3' (Disk BASIC's CMD"D:d" stores the character after the colon); SYS10 (4E0BH) keeps bits 1-0 as the drive number. |
| 4272H-4273H ↳17010 ↳BASIC1 | Model III ROM, T3 | BASIC general purpose save area 1 (2 bytes). TRSDOS 1.3 BASIC1: for CMD"O" Disk BASIC (DOSORT) stores the number of elements here; for CMD"J" (RETJUL) and CMD"X" (GETREF) it stores the text pointer, and SYS13 stores the text pointer after the arguments back here. |
| 4274H-4275H ↳17012 ↳BASIC2 | Model III ROM, T3 | BASIC general purpose save area 2 (2 bytes). TRSDOS 1.3 BASIC2: for CMD"O" Disk BASIC (DOSORT) stores the address of the descriptor of the first string to sort here. |
| 4276H-4277H ↳17014 ↳BASIC3 | Model III ROM, T3 | BASIC general purpose save area 3 (2 bytes) |
| 4278H-4279H ↳17016 ↳BASIC4 | Model III ROM, T3 | BASIC general purpose save area 4 (2 bytes) |
| 427AH ↳17018 ↳BASICG | Model III ROM, T3 | Flag: FFH = BASIC not running, 00H = BASIC is running |
TRSDOS 1.3 SYS0 Overlay Vectors (427BH-42ADH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 427BH ↳17019 ↳SYSS10 | Model III ROM, T3 | BASIC error handler overlay vector (DO 10,10). TRSDOS 1.3: LD A,9AH / RST 28H, which loads SYS10 and runs DOERR (4EF0H). Disk BASIC puts JP 427BH into 41A6H; the ROM's error routine calls 41A6H with E = BASIC's error code, and DOERR finds the message text in ERRTAB (4F11H) and jumps to the ROM's 1A01H with HL pointing to it. |
Boot, Stack, and Buffer Workspace (42E5H-43E8H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 427EH ↳17022 | N1 | NEWDOS/80: Load Register A with the drive number from 427EH. |
TRSDOS 1.3 SYS0 Overlay Vectors (427BH-42ADH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 427EH ↳17022 ↳SSYS12 | Model III ROM, T3 | BASIC renumber overlay vector (DO 00,12). TRSDOS 1.3 SSYS12: LD A,8CH / RST 28H, which loads SYS12 at 4E00H and runs REN (4E07H), the renumber of Disk BASIC's NAME newline,startline,increment, with HL at the text after NAME. |
Boot, Stack, and Buffer Workspace (42E5H-43E8H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4280H ↳17024 | N1 | NEWDOS/80: Point Index Register IY to 4280H, the DOS system parameter block base address. This provides quick access to drive parameters and system state through indexed addressing throughout the ATTRIB command handler. |
| 4281H ↳17025 | N1 | NEWDOS/80: If Parity Odd (odd number of bits set in result), JUMP to 4281H - ROM error handler. This detects abnormal FDC states. |
TRSDOS 1.3 SYS0 Overlay Vectors (427BH-42ADH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4281H ↳17025 ↳SYSS12 | Model III ROM, T3 | BASIC compress function overlay vector (DO 10,12). TRSDOS 1.3 SYSS12: LD A,9CH / RST 28H, which loads SYS12 and runs CMPRES (5093H) for Disk BASIC's CMD"C" with E = 2 (remarks and spaces), 1 (,R) or 0 (,S). |
Boot, Stack, and Buffer Workspace (42E5H-43E8H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4283H ↳17027 | N1 | NEWDOS/80: Load Register A with the disk name pointer from DOS parameter area 4283H. |
TRSDOS 1.3 SYS0 Overlay Vectors (427BH-42ADH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4284H ↳17028 ↳SSYS13 | Model III ROM, T3 | BASIC sort function overlay vector (DO 00,13). TRSDOS 1.3 SSYS13: LD A,8DH / RST 28H, which loads SYS13 at 4E00H and runs SORT (4E13H) for CMD"O". |
Boot, Stack, and Buffer Workspace (42E5H-43E8H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4287H ↳17031 | N1 | NEWDOS/80: If NZ FLAG (DRQ active), JUMP to 4287H - ROM routine to handle rapid data transfer. |
TRSDOS 1.3 SYS0 Overlay Vectors (427BH-42ADH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4287H ↳17031 ↳SYSS13 | Model III ROM, T3 | BASIC Julian date function overlay vector (DO 10,13). TRSDOS 1.3 SYSS13: LD A,9DH / RST 28H, which loads SYS13 and runs RETJUL (4EE3H) for CMD"J". |
Boot, Stack, and Buffer Workspace (42E5H-43E8H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4288H ↳17032 | N1 | NEWDOS/80: Store the value held in Register A (00H) into memory location 4288H. This clears a system flag or state byte. |
| 4289H ↳17033 | N1 | NEWDOS/80: Load Register Pair BC with the 16-bit value stored at memory location 4289H (low byte) and 428AH (high byte). These are DOS system flag bytes that control various operational modes. |
| 428AH ↳17034 | N1 | NEWDOS/80: If drive is READY, JUMP to 428AH. |
TRSDOS 1.3 SYS0 Overlay Vectors (427BH-42ADH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 428AH ↳17034 ↳SSSY13 | Model III ROM, T3 | BASIC cross-reference function overlay vector (DO 20,13). TRSDOS 1.3 SSSY13: LD A,ADH / RST 28H, which loads SYS13 and runs CROSS (5102H) for CMD"X". |
Boot, Stack, and Buffer Workspace (42E5H-43E8H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 428BH ↳17035 | N1 | NEWDOS/80: Load Register A with the system flags byte at 428BH. |
| 428CH ↳17036 | N1 | NEWDOS/80: Load Register A with the system flags byte from 428CH. |
| 428DH ↳17037 | N1 | NEWDOS/80: Fetch the byte stored at memory location 428DH and load it into Register A. This is the system state flags byte. |
TRSDOS 1.3 SYS0 Overlay Vectors (427BH-42ADH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 428DH ↳17037 ↳SSYS14 | Model III ROM, T3 | USER: return LFN and drive overlay vector (DO 00,14). TRSDOS 1.3 SSYS14 ($FILPTR): LD A,8EH / RST 28H, which loads SYS14 at 4E00H and runs GETLFN (4E0AH): Register Pair DE = the DCB of an open file; returns Register B = the drive and Register C = the logical file number + 1, or error 38. |
Boot, Stack, and Buffer Workspace (42E5H-43E8H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4290H ↳17040 | N1 | NEWDOS/80: Load Register A with the upper display limit from 4290H. |
TRSDOS 1.3 SYS0 Overlay Vectors (427BH-42ADH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4290H ↳17040 ↳SSSY14 | Model III ROM, T3 | USER: return directory to RAM overlay vector (DO 10,14). TRSDOS 1.3 SSSY14 ($RAMDIR): LD A,9EH / RST 28H, which loads SYS14 and runs GETDIR (4E26H): Register B = drive, Register C = 0 (every file), 1-80 (one file) or 80H-FFH (used and free granules), Register Pair HL = the RAM area. |
Boot, Stack, and Buffer Workspace (42E5H-43E8H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4291H ↳17041 | N1 | NEWDOS/80: Point DE to 4291H, the destination - active drive parameter area. |
TRSDOS 1.3 SYS0 Overlay Vectors (427BH-42ADH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4293H ↳17043 ↳SSYS15 | Model III ROM, T3 | Spare/undefined overlay vector (DO 00,15) |
Boot, Stack, and Buffer Workspace (42E5H-43E8H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4296H ↳17046 | N1 | NEWDOS/80: Load HL with 4296H - address of default drive number in system area. |
TRSDOS 1.3 SYS0 Overlay Vectors (427BH-42ADH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4296H ↳17046 ↳S1RST1 | Model III ROM, T3 | DOS re-entry overlay vector (DO 10,1) |
| 4299H ↳17049 ↳S1RST2 | Model III ROM, T3 | Command to DOS, no return (DO 30,1). HL => command string. |
| 429CH ↳17052 ↳S1RST7 | Model III ROM, T3 | Command to DOS with return (DO 70,1). HL => command string. |
| 429FH ↳17055 ↳FORMAT | Model III ROM, T3 | Disk format overlay vector (DO 20,7). TRSDOS 1.3: LD A,A7H / RST 28H, which loads SYS7 and runs its entry 2, FRMAT (5762H), the FORMAT command. |
Boot, Stack, and Buffer Workspace (42E5H-43E8H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 42A0H ↳17056 | N1 | NEWDOS/80: Fetch drive count from boot sector. |
| 42A1H ↳17057 | N1 | NEWDOS/80: Fetch step rate from boot sector. |
| 42A2H ↳17058 | N1 | NEWDOS/80: Fetch parameter from boot sector. |
TRSDOS 1.3 SYS0 Overlay Vectors (427BH-42ADH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 42A2H ↳17058 ↳BACKUP | Model III ROM, T3 | Disk backup overlay vector (DO 10,7). TRSDOS 1.3: LD A,97H / RST 28H, which loads SYS7 and runs its entry 1, BACKP (5739H), the BACKUP command. |
Boot, Stack, and Buffer Workspace (42E5H-43E8H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 42A3H ↳17059 | N1 | NEWDOS/80: Fetch parameter from boot sector. |
| 42A4H ↳17060 | N1 | NEWDOS/80: If the drive is BUSY, JUMP to 42A4H. |
| 42A5H ↳17061 | N1 | NEWDOS/80: Fetch system parameter. |
TRSDOS 1.3 SYS0 Overlay Vectors (427BH-42ADH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 42A5H ↳17061 ↳SSYS8 | Model III ROM, T3 | HELP command overlay vector (DO 10,8). TRSDOS 1.3: LD A,98H / RST 28H, which loads SYS8 and runs it from 4E00H (START), the HELP command. |
Boot, Stack, and Buffer Workspace (42E5H-43E8H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 42A6H ↳17062 | N1 | NEWDOS/80: Fetch parameter from boot sector. |
| 42A7H ↳17063 | N1 | NEWDOS/80: Fetch keyboard parameter. |
| 42A8H ↳17064 | N1 | NEWDOS/80: Fetch disk parameter. |
TRSDOS 1.3 SYS0 Overlay Vectors (427BH-42ADH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 42A8H ↳17064 ↳SSYS9 | Model III ROM, T3 | Library commands part 2 overlay vector (DO 10,9). TRSDOS 1.3: LD A,99H / RST 28H, which loads SYS9 at 5200H and runs BEGIN (5200H) with the LIBCOM number in C: COPY, DUAL, FORMS, KILL, MASTER, PATCH, RELO, ROUTE, SETCOM, WP. |
Boot, Stack, and Buffer Workspace (42E5H-43E8H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 42A9H ↳17065 | N1 | NEWDOS/80: Fetch delay value from boot sector. |
TRSDOS 1.3 SYS0 Overlay Vectors (427BH-42ADH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 42ABH ↳17067 ↳SSYS11 | Model III ROM, T3 | Library commands part 3 overlay vector (DO 10,11). TRSDOS 1.3 SSYS11: LD A,9BH / RST 28H, which loads SYS11 at 5200H; SYS1 comes here for LIST, PURGE and TAPE with the LIBCOM number in C and HL at the command line. |
TRSDOS 1.3 SYS0 System Flags and Control (42AEH-42FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 42AEH ↳17070 ↳BREAK | Model III ROM, T3 | BREAK (3 bytes): JP 4B00H (KILBRK). SYSLD sends RST 28H requests with bit 7 of A clear (the BREAK key request) here. SYS1 stores C3H (JP, BREAK key off: KILBRK returns A = 00H) while TRSDOS Ready waits for a command and C9H (RET, BREAK key active) before it runs the command typed. |
| 42B1H-42B2H ↳17073 ↳GOSAVE | Model III ROM, T3 | DO command save address (initialized to KEYBDZ). TRSDOS 1.3 SYS6: DO stores the keyboard DCB's driver address (4016H-4017H) here and GOGO3 puts it back at the end of the DO file. |
| 42B3H ↳17075 ↳DIFULT | Model III ROM, T3 | Master/default drive number (1 byte, initialized to 0). SYS9 (MASTER, 6071H) stores the DRIVE= number given, or 0 for MASTER alone. |
| 42B4H ↳17076 ↳CFLAG | Model III ROM, T3 | CFLAG (1 byte): 55H = clear user memory (5200H through MEMEND) at the next TRSDOS Ready. SYS7, SYS9 and SYS11 store 55H when they have used that memory as work space; SYS1 clears the memory and then the flag. |
| 42B5H-42B6H ↳17077 ↳INITD | Model III ROM, T3 | Flag: DOS has been initialized (2 bytes) |
Boot, Stack, and Buffer Workspace (42E5H-43E8H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 42B6H ↳17078 | N1 | NEWDOS/80: If the NZ FLAG (Not Zero) has been set, JUMP to 42B6H to skip over incrementing the track. |
TRSDOS 1.3 SYS0 System Flags and Control (42AEH-42FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 42B7H-42B9H ↳17079 ↳DTSAVE | Model III ROM, T3 | User date save area (3 bytes: year, day, month). The boot code stores the date typed at power up here and copies it to the clock bytes at 421AH-421CH. |
Boot, Stack, and Buffer Workspace (42E5H-43E8H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 42B9H ↳17081 | N1 | NEWDOS/80: If any of that stuff is true then that's a bad thing ... JUMP to 42B9H to wait for the Floppy Drive Controller to be ready, send a RESET to the FDC, and continue a countdown of retries; failing to DISK ERROR if the retry count expires. |
TRSDOS 1.3 SYS0 System Flags and Control (42AEH-42FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 42BAH ↳17082 ↳UTIL | Model III ROM, T3 | Library commands part 1 overlay vector (DO 00,6) |
| 42BDH ↳17085 ↳RETX | Model III ROM, T3 | NMI return instruction (RETN) when no disk I/O in progress |
| 42BFH ↳17087 ↳CPATCH | T3 | TRSDOS 1.3 SYS0: 50 Hz clock patch. If the clock counter at 4216H is 30 it sets it to 25, then jumps to the ROM clock routine at 3529H. For 50 Hz operation the operand of the JP at 4046H is patched to point here. |
Boot, Stack, and Buffer Workspace (42E5H-43E8H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 42C0H ↳17088 | N1 | NEWDOS/80: Load Register A with the default drive number from the DOS parameter area at 42C0H. |
| 42C3H ↳17091 | N1 | NEWDOS/80: LOOP back to the top of this routine (i.e., 42C3H) to either keep displaying message letters or be in an endless loop. |
| 42C5H ↳17093 | N1 | NEWDOS/80: Store the value held in Register A (00H) into memory location 42C5H. This clears the saved character flag used during chaining operations. |
| 42C9H ↳17097 | N1 | NEWDOS/80: Load Register Pair HL with the 16-bit value at 42C9H - the actual top of available RAM detected at boot. |
| 42CBH ↳17099 | N1 | NEWDOS/80: Load DE with 42CBH - destination in sector buffer. |
| 42CEH ↳17102 | N1 | NEWDOS/80: GOSUB to 42CEH to wait until the Floppy Disk Controller signals READY. |
| 42CEH ↳17102 ↳KILFIL | T3 | TRSDOS 1.3 SYS0: kill a file (KILL at 442CH jumps here). DE = DCB; when bit 7 of its first byte is clear the file is opened first, then SYS3 kills it (overlay request A3H). |
| 42D0H ↳17104 | N1 | NEWDOS/80: Load DE with 42D0H, the destination address in the DOS work area. |
| 42D1H ↳17105 | N1 | NEWDOS/80: If a command is in progress (and the NZ FLAG has been set as a result), JUMP BACK one instruction to 42D1H and test again. |
| 42D7H ↳17111 | N1 | NEWDOS/80: GOSUB to 42D7H for a VERY short delay to wait for the Floppy Disk Controller to be ready. |
| 42D8H ↳17112 | N1 | NEWDOS/80: Load HL with 42D8H - disk date in sector buffer. |
| 42D9H ↳17113 | N1 | NEWDOS/80: If the NZ FLAG (Not Zero) has been set, LOOP BACK to the prior instruction. |
| 42DCH ↳17116 ↳FIX1 | T3 | TRSDOS 1.3 SYS0: end a failed FDC operation (TERM); after a record not found error it sets the drive's SEKTRK entry to 0 and sends a RESTORE to the FDC. |
| 42DDH ↳17117 | N1 | NEWDOS/80: If we fall through then we have an error, so let Register Pair HL equal 42DDH to point to the message "DISK ERROR". |
| 42E0H ↳17120 | N1 | NEWDOS/80: Point HL to buffer data. |
| 42E5H-43E8H ↳17125 ↳BUFINI-3 | Model III ROM | RAM address three bytes before the start of the keyboard input buffer initialization area (BUFINI is at 43E8h, and 42E5h = 43E8h − 3 in the Model III; note the label offset refers to Model I geometry but the actual address 42E5h is used). |
| 42E8H ↳17128 ↳ENBINI / TSTACK | T1 | End-of-RAM test marker / always zero. End of Model I system variable area. |
| 42E9H ↳17129 | Both Model I and III ROM, T1 | Start of user RAM for BASIC program storage (non-DOS). |
| 42EFH ↳17135 | N1 | NEWDOS/80: Fetch DOS signature byte from boot sector. |
| 42F0H ↳17136 | N1 | NEWDOS/80: Fetch word from 42F0H. |
| 42F2H ↳17138 | N1 | NEWDOS/80: Fetch word from 42F2H. |
| 42F8H ↳17144 ↳BUFINI+20 | Model III ROM | Temporary stack pointer used during BASIC initialization, set to 42F8h (BUFINI+20 in Model III layout). This is a transient stack used only during the initialization sequence; the final stack top (STKTOP) is computed separately and stored to 40A0h. Using 42F8h places the init stack safely in the communications RAM buffer area. |
| 42F9H ↳17145 | N1 | NEWDOS/80: Fetch more boot options. |
| 42FAH ↳17146 | N1 | NEWDOS/80: Fetch system options from boot sector. |
| 42FDH ↳17149 | N1 | NEWDOS/80: Fetch another boot parameter. |
| 42FEH ↳17150 | N1 | NEWDOS/80: Fetch boot sector parameters from 42FEH. |
| 42FFH ↳17151 | N1 | NEWDOS/80: Load DE with 42FFH (disk buffer end). |
TRSDOS 1.3 SYS0 System Flags and Control (42AEH-42FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 42FFH ↳17151 ↳SCAFLG | Model III ROM, T3 | SCAFLG, the protection over ride switch (1 byte). With bit 0 set, OPEN in SYS2 skips the password check, and SYS2 clears bit 0 whenever it opens a file; SYS11 sets it. SYS1 clears the byte each time TRSDOS Ready takes a command, and SYS6 clears it too. |
Boot, Stack, and Buffer Workspace (42E5H-43E8H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4300H ↳17152 | T1, N1 | TRSDOS 2.3 DOS work area base. The DOS workspace begins immediately after the directory sector buffer and extends through 43FFH. |
TRSDOS 1.3 SYS0 Disk Buffers (4300H-4DFFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4300H-43FFH ↳17152 ↳BUFF1 | Model III ROM, T3 | First 256-byte disk I/O buffer |
| 4300H-43FFH ↳17152 ↳ENT | T3 | TRSDOS 1.3 boot sector, track 0, sector 1 of a system diskette (the source's BOOT, also known as BOOT/SYS; not a file: it is the first sector of the area the HIT's SYS0 pointer gives, and FORMAT in SYS7 writes it): the ROM loads it at 4300H and jumps there. It reads the load module from track 0, sector 2 on (drive 0, double density) into memory and jumps to its transfer address; nine failed reads of a sector show ERROR and stop. SYS7 keeps it at 5853H-5952H. |
| 4300H-4A5BH ↳17152 ↳BEGIN | T3 | TRSDOS 1.3 MEMTEST/CMD (ROM, RAM and video test): while it runs, its code (4300H-47A2H), messages (47A3H-4A4BH) and variables (4A4CH-4A5BH: TRMPOS, HLTMP 4A54H, BTEMP 4A56H, ATMP1 4A58H, ATEMP 4A59H, FLAG 4A5BH) are here, with the STACK below 4300H; the quick RAM test fills 4A5AH up to the top of RAM. |
| 4301H ↳17153 ↳ENT+1 | T3 | TRSDOS 1.3 boot sector (track 0, sector 1, run address; FORMAT in SYS7 writes it): 11H (17), the directory track: byte 1 of the boot sector, the operand of the CP 11H at 4300H (byte 0 is FEH). |
Boot, Stack, and Buffer Workspace (42E5H-43E8H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4302H ↳17154 | N1 | NEWDOS/80: Store 00H to drive 0's flags at 4302H to signal warning condition. |
| 4304H ↳17156 | T1 | TRSDOS 2.3: track cache table (4 bytes, 4304H–4307H). One byte per drive (drives 0–3), holding the track number of the most recently seeked track. Used by the Drive Select routine at 4600H to avoid redundant seeks. |
| 4308H ↳17160 | N1 | NEWDOS/80: Point HL to current drive number storage. |
| 4309H ↳17161 | N1 | NEWDOS/80: Store drive select mask (01H, 02H, 04H, or 08H depending on drive). |
| 430AH ↳17162 | T1, N1 | TRSDOS 2.3: saved FCB pointer during overlay calls (2 bytes). The SYS0 overlay loader at 4BA2H saves the current FCB pointer here before dispatching to a disk overlay, then restores it on return. |
| 430CH ↳17164 | T1, N1 | TRSDOS 2.3: saved overlay return address (2 bytes). Holds the caller's return address across RST 28H overlay calls. Restored by the overlay loader at 4BA2H after the overlay completes. |
| 430DH ↳17165 | N1 | NEWDOS/80: Point HL to 430DH, the first drive's TI field (offset +0DH from 4300H). |
| 430EH ↳17166 | T1, N1 | TRSDOS 2.3: currently loaded overlay ID (1 byte). Contains the SVC code of the overlay currently resident in the 4E00H area. Used by the overlay loader at 4BA2H to avoid reloading an already-cached overlay. |
| 430FH ↳17167 | T1, N1 | TRSDOS 2.3: system mode flags (1 byte). Bit 7 = DEBUG active; Bit 6 = TRACE active; Bit 5 = command mode; Bit 4 = SYS6 cached. Written by the DEBUG command handler at 5162H and the TRACE command handler at 5191H. |
| 4310H ↳17168 | N1 | NEWDOS/80: Fetch the desired sector number from memory location 4310H. |
| 4311H ↳17169 | N1 | NEWDOS/80: Load A with system flags from 4311H. Bits 0-1 indicate CPU speed: 00=1.77MHz, 01=2.03MHz, 10=4MHz. |
| 4312H ↳17170 | T1, N1 | TRSDOS 2.3: SYS0 vector for "return on Z or JP to nnnn" (3 bytes). A JP nnnn instruction patched by SYS0; used as the return path from certain SVC calls. Referenced from BASIC/CMD at 5D4DH. |
| 4313H ↳17171 | T1, N1 | TRSDOS 2.3: address operand of the 4312H return vector (2 bytes). Self-modified at runtime by BASIC/CMD: LD (4313H),HL stores the target jump address. |
| 4315H ↳17173 | T1 | TRSDOS 2.3: BREAK key handler opcode (1 byte). C3H (JP) when BREAK is enabled (BREAK active); 00H or NOP when disabled. Written by the BREAK command and the DEBUG toggle. Also used as the BREAK enable flag by the DOS command loop. |
| 4316H ↳17174 | T1 | TRSDOS 2.3: BREAK key handler target address (2 bytes). Contains the address of the BREAK handler routine. Patched by SYS1 at startup and by the DEBUG command when toggling break mode. |
| 4317H ↳17175 | N1 | NEWDOS/80: Point HL to the current active device code storage location at 4317H (cached last-used device). |
| 4318H-4337H ↳17176 | T1, N1 | TRSDOS 2.3: DOS command input buffer (32 bytes, 4318H–4337H). Filled by the command input routine at 4E1FH. Parsed by the command line parser/dispatcher at 4E4EH (SYS1 request code 30H). |
| 431FH ↳17183 | N1 | NEWDOS/80: Load Register A with the value at 431FH - number of granules per file or system parameter. |
| 4322H ↳17186 ↳CNT1 | T3 | TRSDOS 1.3 boot sector (track 0, sector 1, run address; FORMAT in SYS7 writes it): the backup counter (offset 22H): FFH = no limit. BACKUP lowers it on the source and writes 00H into the copy; at 00H the files with bit 5 of the attribute byte set are taken out of the copy. |
| 4335H ↳17205 ↳GETADD | T3 | TRSDOS 1.3 boot sector (track 0, sector 1, run address; FORMAT in SYS7 writes it): reads two bytes of the load module into Register Pair HL (LSB first) through GETBYT. |
| 433EH ↳17214 ↳GETBYT | T3 | TRSDOS 1.3 boot sector (track 0, sector 1, run address; FORMAT in SYS7 writes it): returns the next byte of the load module of SYS0 in Register A, keeping BC and HL; when EOFBYT (43ECH) is 00H it reads the next sector into 4D00H through BOTRED (9 tries, then ERROR and a stop at 4362H) and moves TRKSAV on (sector 18 to sector 1 of the next track). |
| 434CH ↳17228 | N1 | NEWDOS/80: DATA: Bytes FC 4C 43 - Handler address (434CH, but FC is parsed as part of flags context). |
| 4358H-43B7H ↳17240 | T1 | TRSDOS 2.3: drive parameter table (32 bytes per drive × 4 drives, 4358H–43B7H). Each 32-byte slot holds 8 bytes of drive parameters (copied from the boot sector data at 4015H), 8 bytes of drive status, and 16 bytes of FFH padding. Indexed by drive number (0–3). |
| 4359H ↳17241 | T1 | TRSDOS 2.3: system condition flags within the drive parameter table (1 byte). Bit 5 is tested during DOS READY initialization at 4E1FH. |
| 4369H ↳17257 | N1 | NEWDOS/80: Point HL to the driver/output status flags byte at 4369H (bit 6 is the "operation in progress" semaphore shared with the interrupt handler at 45F2H). |
| 436AH ↳17258 | N1 | NEWDOS/80: Point Register Pair HL to the DOS system flags byte at 436AH (part of SYSTEM storage area 4368H-4370H).Bit 7 = MINI-DOS activeBit 6 = DOS-CALL activeBit 5 = command processing stateBit 4 = additional state flag |
| 436BH ↳17259 | N1 | NEWDOS/80: Point Register Pair HL to address 436BH, a DOS system storage byte.Bit 7 = special return modeBit 6 = stack save modeBit 2 = error state |
| 436CH ↳17260 | N1 | NEWDOS/80: Load Register A with the DOS flags from 436CH. Bit 7 indicates if disk I/O is allowed. |
| 436DH ↳17261 | N1 | NEWDOS/80: Load Register A with the value from 436DH, a DOS system flag byte.Bit 5 = R command repeat flag |
| 436EH ↳17262 | N1 | NEWDOS/80: Store at 436EH - extended flags. |
| 4370H ↳17264 | N1 | NEWDOS/80: Point Register Pair HL to 4370H in the SYS0 area, which contains the disk parameter from boot sector or maximum allowed character code. |
| 4371H ↳17265 | N1 | NEWDOS/80: Point DE to drive parameter table. |
| 437FH ↳17279 ↳BOTRED | T3 | TRSDOS 1.3 boot sector (track 0, sector 1, run address; FORMAT in SYS7 writes it): reads the sector in TRKSAV of drive 0 into 4D00H-4DFFH: XSEEK, NMI vector 4049H set to JP 43B7H (BOTINT), NMI mask C0H to port E4H, Read Sector 84H, INI with the wait bit of port F4H; returns the FDC status in Register A. |
| 4380H ↳17280 | N1 | NEWDOS/80: Point Index Register IY to 4380H, the base of the DOS system data area. This provides access to drive parameter blocks and system configuration data throughout the routine. |
| 4399H ↳17305 | N1 | NEWDOS/80: Load Register HL with the contents of system buffer pointer at 4399H (SYS0 data area). This is the destination/source for the copy operation. |
| 439BH ↳17307 | N1 | NEWDOS/80: Store the current stack pointer into 439BH (DOS storage area). This saves the exact stack position so we can return to the interrupted program later. |
| 439DH ↳17309 | N1 | NEWDOS/80: Store the current Stack Pointer into 439DH. This saves the DOS-CALL entry point for later restoration. |
| 439FH ↳17311 | N1 | NEWDOS/80: Store at 439FH - max drive number. |
| 43A0H ↳17312 | N1 | NEWDOS/80: Point HL to the first system parameter at 43A0H (the drive count setting). |
| 43A1H ↳17313 | N1 | NEWDOS/80: Fetch default drive number from 43A1H (system variable). |
| 43A2H ↳17314 | N1 | NEWDOS/80: Store at 43A2H. |
| 43A4H ↳17316 | N1 | NEWDOS/80: Store 0 into 43A4H, clearing the flag that controls special memory display mode. |
| 43A7H ↳17319 | N1 | NEWDOS/80: Store the command buffer start address at 43A7H for reference by the R (recall) command. |
| 43A9H ↳17321 | N1 | NEWDOS/80: Fetch the 16-bit value stored at memory location 43A9H (high memory address pointer from SYS0) into Register Pair HL. This is the detected top of RAM. |
| 43ABH ↳17323 | N1 | NEWDOS/80: Point HL to warm boot signature location. |
| 43ACH ↳17324 | N1 | NEWDOS/80: Point DE to backup/restore area at 43ACH. |
| 43AFH ↳17327 | N1 | NEWDOS/80: Point Register Pair HL to 43AFH, which is near the start of the device driver chain storage area in the DOS system data region. |
| 43B2H ↳17330 | N1 | NEWDOS/80: Point HL to driver chain. |
| 43B7H ↳17335 ↳BOTINT | T3 | TRSDOS 1.3 boot sector (track 0, sector 1, run address; FORMAT in SYS7 writes it): the NMI at the end of a read: drops the NMI's return address, sends 00H to port E4H, reselects drive 0 and returns the FDC status to the caller of BOTRED. |
| 43B8H-43C9H ↳17336 | T1 | TRSDOS 2.3: boot sector parameter copies (18 bytes, 43B8H–43C9H). Copies of key parameters from the boot sector (track counts, sector counts, step rate) saved here by the boot continuation routine at 4E23H. |
| 43C5H ↳17349 ↳XSEEK | T3 | TRSDOS 1.3 boot sector (track 0, sector 1, run address; FORMAT in SYS7 writes it): selects drive 0 (81H to port F4H), seeks the track in TRKSAV (Seek 1CH with verify) and puts its sector into the FDC sector register (port F2H). |
| 43CCH-43FFH ↳17356 | T1 | TRSDOS 2.3: general work area (52 bytes, 43CCH–43FFH). Cleared to zero during boot initialization at 4E23H. Used as scratch space by various DOS routines. |
| 43CEH ↳17358 | N1 | NEWDOS/80: Store DE (filename hash/directory entry pointer) at 43CEH - the directory entry pointer variable. |
| 43D0H ↳17360 | N1 | NEWDOS/80: Load Register Pair DE with 43D0H - destination address for name data (primary location). |
| 43D1H ↳17361 | N1 | NEWDOS/80: Data bytes. |
| 43D8H ↳17368 | T1, N1 | TRSDOS 2.3 DOS READY entry point. The command prompt dispatcher. Enables interrupts, resets the stack to 41FCH, displays the DOS READY prompt, and enters the command input loop. Equivalent to SYS1 request code 20H. Callable from BASIC via CMD"S". |
| 43DCH ↳17372 | N1 | NEWDOS/80: Store the resolved driver address into the cache at 43DCH for future reuse. |
| 43E8H ↳17384 ↳ENBINI | Model III ROM | Start of the keyboard input buffer area (BUFINI) at 43E8h. This is the boundary address that separates the BASIC system working stack (below) from the keyboard input buffer (at and above 43E8h). The buffer pointer BUFPNT (40A7h) is set to 42E8h (three bytes above 42E5h) during init, meaning the actual usable input buffer starts below 43E8h for the Model III layout. |
| 43EAH-43EBH ↳17386 ↳TRKSAV | T3 | TRSDOS 1.3 boot sector (track 0, sector 1, run address; FORMAT in SYS7 writes it): the track (high byte) and sector (low byte) to read next, 0002H at the start. |
| 43ECH ↳17388 ↳EOFBYT | T3 | TRSDOS 1.3 boot sector (track 0, sector 1, run address; FORMAT in SYS7 writes it): the offset of the next byte in the sector buffer 4D00H; 00H = read the next sector. |
| 43EDH-43F3H ↳17389 ↳DSKERR | T3 | TRSDOS 1.3 boot sector (track 0, sector 1, run address; FORMAT in SYS7 writes it): 17H, 'ERROR', 0DH, shown when a sector of SYS0 cannot be read. |
| 43F0H ↳17392 | N1 | NEWDOS/80: Point HL to the boolean flag storage table at 43F0H. |
| 43F4H-43FBH ↳17396 ↳S1SER | T3 | TRSDOS 1.3 boot sector (track 0, sector 1, run address; FORMAT in SYS7 writes it): the serial number of the diskette, offset F4H (S1SLOC): 8 bytes of packed decimal digits (SERLTH). The boot time code of SYS0 (ST0, 4E11H) puts it into the sign on message. FORMAT writes 00H; 43FCH is a ninth 00H byte. |
| 43FDH ↳17405 ↳S1SIDE | T3 | TRSDOS 1.3 boot sector (track 0, sector 1, run address; FORMAT in SYS7 writes it): the 'SIDE' byte, offset FDH (S1LOC): 00H. |
| 43FEH ↳17406 ↳TYPES | T3 | TRSDOS 1.3 boot sector (track 0, sector 1, run address; FORMAT in SYS7 writes it): 13H, the version of the diskette (offset FEH); BACKUP refuses a source with a value below 12H. 43FFH (TRACKS) holds 28H, 40 tracks. |
TRSDOS 2.3 SVC Jump Table (4400H–4445H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4400H ↳17408 | T1, N1 | TRSDOS 2.3 SVC Jump Table entry: DOS READY (3 bytes). JP 43D8H. RST 28H SVC code dispatch entry for the DOS READY command prompt. This is also the main DOS entry point for programs returning to DOS. |
TRSDOS 1.3 SYS0 User Disk Jump Table (4400H-4456H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4400H ↳17408 ↳DELLY | Model III ROM, T3 | Long delay routine DELLY: two PUSH AF/POP AF pairs, then falls into SDELAY (4404H), which has two more pairs and RET. |
| 4404H ↳17412 ↳SDELAY | Model III ROM, T3 | Short delay routine SDELAY: two PUSH AF/POP AF pairs then RET. |
TRSDOS 2.3 SVC Jump Table (4400H–4445H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4405H ↳17413 | T1, N1 | TRSDOS 2.3 SVC Jump Table entry: Cold Boot / Initialize (3 bytes). JP 4E00H. Calls the cold boot initialization routine at 4E00H. |
| 4409H ↳17417 | T1, N1 | TRSDOS 2.3 SVC Jump Table entry: Read Sector (3 bytes). SVC code for physical disk read operations via SYS0. |
TRSDOS 1.3 SYS0 User Disk Jump Table (4400H-4456H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4409H ↳17417 ↳ERROR | Model III ROM, T3 | Error handler: PUSH AF then loads SYS4 overlay (DO 00,4) |
TRSDOS 2.3 SVC Jump Table (4400H–4445H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 440DH ↳17421 | T1, N1 | TRSDOS 2.3 SVC Jump Table entry: Write Sector (3 bytes). SVC code for physical disk write operations via SYS0. |
TRSDOS 1.3 SYS0 User Disk Jump Table (4400H-4456H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 440DH ↳17421 ↳DEBUG | Model III ROM, T3 | Debug entry: PUSH AF then loads SYS5 overlay (DO 00,5) |
TRSDOS 2.3 SVC Jump Table (4400H–4445H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4411H ↳17425 | T1, N1 | TRSDOS 2.3 SVC Jump Table entry: Memory Size Query (3 bytes). Returns DOS memory size (from 4049H) in HL. |
TRSDOS 1.3 SYS0 User Disk Jump Table (4400H-4456H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4411H-4412H ↳17425 ↳MEMEND | Model III ROM, T3 | End of user memory pointer (2 bytes, default 7FFFH) |
| 4413H ↳17427 ↳MAXDRV | Model III ROM, T3 | Highest drive number in the system (1 byte; the number of drives minus 1). Set by the SYS0 boot code; CHKDRV (4C6BH) refuses any drive number above it. |
| 4414H ↳17428 ↳FLAG1 | Model III ROM, T3 | Request code of the last system overlay loaded (1 byte; the low 4 bits are the overlay number). SYSLD (4B82H) skips the disk read when a new request names the same overlay. |
| 4415H-4416H ↳17429 ↳MEM2 | Model III ROM, T3 | Mirror of MEMEND end-of-memory pointer (2 bytes) |
| 4413H-4414H ↳17431 ↳DATA3 | Model III ROM, T3 | Start of user RAM pointer (default 5200H = SYSHI) |
| 4419H ↳17433 ↳SSYS10 | Model III ROM, T3 | BASIC directory command overlay vector (DO 00,10). TRSDOS 1.3 $DSPDIR: LD A,8AH / RST 28H, which loads SYS10 at 4E00H and runs DODIR (4E07H): with the drive as an ASCII digit in 4271H (D10SAV), it shows the name of every user file that is neither system nor invisible, NAME/EXT in four columns of 15 characters, after the heading 'DRIVE :n'; all registers are changed. Disk BASIC's CMD"D:d" calls it. SYS10 does not load Register C before its call to TRKGET (4E2EH), so the directory track is taken for the drive number the caller left in C. |
TRSDOS 2.3 SVC Jump Table (4400H–4445H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 441CH ↳17436 | T1 | TRSDOS 2.3 SVC Jump Table entry: Parse Filename into DCB (3 bytes). SVC code 4 via SYS1 request 40H: copies and validates a filename from the command line into the specified Device Control Block. |
TRSDOS 1.3 SYS0 User Disk Jump Table (4400H-4456H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 441CH ↳17436 ↳SYNTAX | Model III ROM, T3 | Filespec syntax parser overlay vector (DO 40,1) |
| 441FH ↳17439 ↳CURDOS | Model III ROM, T3 | DOS version byte: 13H indicates TRSDOS version 1.3. BASIC checks this. |
TRSDOS 2.3 SVC Jump Table (4400H–4445H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4420H ↳17440 | T1, N1 | TRSDOS 2.3 SVC Jump Table entry: Execute Program (3 bytes). Load and execute a program file. Calls SYS0 program loader at 4C06H. |
TRSDOS 1.3 SYS0 User Disk Jump Table (4400H-4456H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4420H ↳17440 ↳INIT | Model III ROM, T3 | Initialize/open new file overlay vector (DO 20,2) |
| 4423H ↳17443 ↳DRIVE | Model III ROM, T3 | Current drive select bit pattern (1 byte) |
TRSDOS 2.3 SVC Jump Table (4400H–4445H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4424H ↳17444 | T1, N1 | TRSDOS 2.3 SVC Jump Table entry: Open Existing File (3 bytes). Calls SYS2 (Open File overlay, SVC code A0H) to search the directory for a matching entry and populate the FCB. |
TRSDOS 1.3 SYS0 User Disk Jump Table (4400H-4456H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4424H ↳17444 ↳OPEN | Model III ROM, T3 | Open existing file overlay vector (DO 10,2) |
| 4427H ↳17447 ↳CURDRV | Model III ROM, T3 | Current drive number in use (1 byte, 0-3) |
TRSDOS 2.3 SVC Jump Table (4400H–4445H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4428H ↳17448 | T1, N1 | TRSDOS 2.3 SVC Jump Table entry: Close File (3 bytes). Calls SYS3 (Close File overlay, SVC code 95H) to write EOF and extent data back to the directory and deallocate unused granules. |
TRSDOS 1.3 SYS0 User Disk Jump Table (4400H-4456H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4428H ↳17448 ↳CLOSE | Model III ROM, T3 | Close a file overlay vector (DO 10,3) |
| 442BH ↳17451 ↳OVLFLG | Model III ROM, T3 | Overlay flag (1 byte). Bit 7 set = load only, which LDPGM refuses for an execute only file; EXEC (4433H) clears it first. Bit 4 shows that SYS6 is resident; SYS7 (BEGIN) and SYS8 (START, 4E04H) clear it, since they load over part of the area SYS6 uses. |
TRSDOS 2.3 SVC Jump Table (4400H–4445H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 442CH ↳17452 | T1, N1 | TRSDOS 2.3 SVC Jump Table entry: Kill File (3 bytes). Calls SYS3 (Kill File overlay, SVC code A5H) to deallocate all granules and clear the directory entry. |
TRSDOS 1.3 SYS0 User Disk Jump Table (4400H-4456H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 442CH ↳17452 ↳KILL | Model III ROM, T3 | Kill a file entry point (JP KILFIL) |
| 442FH ↳17455 ↳DULFLG | Model III ROM, T3 | DUAL flag (1 byte): 00H = off, FFH = on (set by BASIC's DUAL ON). With DUAL on, display output also goes to the printer through DUALIT (4CE1H). SYS9: DUAL (ON) stores FFH (5F47H), DUAL (OFF) 00H (5F77H); DUAL refuses to start while the byte is 80H, the value the ROUTE code of SYS9 would store (5BE7H, never reached). |
| 4430H ↳17456 ↳LDPGM | Model III ROM, T3 | Load program into RAM entry point (JP LDPGM1) |
Disk BASIC Entry Points / Driver Vector Table (4152H–41E4H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4433H ↳17459 ↳EXEC | T3 | TRSDOS 1.3: EXEC (JP 4BD9H, EXPGM1): load the program named in the DCB at DE and jump to its transfer address; a load error goes to the error routine at 4409H. SYS1 (CALCOM) jumps here with a command that is not in its library table, after adding the extension CMD, with HL pointing at the rest of the command line. |
TRSDOS 1.3 SYS0 User Disk Jump Table (4400H-4456H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4433H ↳17459 ↳EXEC | Model III ROM, T3 | Load and execute program entry point (JP EXPGM1) |
TRSDOS 2.3 SVC Jump Table (4400H–4445H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4436H ↳17462 | T1, N1 | TRSDOS 2.3 SVC Jump Table entry: Seek / Position to Record (3 bytes). Calls SYS0 Position to Record routine at 4737H. |
TRSDOS 1.3 SYS0 User Disk Jump Table (4400H-4456H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4436H ↳17462 ↳READ | Model III ROM, T3 | Read a record entry point (JP READ1) |
TRSDOS 2.3 SVC Jump Table (4400H–4445H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4437H ↳17463 | T1 | TRSDOS 2.3 SVC Jump Table entry: Read Record (3 bytes). JP 476DH. Reads one logical record from the current file position. |
| 4439H ↳17465 | T1, N1 | TRSDOS 2.3 SVC Jump Table entry: Write Record (3 bytes). Calls SYS0 Write Record routine at 478BH. |
TRSDOS 1.3 SYS0 User Disk Jump Table (4400H-4456H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4439H ↳17465 ↳WRITE | Model III ROM, T3 | Write without verify entry point (JP WRITE1) |
| 443CH ↳17468 ↳VERF | Model III ROM, T3 | Write with verify entry point (JP WRITE1) |
| 443FH ↳17471 ↳REWIND | Model III ROM, T3 | Rewind file to beginning entry point (JP REW) |
TRSDOS 2.3 SVC Jump Table (4400H–4445H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4442H ↳17474 | T1 | TRSDOS 2.3 SVC Jump Table entry: Rewind File (3 bytes). Calls SYS0 Rewind File routine at 4756H to reset the file position to BOF. |
TRSDOS 1.3 SYS0 User Disk Jump Table (4400H-4456H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4442H ↳17474 ↳POSN | Model III ROM, T3 | Position file to record N entry point (JP POSN1) |
TRSDOS 2.3 SVC Jump Table (4400H–4445H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4445H ↳17477 | T1, N1 | TRSDOS 2.3 SVC Jump Table entry: Open/Create and Load (3 bytes). Opens an existing file or creates a new one with initial granule allocation; then loads the program. Calls SYS2 request 30H at 4F50H. |
TRSDOS 1.3 SYS0 User Disk Jump Table (4400H-4456H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4445H ↳17477 ↳BACKSP | Model III ROM, T3 | Backspace one record entry point (JP BKSP) |
| 4448H ↳17480 ↳POSEOF | Model III ROM, T3 | Position to end of file entry point (JP PEOF) |
| 444BH ↳17483 ↳PUTEXT | Model III ROM, T3 | Add extension to filespec overlay vector (DO 50,1) |
| 444EH ↳17486 ↳MULT | Model III ROM, T3 | 16-bit unsigned multiply entry point (JP DMULT) |
| 4451H ↳17489 ↳DIV | Model III ROM, T3 | 16-bit unsigned divide entry point (JP DIVIDE) |
| 4454H ↳17492 ↳SWITCH | Model III ROM, T3 | Table comparison/switch routine overlay vector (DO 60,1) |
TRSDOS 1.3 SYS0 System DCB and Saves (4457H-44ACH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4453H-4456H ↳17495 ↳DIRTRK | Model III ROM, T3 | Directory track number table (4 bytes, one per drive, all initialized to 17) |
| 4457H-445EH ↳17499 ↳SEKTRK | Model III ROM, T3 | Last-track-used table (8 bytes: 4 drives x 2 sides, all initialized to 0) |
| 4463H ↳17507 ↳CSIDE | Model III ROM, T3 | Current disk side to read/write from/to (1 byte, 0 or 1). Defined in SYS0 at 4463H and referenced across overlays: SYS3 (CLOSE/KILL) writes it before every GAT read/write, directory read/write, and HIT read/write to ensure the correct side is selected; SYS5 (DEBUG monitor) clears it to 0 via the QUIT command before returning to DOS. |
| 4464H ↳17508 ↳OLDSID | Model III ROM, T3 | Previous side used (0 or 1) |
Disk BASIC Entry Points / Driver Vector Table (4152H–41E4H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4465H ↳17509 ↳DCB | T3 | TRSDOS 1.3: DCB, the system DCB (50 bytes). SYS1 (CALCOM) builds the command name typed at TRSDOS Ready here with FSPEC before it looks the name up in LIBCOM or loads the program. |
TRSDOS 1.3 SYS0 System DCB and Saves (4457H-44ACH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4461H-4496H ↳17509 ↳DCB | Model III ROM, T3 | System DCB (50 bytes). Initialized to 'FILENAME/EXT.PASSWORD:D' template. |
TRSDOS 2.3 SVC Jump Table (4400H–4445H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4467H ↳17511 | T1, N1 | DOS string output dispatch entry point. Called with HL pointing to a string terminated by 0DH (CR) or 03H (ETX).
|
TRSDOS 2.3 Overlay and SYS1 Work Area (44A1H–5026H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4480H-449FH ↳17536 | T1, N1 | TRSDOS 2.3 SYS1: parsed filespec buffer (32 bytes, 4480H–449FH). Populated by the filespec parser at 4F56H (SYS1 request code 50H). Holds the structured NAME/EXT.PASSWORD:DRIVE filespec after parsing. |
TRSDOS 1.3 SYS0 System DCB and Saves (4457H-44ACH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4497H ↳17559 ↳MDCB | Model III ROM, T3 | Internal system files DCB start (MTYPE byte, initialized to 80H=disk type) |
| 4497H ↳17559 ↳MTYPE | T3 | Internal (system files) DCB device-type byte (1 byte, initialized to 80H = disk type). |
| 4498H ↳17560 ↳MPROT | T3 | Internal system DCB protection level and status bits (1 byte). |
| 449AH-449BH ↳17562 ↳MBUFF | Model III ROM, T3 | System DCB buffer pointer (initialized to BUFF2=4D00H) |
| 449CH ↳17564 ↳MOFF | T3 | Internal system DCB byte offset inside sector (1 byte). |
| 449DH ↳17565 ↳MDRV | T3 | Internal system DCB drive number (1 byte). |
| 449EH ↳17566 ↳MLFN | T3 | Internal system DCB logical file number (1 byte). |
| 449FH ↳17567 ↳MEOF | T3 | Internal system DCB end-of-file byte (1 byte). |
| 44A0H ↳17568 ↳MLRL | T3 | Internal system DCB logical record length (1 byte, 0 = 256). |
TRSDOS 2.3 Overlay and SYS1 Work Area (44A1H–5026H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 44A1H ↳17569 | T1, N1 | TRSDOS 2.3: overlay execution state flag (1 byte). Indicates whether an overlay is currently executing. Tested by the overlay loader at 4BA2H before loading a new overlay. |
TRSDOS 1.3 SYS0 System DCB and Saves (4457H-44ACH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 44A1H ↳17569 ↳MNRN | T3 | Internal system DCB next record number (2 bytes). |
| 44A3H ↳17571 ↳MERN | T3 | Internal system DCB ending record number (2 bytes, initialized to -1 = FFFFH). |
| 44A5H ↳17573 ↳MSIDE | T3 | Internal system DCB side number (1 byte). |
| 44A6H ↳17574 ↳MSPAR | T3 | Internal system DCB spare byte (1 byte). |
TRSDOS 2.3 Overlay and SYS1 Work Area (44A1H–5026H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 44A7H ↳17575 | T1, N1 | TRSDOS 2.3: overlay directory entry info byte (1 byte). Holds directory entry metadata for the currently cached overlay file. Used by the overlay loader to identify the active overlay. |
TRSDOS 1.3 SYS0 System DCB and Saves (4457H-44ACH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 44A7H ↳17575 ↳MEXT | T3 | Internal system DCB segment descriptors start (2 bytes). |
| 44A9H-44AAH ↳17577 ↳SAVE2 | Model III ROM, T3 | Temporary storage: caller return address for SAVER routine |
TRSDOS 2.3 Overlay and SYS1 Work Area (44A1H–5026H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 44AAH-44ABH ↳17578 | T1 | TRSDOS 2.3: overlay cache markers (2 bytes, 44AAH–44ABH). Set to 0000H when the overlay cache is invalidated. Compared by the overlay loader at 4BA2H to avoid reloading. |
TRSDOS 1.3 SYS0 System DCB and Saves (4457H-44ACH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 44ABH-44ACH ↳17579 ↳SAVE3 | Model III ROM, T3 | Temporary storage: DCB pointer for SAVER routine |
| 44ADH ↳17581 ↳CIO0 | T3 | TRSDOS 1.3 SYS0: disk character I/O linkage entered from ROMCIO (4033H). A DCB of type 10H routes to another DCB, a type above 10H is a disk file (byte I/O through WRBYTE and RDBYTE), a lower type jumps to the driver. |
TRSDOS 2.3 Overlay and SYS1 Work Area (44A1H–5026H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 44AEH-44AFH ↳17582 | T1, N1 | TRSDOS 2.3: overlay starting sector address on disk (2 bytes, 44AEH–44AFH). Set when the overlay directory entry is located; used by the overlay loader to read the overlay file from disk. |
| 44D4H ↳17620 ↳DSEL | T3 | TRSDOS 1.3 SYS0: select drive C. Builds the drive select byte (drive bit plus 80H for double density), stores it in DRIVE (4423H) and sends it to port F4H. |
| 44DDH ↳17629 ↳DSELCT | T3 | TRSDOS 1.3 SYS0: send the drive select byte in DRIVE (4423H) to port F4H. |
| 44E3H ↳17635 ↳SEEK | T3 | TRSDOS 1.3 SYS0: seek track D on drive C. Adds write precompensation from track 22 up, uses SEKTRK (445BH) as the head position, restores to track 0 after a seek error and records the track reached. Returns the FDC status, or 0CH (time out). |
| 4547H ↳17735 ↳CHKBSY | T3 | TRSDOS 1.3 SYS0: wait until the FDC is not busy, reselecting the drive while waiting. Returns NZ with 0CH (time out on disk drive) when it gives up. |
| 4566H ↳17766 ↳TERM | T3 | TRSDOS 1.3 SYS0: send the Force Interrupt command (D0H) to the FDC, keeping AF. |
| 456DH ↳17773 ↳WRITIT | T3 | TRSDOS 1.3 SYS0: low level sector write. Sends the write command held at DATMRK (4583H) and writes the buffer whose address is stored at WHL (4580H) until the FDC interrupts. |
| 4580H ↳17792 ↳WHL | T3 | TRSDOS 1.3 SYS0: self modified operand (2 bytes) of LD HL at 457FH: the buffer address for WRITIT, stored by XWRITE at 4600H. |
| 4583H ↳17795 ↳DATMRK | T3 | TRSDOS 1.3 SYS0: self modified operand (1 byte) of LD A at 4582H: the FDC write command, A5H. Bit 0 is cleared for writes to track 17 (the directory) and set back by WRTEXT (4667H). |
| 459CH ↳17820 ↳BOTNMI | T3 | TRSDOS 1.3 SYS0: point the NMI vector (4049H) at BORNMI (45ADH) as JP 45ADH, clear any pending FDC interrupt and return with interrupts disabled. |
| 45ADH ↳17837 ↳BORNMI | T3 | TRSDOS 1.3 SYS0: NMI handler for disk I/O: masks the disk NMIs (port E4H), points the NMI vector back at RETX (42BDH) and clears the FDC interrupt. |
TRSDOS 1.3 SYS0 System DCB and Saves (4457H-44ACH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 45B8H ↳17848 ↳READIT | T3 | TRSDOS 1.3 SYS0 resident: READIT, the low level sector read. Selects the drive, points the NMI at BORNMI, sends the read command (84H) to the FDC and reads the sector into the buffer address stored at RHL (45C9H) until the FDC interrupts. Called by XREAD (4675H), which does the seek and the retries. |
| 45C9H ↳17865 ↳RHL | T3 | TRSDOS 1.3 SYS0: self modified operand (2 bytes) of LD HL at 45C8H: the buffer address for READIT, stored by XREAD at 4675H. |
| 45E9H ↳17897 ↳SITIT | T3 | TRSDOS 1.3 SYS0: turn a number 0-7 in A into a byte with only that bit set (it builds a SET n,A instruction at 45F4H). Used for drive select bits and GAT gran bits. |
| 45F7H ↳17911 ↳XWRITE | T3 | TRSDOS 1.3 SYS0 resident: XWRITE, write a sector. On entry D = track, E = sector, C = drive, HL = buffer. Refuses the user write protect drive (WPD, 45F8H) and write protected diskettes (error 15), seeks, writes the directory track (17) with the other data address mark, and retries up to 9 times (TRY2, 460AH). Used by the overlays for directory, GAT and HIT writes. |
| 45F8H ↳17912 ↳WPD | T3 | TRSDOS 1.3 SYS0: self modified operand (1 byte) of LD A at 45F7H: the number of a drive XWRITE treats as write protected; FFH (none) at load. SYS9 (WP, 600CH) stores the DRIVE= number given, or FFH for WP alone. |
| 460AH ↳17930 ↳TRY2 | T3 | TRSDOS 1.3 SYS0: self modified operand (1 byte) of LD B at 4609H: the write retry count, 9 at load. SYS7 (FORMAT and BACKUP) lowers it to 2 at BEGIN (57B3H); its RESTRY (4E41H) puts 9 back. |
| 4672H ↳18034 ↳DVER | T3 | TRSDOS 1.3 SYS0: verify read: reads sector E of track D on drive C into the ROM address space, so only the CRC and error status are checked. |
| 4675H ↳18037 ↳XREAD | T3 | TRSDOS 1.3 SYS0: read sector E of track D on drive C into HL with up to 9 retries (TRY1, 467DH). Returns Z, or NZ with error 1 (CRC), 3 (lost data), 4 (seek), 5 (sector not found), 6 (hardware fault) or 12 (time out). Stores the FDC status in SAVSTA (4B12H). |
| 467DH ↳18045 ↳TRY1 | T3 | TRSDOS 1.3 SYS0: self modified operand (1 byte) of LD B at 467CH: the read retry count, 9 at load. SYS7 (FORMAT and BACKUP) lowers it to 2 at BEGIN (57B0H); its RESTRY (4E41H) puts 9 back. |
| 4776H ↳18294 ↳INCREC | T3 | TRSDOS 1.3 SYS0: add 1 to the next record number (DCB offsets 0AH-0BH) of the DCB at IX and return Z. |
| 4868H ↳18536 ↳DBLOCK | T3 | TRSDOS 1.3 SYS0: write out the DCB's buffer when it holds unwritten data (bit 4 of DCB offset 01H) or the record number is to be advanced (bit 6). |
| 4872H ↳18546 ↳CALCBA | T3 | TRSDOS 1.3 SYS0: DE = the DCB buffer address plus the byte offset (DCB offset 05H); C = the offset. |
| 4881H ↳18561 ↳SAVER | T3 | TRSDOS 1.3 SYS0: start of every file I/O routine. Checks that the DCB at DE is open (error 38 if not), saves the caller's return address (SAVE2) and the DCB address (SAVE3), puts the DCB address in IX and saves HL, DE, BC, IX and IY for the common exit RET6 (489FH). |
| 4885H ↳18565 ↳SAVERN | T3 | TRSDOS 1.3 SYS0: SAVER without the open check. |
| 49D4H ↳18900 ↳GETPDA | T3 | TRSDOS 1.3 SYS0: find the physical address of the next record of the DCB at IX: D = track, E = sector (from 1), C = drive. Returns error 29 when the record is beyond the space allocated to the file. |
| 4A2EH ↳18990 ↳GETPRN | T3 | TRSDOS 1.3 SYS0: compare the next record and byte offset of the DCB at IX with its end of file. Returns error 28 when past the end; HL = the next record number and C = the offset. |
| 4A67H ↳19047 ↳RDDIR | T3 | TRSDOS 1.3 SYS0 resident: RDDIR, read the directory sector that holds the record of logical file number B on drive C into BUFF1 (4300H); HL returns pointing at the 48 byte record. Returns Z on success, error 17 (directory read error) on failure. |
| 4A7BH ↳19067 ↳WRDIR | T3 | TRSDOS 1.3 SYS0 resident: Write Directory sector. On entry, Register C holds the drive number. Writes the current directory sector from BUFF1 at 4300H back to disk. Returns Z on success, NZ with error code on failure. |
| 4A93H ↳19091 ↳RDGAT | T3 | TRSDOS 1.3 SYS0 resident: RDGAT, read the Granule Allocation Table (sector 1 of the directory track) of drive C into BUFF2 at 4D00H. Returns Z on success, NZ with the error code on failure. |
| 4A9BH ↳19099 ↳WRGAT | T3 | TRSDOS 1.3 SYS0 resident: Write Granule Allocation Table. On entry, Register C holds the drive number. Writes the GAT from BUFF2 at 4D00H back to disk. Returns Z on success, NZ with error code on failure. |
| 4ABAH ↳19130 ↳RDHIT | T3 | TRSDOS 1.3 SYS0 resident: RDHIT, read the Hash Index Table (sector 2 of the directory track) of drive C into BUFF1 at 4300H. Returns Z on success, NZ with the error code on failure. |
TRSDOS 2.3 Close/Kill Overlay – SYS3 (4E00H–50FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4ABEH ↳19134 | T1 | TRSDOS 2.3 SYS0/SYS2: directory entry info byte (1 byte). Set by the Decode Directory Entry routine at 4B1EH during directory searches. Encodes the directory sector number and entry position within the sector. |
TRSDOS 1.3 SYS0 System DCB and Saves (4457H-44ACH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4AC2H ↳19138 ↳WRHIT | T3 | TRSDOS 1.3 SYS0 resident: Write Hash Index Table. On entry, Register C holds the drive number. Writes the HIT from BUFF1 at 4300H back to disk. Returns Z on success, NZ with error code on failure. |
| 4AD8H ↳19160 ↳LFNDIR | T3 | TRSDOS 1.3 SYS0: for logical file number B on drive C, find the directory sector (E, from sector 3, five 48 byte records per sector) and the record's address in BUFF1 (HL). Error 16 for a number of 80 or more. |
| 4B00H ↳19200 ↳KILBRK | T3 | TRSDOS 1.3 SYS0: XOR A then RET (RETBRK at 4B01H). The BREAK vector at 42AEH jumps here, so a BREAK request returns A = 00H and is ignored. |
| 4B0DH ↳19213 ↳SREAD | T3 | TRSDOS 1.3 SYS0 resident: SREAD, read sector E of track D on drive C into HL through XREAD. When the sector's data address mark shows the directory is not on the track in DIRTRK (4457H), it reads the boot sector, takes the directory track from its second byte, stores it in DIRTRK and reads again (error 13 for a disk that is not a system disk). |
| 4B12H ↳19218 ↳SAVSTA | T3 | TRSDOS 1.3 SYS0: self modified operand (1 byte) of LD A at 4B11H: the FDC status of the last sector read, stored by XREAD at 469AH and tested by SREAD. |
| 4B3EH ↳19262 ↳TRKGET | T3 | TRSDOS 1.3 SYS0 resident: Get Directory Track for the drive in Register C. Returns the directory track number in Register D. Used by SYS6 S6PROT and S6FREE to locate the directory on the target disk. |
| 4B48H ↳19272 ↳BYTBI0 | T3 | TRSDOS 1.3 SYS0: test bit A (0-7) of B by building a BIT n,B instruction at 4B52H. Z = the bit is clear (the gran is free). |
| 4B55H ↳19285 ↳DMULT | T3 | TRSDOS 1.3 SYS0: multiply HL by A (MULT at 444EH). Returns the 24 bit product as HL = high 16 bits and A = low 8 bits. |
| 4B6FH ↳19311 ↳DIVIDE | T3 | TRSDOS 1.3 SYS0: divide HL by A (DIV at 4451H). Returns HL = quotient and A = remainder. |
| 4B82H ↳19330 ↳SYSLD | T3 | TRSDOS 1.3 SYS0: the RST 28H overlay loader. A request with bit 7 of A clear goes to the BREAK vector (42AEH). Otherwise the low 4 bits name the SYS overlay: unless it is already resident (FLAG1, 4414H) it is found in the HIT system entries (offset E0H) and loaded through the system DCB (4497H), then entered at its transfer address with A = the request code. The RST 28H return address is dropped. |
| 4BD9H ↳19417 ↳EXPGM1 | T3 | TRSDOS 1.3 SYS0: load and run a program (EXEC at 4433H jumps here): clears OVLFLG, loads the file through LDPGM1 and jumps to its transfer address. |
| 4BE6H ↳19430 ↳LDPGM1 | T3 | TRSDOS 1.3 SYS0: load a program (LDPGM at 4430H jumps here). Opens the file with BUFF2 (4D00H) as its buffer and reads load file records: 01H loads a block (each byte checked, error 35 if RAM does not take it), 02H returns the transfer address in HL, 03H returns to TRSDOS READY, other types below 20H are skipped and 20H or above gives error 34. |
| 4C6BH ↳19563 ↳CHKDRV | T3 | TRSDOS 1.3 SYS0: check drive C before a read or write: error 2 when it is above MAXDRV (4413H); starts the motor and waits when the drive was not ready; for a drive other than the last one used, watches for an index pulse (error 8 if none). Returns Z with the C flag set for a write protected diskette. |
| 4CE1H ↳19681 ↳DUALIT | T3 | TRSDOS 1.3 SYS0: DUAL output: sends the character in C to the display through the video DCB (401DH) and, when it is 0DH or a printable character, to the printer DCB (4025H). SYS9 (DUAL (ON), 5F4AH-5F5CH) saves the display and printer driver addresses (401EH, 4026H) into the CALL operands 4CE7H and 4CF8H and puts 4CE1H into both DCBs; DUAL (OFF) puts the saved addresses back. |
| 4CE7H-4CE8H ↳19687 ↳DDVER1 | T3 | TRSDOS 1.3 SYS0: self modified operand of CALL 0473H at 4CE6H in DUALIT: the display driver DUALIT calls. SYS9's DUAL (ON) stores the display DCB's driver address (401EH) here; DUAL (OFF) puts it back into 401EH. |
| 4CF8H-4CF9H ↳19704 ↳DDVER2 | T3 | TRSDOS 1.3 SYS0: self modified operand of CALL 03C2H at 4CF7H in DUALIT: the printer driver DUALIT calls. SYS9's DUAL (ON) stores the printer DCB's driver address (4026H) here; DUAL (OFF) puts it back into 4026H. |
TRSDOS 1.3 Error Handler Overlay – SYS4 (4E00H–50E6H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4CFDH ↳19709 ↳DOFLAG | T3 | TRSDOS 1.3 SYS4: DO-file active flag (1 byte). Non-zero when a DO (chaining) file is currently executing; zero when no DO file is active. On entry to SYS4, if DOFLAG is non-zero the error handler clears it, masks bit 7 of the error code (forcing a return-to-DOS), restores the keyboard driver vector from GOSAVE, and resets MEMEND from MEM2 before falling through to the normal error-display logic. SYS6: DO sets it to FFH and the DO keyboard routine (GOGO3) clears it at the end of the file; CLEAR without options refuses to run while it is set; PAUSE and the DIR hold key read the keys directly while it is set. |
| 4CFEH ↳19710 ↳MIKE | T3 | TRSDOS 1.3 SYS0: pointer (2 bytes) to MIKE1, the 8 byte work area at 4265H. |
TRSDOS 2.3 Overlay and SYS1 Work Area (44A1H–5026H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4D00H-4DFFH ↳19712 | T1, N1 | TRSDOS 2.3: overlay load buffer / secondary sector buffer (256 bytes, 4D00H–4DFFH). Used by the overlay loader at 4BA2H to stage overlay data during loading, and by various SYS routines for secondary directory sector reads. |
TRSDOS 1.3 SYS0 Disk Buffers (4300H-4DFFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4D00H-4DFFH ↳19712 ↳BUFF2 | Model III ROM, T3 | Second 256-byte disk I/O buffer (used by system/MDCB) |
| 4D00H ↳19712 ↳NOSYS | T3 | TRSDOS 1.3 SYS7, the load module it writes to track 0, sector 2 of a new diskette: loaded at 4D00H by the boot sector, it shows 'Not a SYSTEM Disk' and stops. SYS7 keeps it at 5957H. |
TRSDOS 2.3 Overlay and SYS1 Work Area (44A1H–5026H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4E00H ↳19968 | T1 | TRSDOS 2.3: overlay load address — resident overlay area base (512+ bytes). SYS1, SYS2, SYS3, SYS4, SYS5, and SYS6 all load here when invoked via RST 28H. Also the cold boot entry point: JP 4E00H from the SVC table at 4405H triggers the DOS initialization routine. |
| 4E00H ↳19968 ↳S1ENTY | T3 | TRSDOS 1.3 SYS1 (loaded at 4E00H): entry point. Register A = the request code; entry 1 (91H) CMDRDY, 2 (A1H) CMDABT, 3 (B1H) CMDLIN, 4 (C1H) FSPEC, 5 (D1H) FEXT, 6 (E1H) PARAM, 7 (F1H) CALCOM. |
| 4E00H ↳19968 ↳START | T3 | TRSDOS 1.3 SYS2 (loaded at 4E00H): entry point. Register A = the request code; entry 1 (92H, the OPEN vector at 4424H) S2OPEN, entry 2 (A2H, the INIT vector at 4420H) S2INIT, entry 4 (C2H) SETTDC; any other entry returns. |
| 4E00H ↳19968 ↳S3ENTY | T3 | TRSDOS 1.3 SYS3 (loaded at 4E00H): entry point. Register A = the request code; entry 1 (93H, the CLOSE vector at 4428H) SCLOSE, entry 2 (A3H, from KILFIL at 42CEH) SKILL; any other entry returns error 38. |
| 4E00H ↳19968 ↳START | T3 | TRSDOS 1.3 SYS4 (loaded at 4E00H), the error message overlay, entered from ERROR (4409H: PUSH AF / LD A,84H / RST 28H) with the error code on the STACK: bits 5-0 the error number, bit 6 set for the full text, bit 7 set to return to the program. A running DO file is stopped first (DOFLAG, GOSAVE, MEM2 to MEMEND). |
| 4E00H ↳19968 ↳START | T3 | TRSDOS 1.3 SYS5 (DEBUG): loaded at 4E00H. START saves all the registers at MEM+8 (4108H), puts back the bytes under the breakpoints, then shows the registers and memory and takes commands (START5, 4E51H): J or G go, S full page, X half page, ; and - move the display, C and I single step, D display address, M change memory, R change a register, U update display, F disk utility, Q return to TRSDOS. |
| 4E00H ↳19968 ↳FATAL | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): loaded at 4E00H-5D71H, entry BEGIN (57A1H). FATAL (4E00H) is the error exit, A = the error code: when the backup counter of the source was at 0 (CXFLAG) it writes 4100H-41FFH to the boot sector of the source, then clears 5E00H-5EFFH, puts the retry counts back and jumps to ERROR (4409H) with bit 6 of the code set. |
| 4E00H ↳19968 ↳START | T3 | TRSDOS 1.3 SYS8 (HELP): loaded at 4E00H-5F84H, entry START (4E00H, for every request). HL = the command line after HELP. START clears bit 4 of OVLFLG (442BH, SYS6 is no longer resident) and falls into HELP. |
| 4E00H ↳19968 ↳START | T3 | TRSDOS 1.3 SYS10 (directory for BASIC, BASIC error messages): loaded at 4E00H-51D1H (978 bytes). START masks the request code in A to bits 7-4: 90H (request 9AH from SYSS10, 427BH) goes to DOERR (4EF0H), 80H (request 8AH from $DSPDIR, 4419H) falls into DODIR. |
| 4E00H ↳19968 ↳START | T3 | TRSDOS 1.3 SYS12 (BASIC NAME and CMD"C"): loaded at 4E00H-51ADH (942 bytes). START keeps bits 7-4 of the request code: 80H (SSYS12, 427EH) falls into REN (NAME), 90H (SYSS12, 4281H) goes to CMPRES (CMD"C"). |
| 4E00H ↳19968 ↳START | T3 | TRSDOS 1.3 SYS13 (BASIC CMD"O", CMD"J" and CMD"X"): loaded at 4E00H-4ED4H and 4EE3H-51D1H (964 bytes). START keeps bits 7-4 of the request code: 80H (SSYS13, 4284H) goes to SORT, 90H (SYSS13, 4287H) to RETJUL, A0H (SSSY13, 428AH) to CROSS; anything else gives the FC error. |
| 4E00H ↳19968 ↳START | T3 | TRSDOS 1.3 SYS14 ($FILPTR and $RAMDIR): loaded at 4E00H-4FACH (429 bytes). START keeps bits 7-4 of the request code: 80H (SSYS14, 428DH) goes to GETLFN, 90H (SSSY14, 4290H) to GETDIR; any other code RETurns NZ. |
| 4E07H ↳19975 ↳HELP | T3 | TRSDOS 1.3 SYS8 (HELP): skip the spaces after HELP; 0DH (nothing typed) shows the list (HLPFLT), anything else is looked up in HLPTAB (HELP6, 4E45H); a match shows its text (HELP9, 4E68H) and RETurns. |
| 4E07H ↳19975 ↳DODIR | T3 | TRSDOS 1.3 SYS10 (directory for BASIC, BASIC error messages): $DSPDIR: clears OVLFLG (442BH), takes bits 1-0 of D10SAV (4271H) as the drive, clears the screen, turns the cursor on and gives error 2 (with bits 6 and 7 set, through ERROR 4409H) for a drive above MAXDRV (4413H). |
| 4E07H ↳19975 ↳REN | T3 | TRSDOS 1.3 SYS12 (BASIC NAME and CMD"C"): NAME newline,startline,increment (10, 0, 10 when left out): checks the arguments (FC error for an increment of 0, a new number above 65529, or new numbers that would come before lines kept), turns the references into 0EH constants (LINSCN 4F97H) and pointers (SCCLIN 4EA5H), stores the new line numbers and turns the pointers back into ASCII numbers (SCCPTR 4EA6H); ends at the ROM's STPRDY (1A18H). |
| 4E0AH ↳19978 ↳GETLFN | T3 | TRSDOS 1.3 SYS14 ($FILPTR and $RAMDIR): $FILPTR: with Register Pair DE at the DCB, returns Z, Register B = DRVNUM (DCB+06H) and Register C = LFN (DCB+07H) + 1, or NZ with error 38 when bit 7 of DCB+00H is clear. |
| 4E0EH ↳19982 ↳HLPFLT | T3 | TRSDOS 1.3 SYS8 (HELP): show 'Help is avaliable for the following:' (4F90H) and the 39 names of HLPTAB in columns, then RETurn. Also reached when the name typed is not in HLPTAB. |
| 4E0FH ↳19983 ↳SCLOSE | T3 | TRSDOS 1.3 SYS3: close the file of the DCB at DE. Writes out the buffer (DBLOCK); for a file that was written, puts its EOF, LRL, ERN and extents into the directory record and releases the grans beyond the end of file in the GAT; then RESET puts NAME/EXT:D back into the DCB. Returns Z, or NZ with the error code. |
| 4E12H ↳19986 ↳S2OPEN | T3 | TRSDOS 1.3 SYS2: open an existing file (OPEN, 4424H). DE = DCB holding the filespec, B = logical record length (0 = 256), HL = buffer. Finds the file through the HIT on the drive given or on every drive, checks the passwords and builds the DCB. Returns Z, or NZ with A = 24 (file not found), 25 (access denied), 2 (drive not in system) or 19 (bad file name). REOPEN is the same address. |
| 4E13H ↳19987 ↳SORT | T3 | TRSDOS 1.3 SYS13 (BASIC CMD"O", CMD"J" and CMD"X"): CMD"O": Shell sort of BASIC1 string descriptors (3 bytes each) from the one at BASIC2; the gap starts at half the count and is halved each pass; strings compare byte by byte up to the shorter length, and the shorter comes first when they are equal that far. |
| 4E15H ↳19989 ↳OPENR | T3 | TRSDOS 1.3 SYS2: the body of OPEN after SAVERN; S2INIT calls it before it creates a file. |
| 4E25H ↳20005 ↳CMDABT | T3 | TRSDOS 1.3 SYS1: abort (SYS1 entry 2, ABORT at 4030H): SP = 409FH, display Operation Aborted, then fall into CMDRDY. |
| 4E26H ↳20006 ↳GETDIR | T3 | TRSDOS 1.3 SYS14 ($FILPTR and $RAMDIR): $RAMDIR: checks the drive against MAXDRV (error 2), puts '++' into the RAM area, then switch 0 goes to DIRALL (4E5CH, every file in the HIT that is not a system file), 80H-FFH to GETFRE (4EA0H, 4 bytes: used and free granules) and 1-81 to SETIT (4EE3H, one file; 82-127 give error 16). |
| 4E2AH ↳20010 ↳DIRLOP | T3 | TRSDOS 1.3 SYS10 (directory for BASIC, BASIC error messages): gets the directory track through TRKGET (4B3EH) into SAVTRK (4E56H) and shows 'DRIVE :n'. Register C is not loaded before the call (the source has LD C,A there). |
| 4E2EH ↳20014 ↳CMDRDY | T3 | TRSDOS 1.3 SYS1: TRSDOS Ready (SYS1 entry 1, SYS1IN at 402DH): clears the command buffer COMAND, resets the cassette BREAK vector and the BREAK vector, clears user memory when CFLAG is 55H, clears SCRLCT, CFLAG and SCAFLG, sets BASICG to FFH, reads a command line through the ROM at 0040H and runs it. |
| 4E2FH ↳20015 ↳DETAIL | T3 | TRSDOS 1.3 SYS4: display the full text of error C, word by word from TABLE1 (502BH) and TABLE2 (4E9BH). |
| 4E41H ↳20033 ↳RESTRY | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): put TRY1 (467DH) and TRY2 (460AH) back to 9. |
| 4E46H ↳20038 ↳DIRLO1 | T3 | TRSDOS 1.3 SYS10 (directory for BASIC, BASIC error messages): sets S10SEC (4EEEH) to 2, the first sector read; sector 2 of the directory track is the HIT, the directory records are sectors 3-18. |
| 4E4AH ↳20042 ↳ABRT | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): show 'Operation ABORTED due to flaws on diskette' and fall into EXIT. |
| 4E4BH ↳20043 ↳DIRLO2 | T3 | TRSDOS 1.3 SYS10 (directory for BASIC, BASIC error messages): reads sector S10SEC of the directory track on the drive into 4300H through XREAD (4675H); a read error goes to ERROR with bits 6 and 7 set. |
TRSDOS 2.3 Close/Kill Overlay – SYS3 (4E00H–50FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4E4EH ↳20046 | T1 | TRSDOS 2.3 SYS3: saved directory entry info byte (1 byte). Written by the Kill file handler; holds the directory entry info byte during granule deallocation in the Kill File routine at 4FD0H. |
| 4E50H ↳20048 ↳EXIT | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the normal end: show the two GEORGE messages when protected files were taken out of a backup, clear 5E00H-5EFFH and return to TRSDOS Ready (402DH). |
| 4E51H ↳20049 ↳START5 | T3 | TRSDOS 1.3 SYS5 (DEBUG): the command loop: SP = MEM+28 (411CH), block cursor, DISPLY (4F0FH), then KEYLIN (51F1H) for a command key. |
| 4E56H ↳20054 ↳SAVTRK | T3 | TRSDOS 1.3 SYS10 (directory for BASIC, BASIC error messages): self modified operand of LD D at 4E55H: the directory track, stored at 4E32H from TRKGET's D. |
| 4E64H ↳20068 ↳NOERR | T3 | TRSDOS 1.3 SYS10 (directory for BASIC, BASIC error messages): shows each record of the sector at 4300H whose attribute byte is not 00H and has neither bit 6 (system) nor bit 3 (invisible) set, as NAME/EXT padded to 15 characters, with 0DH after the fourth column of a line. |
| 4E65H ↳20069 ↳ERROUT | T3 | TRSDOS 1.3 SYS4: end the message line, restore the registers, then return to the program through DONE (4E70H) when bit 7 of the error code is set, or JP 4030H (ABORT) to TRSDOS Ready. |
| 4E71H-4E72H ↳20081 ↳DONE+1 | T3 | TRSDOS 1.3 SYS4: self modified operand (2 bytes) of JP NZ at 4E70H: the address the error routine was called from, stored at 4E1CH. |
| 4E75H ↳20085 ↳HCODE | T3 | TRSDOS 1.3 SYS2: self modified operand (1 byte) of CP at 4E74H: the hash code of the file being opened, stored at 4E2DH; INIT also reads it (4F99H) to store it in the HIT. |
| 4E76H ↳20086 ↳BINDEC | T3 | TRSDOS 1.3 SYS4: display the short message * * ERROR nn * * with the error number in A (two decimal digits stored at X1, 4E94H). |
| 4E7CH ↳20092 ↳SDFLAG | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): which diskette is in for a backup on one drive: 00H the source, FFH the destination. |
| 4E7DH ↳20093 ↳FDRIVE | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the drive select byte for the formatter: the drive's bit (SITIT) and 80H (double density); bit 5 (precompensation) while FORM is on tracks 22 and up. |
| 4E7EH ↳20094 ↳FDRIVS | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the source drive number of BACKUP. |
| 4E7EH ↳20094 ↳DSPLY | T3 | TRSDOS 1.3 SYS8 (HELP): show B characters from HL through the ROM's 0033H; HL ends after the text. |
| 4E7FH ↳20095 ↳FDRIVD | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the destination drive number of BACKUP and the drive FORMAT formats (01H in the file). |
| 4E80H ↳20096 ↳FLAWC | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the number of flawed tracks FORM found. |
| 4E81H-4E82H ↳20097 ↳BSIDES | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): BSIDES (4E81H) and BSIDED (4E82H), the sides of the source and destination (00H; not changed by SYS7), copied into CSIDE (4463H). |
| 4E83H ↳20099 ↳FLAG | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the state of the flashing prompt of FWAIT (bit 0). |
| 4E84H ↳20100 ↳CLFN | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the number of the directory record EXMGRN is looking at (0-79), also its offset in the HIT. |
| 4E85H ↳20101 ↳CXFLAG | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): FFH when the backup counter of the source boot sector was at 0 (RBOOT); then RDIR takes the protected files out of the copy. |
| 4E86H ↳20102 ↳CCFLAG | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): not zero when a protected file was taken out of the copy; EXIT then shows the GEORGE messages. |
| 4E86H ↳20102 ↳COMPAR | T3 | TRSDOS 1.3 SYS8 (HELP): compare the BC characters at HL (a HLPTAB name) with the command line at DE; Z = match. BC, DE and HL are kept. Only the table name's length is compared. |
| 4E87H ↳20103 ↳SINGLE | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the destination drive minus the source drive: 00H = backup on one drive, the operator changes the diskettes. |
| 4E88H-4E89H ↳20104 ↳PTRAP | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the trap door code of the master password typed (TRAP); FORMAT writes it into the new GAT at offset CEH, BACKUP compares it with the GAT of the source. |
| 4E8AH ↳20106 ↳OPERR0 | T3 | TRSDOS 1.3 SYS2: error exit: keeps the error code in A, selects drive 0 through DSEL and returns. |
| 4E8AH-4E9AH ↳20106 ↳ERRCOD | T3 | TRSDOS 1.3 SYS4: the short message text * * ERROR 00 * * and 03H; X1 at 4E94H-4E95H receives the digits. |
| 4E8AH-4E8BH ↳20106 ↳CSAVE | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the command line pointer, for the :d drive fields. |
| 4E8CH-4E8DH ↳20108 ↳BUFPNT | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the address of the gran record MREAD or MWRIT is working on (gran records of 770 bytes from 6200H). |
| 4E8EH-4E8FH ↳20110 ↳MEMTOP | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): MEMEND minus 768: the highest address a gran record may start at. |
| 4E90H-4E97H ↳20112 ↳DATBUF | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): today's date as MM/DD/YY (from the ROM's DATE routine, 3033H). |
| 4E97H ↳20119 ↳SKIPSP | T3 | TRSDOS 1.3 SYS8 (HELP): step HL past spaces; A = the first other character. |
| 4E98H-4EA0H ↳20120 ↳NAMEBF | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the diskette name for FORMAT (8 characters used). |
| 4E9BH-502AH ↳20123 ↳TABLE2 | T3 | TRSDOS 1.3 SYS4: the 66 words of the error messages; bit 7 is set on the first letter of each word. |
| 4E9EH ↳20126 ↳GETTAB | T3 | TRSDOS 1.3 SYS8 (HELP): find the COMTAB entry whose number equals A: NC and HL = its address, or C at a 00H byte. |
| 4EA1H-4EAAH ↳20129 ↳NAMBUF | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the buffer INPUT reads answers into (KEYN, 0040H). Not in the file. |
| 4EA4H ↳20132 | T1, N1 | TRSDOS 2.3 SYS1: resident command table (24 bytes, 4EA4H–4EBBH). Three 8-byte entries for the built-in commands: BASIC (handler at 514CH), DEBUG (handler at 5162H), and TRACE (handler at 5191H). Searched by the command dispatcher before the overlay command table. |
| 4EA5H ↳20133 ↳SCCLIN | T3 | TRSDOS 1.3 SYS12 (BASIC NAME and CMD"C"): scans the program and turns each 0EH line number constant into 0DH and the address of the line (an undefined line is reported and blanked); SCCPTR (4EA6H) turns each 0DH pointer into the ASCII line number padded with spaces to 5 characters. DEFB FEH at 4EA4H and F6H at 4EA5H read as CP F6H or OR AFH. |
| 4EB6H-4F8FH ↳20150 ↳HLPTAB | T3 | TRSDOS 1.3 SYS8 (HELP): the 39 names (a length byte, then the name: APPEND ... WP, with FSPEC and SYNTAX), ended by 00H at 4F8FH. |
| 4EBDH-4F54H ↳20157 | T1, N1 | TRSDOS 2.3 SYS1: overlay command table (152 bytes, 4EBDH–4F54H). Nineteen 8-byte entries for APPEND, ATTRIB, AUTO, CLOCK, COPY, DATE, DEVICE, DIR, DUMP, FREE, KILL, LIB, LIST, LOAD, NAME, PRINT, PROT, RENAME, TIME, and VERIFY. Each entry dispatches to SYS6 via RST 28H. |
| 4EC0H ↳20160 ↳CMDLIN | T3 | TRSDOS 1.3 SYS1: run the command line at HL and then go to TRSDOS Ready (SYS1 entry 3): pushes 402DH and falls into CALCOM. |
| 4EC4H ↳20164 ↳CALCOM | T3 | TRSDOS 1.3 SYS1: run the command line at HL and return to the caller (SYS1 entry 7). Builds the command name in the DCB at 4465H, runs a library command from LIBCOM (50C9H) through its vector with C = its entry number, or else adds /CMD and jumps to EXEC (4433H). Error 19 when there is no name. |
TRSDOS 1.3 Close/Kill Overlay – SYS3 (4E00H–500BH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4EC5H ↳20165 ↳CLOCNT | T3 | TRSDOS 1.3 SYS3: Self-modifying operand — extent counter for CLOSE file length check (1 byte). Operand byte of a LD A,nn instruction at 4EC4H. Initialized to MAXEXT−1 (0CH = 12 decimal) at 4EAEH, decremented each iteration at 4EC7H. Controls how many segment descriptors are checked when trimming unused granules from a file being closed. |
| 4ED5H-4EE2H ↳20181 ↳NUMB0 | T3 | TRSDOS 1.3 SYS13 (BASIC CMD"O", CMD"J" and CMD"X"): seven 2 byte variables NUMB0, LAB13, LAB14, LAB15, LAB16, NUMB1 and VARPTR (DEFS, not in the file). SORT keeps the count, the indexes, the gap and the first descriptor there; CROSS keeps the length and address of the argument (NUMB0, LAB15), the line number address (NUMB1) and the line searched (VARPTR). |
| 4EDAH ↳20186 ↳DRIVE | T3 | TRSDOS 1.3 SYS10 (directory for BASIC, BASIC error messages): the drive number 0-3 being shown. |
| 4EDBH ↳20187 ↳TRK | T3 | TRSDOS 1.3 SYS10 (directory for BASIC, BASIC error messages): not used by any instruction. |
| 4EDCH-4EEBH ↳20188 ↳DRVMSG | T3 | TRSDOS 1.3 SYS10 (directory for BASIC, BASIC error messages): 'DRIVE :0', seven spaces and 03H, the heading in the first column. |
| 4EE3H ↳20195 ↳DRV | T3 | TRSDOS 1.3 SYS10 (directory for BASIC, BASIC error messages): the drive digit of DRVMSG, stored at 4E38H. |
| 4EE3H ↳20195 ↳RETJUL | T3 | TRSDOS 1.3 SYS13 (BASIC CMD"O", CMD"J" and CMD"X"): CMD"J","MM/DD/YY",var$ returns the day of the year as 3 digits; the -YY/DDD form goes to RETDAT (4F92H), which returns MM/DD/YY. Month lengths come from the ROM table at 0269H; a year divisible by 4 is a leap year. |
| 4EE3H ↳20195 ↳SETIT | T3 | TRSDOS 1.3 SYS14 ($FILPTR and $RAMDIR): puts the record of logical file number B into the RAM area: NAME/EXT:D and spaces (15 bytes with an extension, 14 without, as the / is not counted), protection level, EOF, LRL, ERN, granules (the sum of bits 4-0 + 1 over the extents), then '++'; a system file gives error 25 and wipes BUFF1 (CLEAR 4F9CH). |
| 4EE7H ↳20199 ↳FSPEC | T3 | TRSDOS 1.3 SYS1: build a filespec (SYS1 entry 4, the SYNTAX vector at 441CH). Copies NAME/EXT.PASSWORD:D from the text at HL to DE, ended with 03H, skipping a word TO. Returns Z (A = 00H) when a name was found, NZ if not. |
| 4EECH-4EEDH ↳20204 ↳SAVE3 | T3 | TRSDOS 1.3 SYS10 (directory for BASIC, BASIC error messages): the address of the directory record being looked at in 4300H-43FFH (4300H in the file). |
| 4EEEH ↳20206 ↳S10SEC | T3 | TRSDOS 1.3 SYS10 (directory for BASIC, BASIC error messages): the next directory sector to read (2 to 19; the display ends at 19). |
| 4EEFH ↳20207 ↳NUM | T3 | TRSDOS 1.3 SYS10 (directory for BASIC, BASIC error messages): the count of 15 character columns used on the current line (1 after the heading). |
| 4EF0H ↳20208 ↳DOERR | T3 | TRSDOS 1.3 SYS10 (directory for BASIC, BASIC error messages): E = BASIC's error code (twice the error number minus 2): errors 1-24 give messages 1-24, errors 51-70 (codes 64H-8AH) messages 25-44, every other code message 20 'Unprintable error'. Counts the 00H bytes of ERRTAB and jumps to the ROM's 1A01H with HL = the message. |
| 4F0FH ↳20239 ↳DISPLY | T3 | TRSDOS 1.3 SYS5 (DEBUG): display memory (8 or 16 lines from MEM+6) and, in half page mode, the 12 register pairs and the 16 bytes at the program's PC. |
| 4F11H-51D1H ↳20241 ↳ERRTAB | T3 | TRSDOS 1.3 SYS10 (directory for BASIC, BASIC error messages): 00H, then 44 error messages ending with 00H ('NEXT without FOR' ... 'File access DENIED'). |
| 4F1BH ↳20251 ↳RESET | T3 | TRSDOS 1.3 SYS3: write the filespec NAME/EXT:D and 03H from the directory record (SAVEXP, 4F24H) back into the DCB at IX, which then no longer shows as open. |
TRSDOS 2.3 Close/Kill Overlay – SYS3 (4E00H–50FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4F1DH ↳20253 | T1, N1 | TRSDOS 2.3 SYS2/SYS3: directory entry byte offset for GAT search (1 byte). Self-modifying target used by the Kill handler at 4ED8H and the open-new-file handler at 4F50H for granule allocation calculations. |
| 4F22H ↳20258 | T1, N1 | TRSDOS 2.3 SYS3: self-modifying operand — track number for GAT deallocation (1 byte). Operand byte of an ADD A,00H instruction at 4F21H. Written at runtime to encode the track number into the GAT bit clear operation. |
| 4F23H ↳20259 ↳S2INIT | T3 | TRSDOS 1.3 SYS2: open a file, creating it when it is not found (INIT, 4420H). An existing file gets its ERN and EOF set to 0 and the new LRL. A new file gets a HIT entry and a directory record on the drive given or the first drive with room (protection level 6 when a password was given). Returns Z with the CARRY FLAG set for a new file; error 27 (disk full) when no drive has room. |
TRSDOS 1.3 Close/Kill Overlay – SYS3 (4E00H–500BH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4F24H-4F25H ↳20260 ↳SAVEXP | T3 | TRSDOS 1.3 SYS3: Self-modifying operand — saved directory entry pointer (2 bytes). Operand bytes of a LD HL,nnnn instruction at 4F23H. Written at 4E33H after reading the directory entry for the file being closed. Used by the RESET routine to locate the filename in the directory buffer for restoring the DCB filespec. |
| 4F34H ↳20276 ↳FEXT | T3 | TRSDOS 1.3 SYS1: add the 3 byte default extension at HL to the filespec at DE when it has none (SYS1 entry 5, the PUTEXT vector at 444BH). |
TRSDOS 2.3 Error Handler Overlay – SYS4 (4E00H–50FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4F36H ↳20278 | T1 | TRSDOS 2.3 SYS4: error code display template (fixed string). Contains LF + "*** ERRCODE=XX, " + ETX; the two XX bytes at 4F42H–4F43H are self-modified at runtime to the ASCII error code digits. |
| 4F42H-4F43H ↳20290 | T1 | TRSDOS 2.3 SYS4: self-modified error code ASCII digits (2 bytes, 4F42H–4F43H). Tens digit at 4F42H, units digit at 4F43H. Written by the error display routine at 4E2AH before displaying the error template at 4F36H. |
| 4F47H ↳20295 | T1 | TRSDOS 2.3 SYS4: closing error marker string. Contains "***" + CR. Displayed after the error context information. |
| 4F4BH ↳20299 | T1, N1 | TRSDOS 2.3 SYS4: device display template (fixed string). Contains screen code + "<DEVICE=*XX>" + CR; bytes at 4F55H–4F56H are self-modified with the drive number and info byte from the FCB. |
TRSDOS 2.3 DEBUG Monitor Overlay – SYS5 (4E00H–51FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4F54H-4F6BH ↳20308 | T1, N1 | TRSDOS 2.3 SYS5 DEBUG: register name display table (24 bytes, 4F54H–4F6BH). 12 entries × 2 bytes each; two ASCII characters per register pair name (AF, BC, DE, HL, IX, IY, AF', BC', DE', HL', SP, PC). Used by the Register Dump routine at 4ECFH. |
TRSDOS 2.3 Error Handler Overlay – SYS4 (4E00H–50FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4F55H-4F56H ↳20309 | T1, N1 | TRSDOS 2.3 SYS4: self-modified device context bytes (2 bytes, 4F55H–4F56H). Written by the Extended Error Context Display routine at 4E73H with the drive number and FCB info byte for the failing device. |
| 4F59H ↳20313 | T1 | TRSDOS 2.3 SYS4: file display prefix string. Contains screen code + "<FILE=" for the error context display. |
TRSDOS 1.3 Close/Kill Overlay – SYS3 (4E00H–500BH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4F59H ↳20313 ↳RESDRV | T3 | TRSDOS 1.3 SYS3: Self-modifying operand — ASCII drive number for filespec reconstruction (1 byte). Operand byte of a LD A,nn instruction at 4F58H. Written at 4F20H with the drive number converted to ASCII (by adding 30H). Used by the RESET routine to append the drive number to the reconstructed filespec in the DCB. |
TRSDOS 2.3 Error Handler Overlay – SYS4 (4E00H–50FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4F60H ↳20320 | T1, N1 | TRSDOS 2.3 SYS4: filename buffer for error display (16 bytes). Filled at runtime with the NAME/EXT:D> string + CR terminator by the Filename From Directory Entry routine at 4EC4H. |
| 4F61H ↳20321 ↳SKILL | T3 | TRSDOS 1.3 SYS3: kill the open file of the DCB at DE (access level 0 or 1 needed, else error 25): clears its HIT byte, releases every extent in the GAT, clears its 48 byte directory record and DCB offsets 00H-0FH. |
| 4F61H-4F62H ↳20321 ↳CURSAV | T3 | TRSDOS 1.3 SYS5 (DEBUG): self modified operand of LD HL at 4F60H: the screen address under the memory display, stored by 4F2BH. |
| 4F68H ↳20328 ↳GETSYM | T3 | TRSDOS 1.3 SYS1: copy up to B letters and digits from the text at HL to DE, ending them with 03H. Returns Z when at least one was stored, A = the character that ended them. |
| 4F70H ↳20336 | T1, N1 | TRSDOS 2.3 SYS4: return address display prefix string. Contains screen code + "REFERENCED AT X'" + ETX. Displayed before the hex return address in error context output. |
TRSDOS 2.3 DEBUG Monitor Overlay – SYS5 (4E00H–51FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4F78H ↳20344 | T1, N1 | TRSDOS 2.3 SYS5 DEBUG: flags bit name table (8 bytes). Contains "SZ1H1PNC" (Sign, Zero, fixed-1, Half-carry, fixed-1, Parity/Overflow, Subtract, Carry). Used by Register Dump to label the F register bits. |
TRSDOS 2.3 Error Handler Overlay – SYS4 (4E00H–50FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4F82H ↳20354 | T1, N1 | TRSDOS 2.3 SYS4: return address display suffix string. Contains "'" + CR. Appended after the hex return address. |
| 4F84H-4FC1H ↳20356 | T1, N1 | TRSDOS 2.3 SYS4: error code offset table (62 bytes, 4F84H–4FC1H). One byte per error code (00H–3DH). Each byte is a byte offset into the error message descriptor chains at 515BH, indexing the message text. |
| 4F8FH ↳20367 ↳GETLTH | T3 | TRSDOS 1.3 SYS1: self modified operand (1 byte) of LD A at 4F8EH: GETSYM stores the maximum length here and 00H once a character has been stored; tested as the no symbol flag. |
| 4F90H-4FB4H ↳20368 ↳HLPMSG | T3 | TRSDOS 1.3 SYS8 (HELP): 'Help is avaliable for the following:' and 0DH, the heading of the list. |
| 4F93H ↳20371 ↳SEARCH | T3 | TRSDOS 1.3 SYS1: look up the symbol at DE in the table at BC (8 byte entries: name padded with spaces to 6 bytes, 2 byte vector; 00H ends the table). Returns Z with C = the entry number and DE = the vector, or NZ. |
| 4F97H ↳20375 ↳LINSCN | T3 | TRSDOS 1.3 SYS12 (BASIC NAME and CMD"C"): turns every ASCII line number after AUTO, DELETE, EDIT, RESUME, ERL, RUN, LIST, LLIST, GOTO, THEN, GOSUB, ELSE (TOKLST 4F8BH) or INPUT#LEN formula, into 0EH, the binary number and spaces; moves the program up when needed (MOVPRG 5071H) and sets the link fields again (DOCNVR 4FDBH). |
TRSDOS 2.3 Close/Kill Overlay – SYS3 (4E00H–50FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4FA2H ↳20386 | T1, N1 | TRSDOS 2.3 SYS2: saved directory entry low byte / L register (1 byte). Saved during the Open New File handler at 4F50H for use during directory entry population. |
| 4FA2H-4FDEH ↳20386 ↳DISPL7 | T3 | TRSDOS 1.3 SYS5 (DEBUG): the 12 register names shown over the values (AF ... SP, then PC at 4FD7H) and 03H; REGIST searches them. |
| 4FA7H ↳20391 | T1, N1 | TRSDOS 2.3 SYS1: noise word keyword table (3 entries). Contains the keywords "TO", "ON", and "OVER" used by the filespec parser at 4F56H to skip noise words in command line syntax. |
TRSDOS 1.3 Close/Kill Overlay – SYS3 (4E00H–500BH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4FACH-4FADH ↳20396 ↳SAVPNT | T3 | TRSDOS 1.3 SYS3: Self-modifying operand — saved directory record pointer for KILL (2 bytes). Operand bytes of a LD HL,nnnn instruction at 4FABH. Written at 4F91H after reading the directory entry for the file being killed. Used to locate the start of the directory record for zeroing out during file deletion. |
| 4FADH-4FB4H ↳20397 ↳RAMM | T3 | TRSDOS 1.3 SYS14 ($FILPTR and $RAMDIR): variables RAMM (2 bytes, the RAM area pointer), DDRV (1, the drive), DDIR (2, the directory record in BUFF1), HITPTR (2, the HIT copy pointer) and RECCNT (1, HIT entries left); DEFS, not in the file. |
TRSDOS 2.3 Close/Kill Overlay – SYS3 (4E00H–50FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4FAFH ↳20399 | T1, N1 | TRSDOS 2.3 SYS2: granule count parameter (1 byte). Holds the value of Register B on entry to the Open File handler — the number of initial granules to allocate for a new file. |
| 4FB2H ↳20402 | T1, N1 | TRSDOS 2.3 SYS2: extent count (1 byte). Saved from Register B after the directory entry match. Used to populate the extent chain count field in the FCB. |
| 4FB5H-5029H ↳20405 ↳COMTAB | T3 | TRSDOS 1.3 SYS8 (HELP): 39 entries of 3 bytes: the HLPTAB entry number (01H-27H) and the address of its help text; no end byte. |
| 4FC0H ↳20416 | T1, N1 | TRSDOS 2.3 SYS1: Default Extension Insertion routine. Appends the default file extension "CMD" to a filespec when no extension was supplied by the user. Called internally from the filespec parser. |
TRSDOS 2.3 Error Handler Overlay – SYS4 (4E00H–50FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4FC2H-502DH ↳20418 | T1, N1 | TRSDOS 2.3 SYS4: word address table (108 bytes, 4FC2H–502DH). 54 two-byte little-endian pointers, each pointing to the start of a word in the error message word string pool at 5030H. |
TRSDOS 2.3 Close/Kill Overlay – SYS3 (4E00H–50FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4FC8H ↳20424 | T1 | TRSDOS 2.3 SYS3: self-modifying operand — drive number with command bits (1 byte). Operand byte of an LD A,00H instruction at 4FC7H. Written at runtime to encode the drive number into the filespec construction code. |
| 4FCEH ↳20430 ↳RELEAS | T3 | TRSDOS 1.3 SYS3: release extent DE (E = track, D = allocation byte: bits 7-5 first gran, bits 4-0 number of grans) by clearing its gran bits in the GAT at 4D00H. REL1 (4FDEH) is the loop, also entered by CHKEND. |
| 4FCFH ↳20431 ↳ATTRIB | T3 | TRSDOS 1.3 SYS2: self modified operand (1 byte) of LD (HL) at 4FCEH: the attribute byte of a file INIT creates (10H, or with protection level 6 when a password was given). |
| 4FDBH ↳20443 ↳PARAM | T3 | TRSDOS 1.3 SYS1: read an options list (NAME=value, ...) at HL using the parameter table at DE (SYS1 entry 6, the SWITCH vector at 4454H). Stores each value (hexadecimal number, ON = FFFFH, OFF = 0000H, a name alone = FFFFH) in the 2 bytes the table entry points to. Returns NZ on a syntax error. |
| 4FF4H ↳20468 | T1, N1 | TRSDOS 2.3 SYS1: character extraction subroutine. Reads up to B characters from (HL), storing valid filename characters to a buffer. Used by the filespec parser at 4F56H. |
| 4FF7H ↳20471 ↳GO | T3 | TRSDOS 1.3 SYS5 (DEBUG): the J and G commands: optional new PC, up to two breakpoints, then MISS1 (5016H) puts back the registers and runs the program at MEM+30. |
Memory Boundaries and Top-of-Memory Markers
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4FFFH ↳20479 | Both Model I and III ROM | 4K system top of physical memory. |
| 4FFFH ↳20479 ↳CLRBIT | T3 | TRSDOS 1.3 SYS3: clear bit A (0-7) of Register B by building a RES n,B instruction at 5009H (CLRBT2, 500AH). |
| 5006H ↳20486 ↳SETDCB | T3 | TRSDOS 1.3 SYS2: fill the DCB at IX from the directory record at HL: type 80H, access level and flags, buffer, drive C, logical file number B, EOF, LRL, NRN 0, ERN, side and the extents. |
TRSDOS 1.3 Close/Kill Overlay – SYS3 (4E00H–500BH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 500AH ↳20490 ↳CLRBT2 | T3 | TRSDOS 1.3 SYS3: Self-modifying operand — RES opcode byte for GAT bit manipulation (1 byte). Target of the CLRBIT routine at 4FFFH. The routine computes a RES n,B opcode (where n is the granule's bit position within its GAT byte) and writes it here. The instruction at 5009H then executes this dynamically-constructed opcode to clear the appropriate granule bit in the GAT, freeing that granule. |
| 500EH ↳20494 ↳S2LRL | T3 | TRSDOS 1.3 SYS2: self modified operand (1 byte) of LD A at 500DH: the logical record length passed to OPEN or INIT in B (00H = 256), stored at 4E1AH. |
| 5011H ↳20497 ↳PRIV | T3 | TRSDOS 1.3 SYS2: self modified operand (1 byte) of LD A at 5010H: the access level the password check gave, stored at 4F1CH and put in bits 2-0 of DCB offset 01H. |
| 501FH-5020H ↳20511 ↳BLKBUF | T3 | TRSDOS 1.3 SYS2: self modified operand (2 bytes) of LD DE at 501EH: the buffer address passed to OPEN or INIT in HL, stored at 4E1DH and put in DCB offsets 03H-04H. |
TRSDOS 2.3 Overlay and SYS1 Work Area (44A1H–5026H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 5026H ↳20518 | T1, N1 | TRSDOS 2.3 SYS1: filespec parser remaining-character counter (1 byte). Self-modified by the character extraction subroutine at 4FF4H. Holds the count of characters remaining to be extracted from the filespec. |
| 502AH-5F84H ↳20522 ↳APPEND | T3 | TRSDOS 1.3 SYS8 (HELP): the help texts (APPEND at 502AH ... WPJ at 5EE7H): a line count byte, then each line as a length byte and its characters. A line ending in 0DH is followed by an empty line; WPJ has five lines and the count 4. |
| 502BH-50E6H ↳20523 ↳TABLE1 | T3 | TRSDOS 1.3 SYS4: the word numbers of each error message, errors 0-63 (bit 7 set on the first byte of each entry), and the stop byte 80H at 50E6H. Errors 7, 33, 36 and 43-63 print Undefined Error Code; 37 repeats the text of 25. |
TRSDOS 2.3 Error Handler Overlay – SYS4 (4E00H–50FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 5030H ↳20528 | T1 | TRSDOS 2.3 SYS4: error message word string pool. 53 words used to compose error messages: "NO", "ERROR", "FORMAT", "PARITY", "DURING", "HEADER", "DATA", "WRITE", "PROTECT", "LOST", "SEEK", "DRIVE", "NOT", "READY", "FILE", "SPACE", "FULL", "NAME", "OPEN", "PASS", "WORD", and others. Indexed via the offset table at 4F84H. |
TRSDOS 2.3 Close/Kill Overlay – SYS3 (4E00H–50FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 5039H ↳20537 | T1, N1 | TRSDOS 2.3 SYS3: Free Granules In Extent Entry routine. Processes one extent entry pair (track byte + sector byte), frees the allocated granules from the GAT sector buffer at 5100H. |
| 503CH ↳20540 ↳SET | T3 | TRSDOS 1.3 SYS5 (DEBUG): put a breakpoint (F7H, RST 30H) at HL: the old byte, MSB and LSB are stored backward from DE (MEM+5 for the first, MEM+2 for the second). |
| 5054H-5055H ↳20564 ↳SAVCUR | T3 | TRSDOS 1.3 SYS5 (DEBUG): self modified operand of LD HL at 5053H (MEMOR0): the cursor address saved by DOIT (4EC4H) and MEMORY (5050H). |
| 505BH ↳20571 | T1, N1 | TRSDOS 2.3 SYS3: Build GAT Bit Mask routine. Converts a granule position (0–7) into a RES opcode for self-modifying GAT bit clear operation at 5065H. |
| 5063H ↳20579 ↳GETFLG | T3 | TRSDOS 1.3 SYS1: read ON or OFF at HL: BC = FFFFH for ON, 0000H for OFF; Z when found. |
| 5064H ↳20580 ↳CRACK | T3 | TRSDOS 1.3 SYS2: take the filespec at HL apart into NAME, EXT, PWORD (padded with spaces) and DRV (FFH when none). Returns Z, or NZ with error 19 (no name) or 2 (drive above MAXDRV). |
| 5066H ↳20582 | T1 | TRSDOS 2.3 SYS3: self-modifying operand — RES/SET bit opcode for GAT bit manipulation (1 byte). Target of the Build GAT Bit Mask routine at 505BH. Encodes the bit number into the RES n,B instruction. |
| 5068H ↳20584 | T1 | TRSDOS 2.3 SYS3: Read GAT Sector routine. Reads the Granule Allocation Table sector (track 0, sector 1) into the 5100H buffer via SYS0 I/O routines. |
| 5077H ↳20599 | T1 | TRSDOS 2.3 SYS3: Write GAT Sector routine. Writes the Granule Allocation Table sector from the 5100H buffer back to disk track 0, sector 1, via SYS0 I/O routines. |
TRSDOS 1.3 DOS Command Handler Overlay – SYS6 (5200H–623DH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 5081H ↳20609 ↳CHKFLG | T3 | TRSDOS 1.3 SYS1: CHKFLG, read an (ON) or (OFF) option at HL after any spaces. Returns NZ for ON, Z for OFF, and NZ with A = that character when no opening parenthesis follows. Called by SYS6 (CLOCK) and SYS9 (DUAL) while SYS1 is in memory; CHKFL2 at 5080H first steps past one character. |
TRSDOS 2.3 Close/Kill Overlay – SYS3 (4E00H–50FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 5086H ↳20614 | T1, N1 | TRSDOS 2.3 SYS3: unused overlay padding (FFH fill, 5086H–50FFH). Marks the end of the SYS3 overlay code; bytes beyond this point are not executed. |
| 5090H-5097H ↳20624 ↳FIELD | T3 | TRSDOS 1.3 SYS1: 8 byte work area that PARAM uses for the parameter name it looks up. |
| 5093H ↳20627 ↳CMPRES | T3 | TRSDOS 1.3 SYS12 (BASIC NAME and CMD"C"): CMD"C": E = 0 SPACES (516CH), 1 REMARK (50BAH), 2 BOTH (50B1H), through SWTAB (50ABH). Takes out spaces and TABs (not in strings or FIELD statements) and remarks (a REM alone on a line stays), moving the program down with MOVPGM (5159H), sets the link fields again (DOCLN 5136H) and clears the variables. MOVPGM leaves VARTAB at the old end of the program. |
| 509BH ↳20635 | T1, N1 | TRSDOS 2.3 SYS2: Compute Filename CRC Hash routine. Computes an 8-bit XOR/rotate hash of the 11-byte filename (8+3) for quick directory comparison before full name matching. |
| 50ABH ↳20651 | T1, N1 | TRSDOS 2.3 SYS2: Scan Directory Entry for Free Slot routine. Scans the directory sector at 4D00H for an unused (zero first-byte) entry slot for new file creation. |
| 50BBH ↳20667 ↳LEGAL | T3 | TRSDOS 1.3 SYS1: CARRY clear if A is 0-9 or A-Z, set otherwise. A is not changed. |
| 50BDH ↳20669 | T1 | TRSDOS 2.3 SYS2: Check Directory Entry Active routine. Tests if the directory entry at (HL) is active (non-zero first byte). Returns with Z flag set if the entry is unused. |
TRSDOS 1.3 DOS Command Handler Overlay – SYS6 (5200H–623DH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 50C9H ↳20681 ↳LIBCOM | T3 | TRSDOS 1.3 SYS1: LIBCOM, the library command table: 37 entries of 8 bytes (the name padded with spaces to 6 bytes, then a 2 byte vector), ended by 00H at 51F1H. SEARCH returns the entry number (1-37) in C, which SYS6, SYS9 and SYS11 use to find the command; the SYS6 LIB command displays the names. |
| 50CDH ↳20685 ↳GETFLD | T3 | TRSDOS 1.3 SYS2 entry point: Parse a field of alphanumeric characters from the command-line pointer at HL into the buffer at DE. Used by SYS6 ATTRIB for password parsing. |
TRSDOS 2.3 Close/Kill Overlay – SYS3 (4E00H–50FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 50D1H ↳20689 | T1 | TRSDOS 2.3 SYS2: Compute 16-Bit Filename Hash routine. Computes a CRC-style 16-bit hash of the password buffer for password integrity verification during file open. |
| 50DBH ↳20699 ↳SINGLE | T3 | TRSDOS 1.3 SYS5 (DEBUG): the C and I commands: look up the instruction at the PC in TABLE1/2/3 (5160H), put a breakpoint after it and, for a jump, a second one at its target, then run it. C steps over a CALL, I steps into it. |
| 50DFH-511CH ↳20703 ↳GEORGE | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): two messages coded with XOR 55H, each a count byte and the characters: 'Maximum Backup Count Exceeded' and 'Protected Files NOT Backed Up', shown by SPRINT (516EH). |
TRSDOS 2.3 DEBUG Monitor Overlay – SYS5 (4E00H–51FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 50E0H ↳20704 | T1 | TRSDOS 2.3 SYS5 DEBUG: Z80 opcode classification table. Triplets of (mask, match, type) bytes for unprefixed, ED-prefixed, and DD/FD-prefixed instructions. Used by the I/C (Instruction decode) command at 505DH to identify instruction lengths and operand types. |
TRSDOS 1.3 DOS Command Handler Overlay – SYS6 (5200H–623DH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 50E7H ↳20711 ↳HASH | T3 | TRSDOS 1.3 SYS2 entry point: Compute the 8-bit hash code (never 00H) of the 11-byte name and extension at HL. Returns it in A. Used by SYS6 RENAME to recompute the hash code when a file is renamed. |
| 50F7H ↳20727 ↳GETENT | T3 | TRSDOS 1.3 SYS2: find the first free (00H) entry in the HIT copy at 4D00H; Z with HL at the entry (L = the logical file number), or NZ with error 26 (directory space full). |
TRSDOS 2.3 Close/Kill Overlay – SYS3 (4E00H–50FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 50FDH ↳20733 | T1 | TRSDOS 2.3 SYS2: Select Drive and Detect Write Protect routine. Issues a Force Interrupt command to the WD1771 FDC, selects the drive via SYS0, polls FDC status for write-protect detection. |
| 5100H-51FFH ↳20736 | T1, N1 | TRSDOS 2.3 SYS3: GAT sector buffer (256 bytes, 5100H–51FFH). Holds the Granule Allocation Table for the current drive during granule allocation and deallocation operations. |
| 5102H ↳20738 ↳CROSS | T3 | TRSDOS 1.3 SYS13 (BASIC CMD"O", CMD"J" and CMD"X"): CMD"X",token or string: shows the number of each program line that holds the argument, padded to the next column that is a multiple of 8, with a new line once the cursor reaches column 58. |
TRSDOS 1.3 DOS Command Handler Overlay – SYS6 (5200H–623DH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 5107H ↳20743 ↳SETTDC | T3 | TRSDOS 1.3 SYS2 entry point: Compute trap-door-code (password hash) from the 8-byte password at DE. Returns 16-bit hash in HL. Used by SYS6 ATTRIB for access/update password hashing; SYS6 PROT uses its own copy of the algorithm, TRAP (555FH). |
TRSDOS 2.3 Close/Kill Overlay – SYS3 (4E00H–50FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 511EH ↳20766 | T1 | TRSDOS 2.3 SYS2: Poll FDC Status Bit 1 routine. Reads the WD1771 FDC status register and tests bit 1 (Index/DRQ), with a timeout loop counted by BC. |
| 512EH ↳20782 | T1, N1 | TRSDOS 2.3 SYS2: Read Directory Sector routine. Reads the directory sector for the current drive (drive number from Register C) into the 4D00H buffer via SYS0 I/O routines. |
TRSDOS 1.3 Open/Init Overlay – SYS2 (4E00H–5150H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 5137H ↳20791 ↳SID | T3 | TRSDOS 1.3 SYS2: Requested side number variable (SID). Set by CRACK during filespec parsing. FFH = use global/default side; 0–1 = specific side. |
| 5138H ↳20792 ↳DRV | T3 | TRSDOS 1.3 SYS2: Requested drive number variable (DRV). Set by CRACK during filespec parsing. FFH = search all drives; 0–3 = specific drive. Also updated by OPEN when the file is found to record the actual drive. |
| 5139H-5140H ↳20793 ↳PWORD | T3 | TRSDOS 1.3 SYS2: Password field buffer (PWORD, 8 bytes). Set by CRACK when parsing a filespec containing a password (after '.' separator). Space-padded. |
TRSDOS 2.3 Close/Kill Overlay – SYS3 (4E00H–50FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 5141H ↳20801 | T1 | TRSDOS 2.3 SYS2: Write Directory Sector routine. Writes the directory sector from the 4D00H buffer back to disk via SYS0 I/O routines. |
TRSDOS 1.3 Open/Init Overlay – SYS2 (4E00H–5150H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 5141H-5148H ↳20801 ↳NAME | T3 | TRSDOS 1.3 SYS2: Filename buffer (NAME, 8 bytes). Set by CRACK during filespec parsing. Space-padded. This is the first of four order-dependent contiguous fields (NAME, EXT, UPDTDC, ACCTDC) copied together by the LDIR at 4FEBH. |
| 5149H-514BH ↳20809 ↳EXT | T3 | TRSDOS 1.3 SYS2: File extension buffer (EXT, 3 bytes). Set by CRACK when parsing a filespec containing an extension (after '/' separator). Space-padded. |
TRSDOS 2.3 Close/Kill Overlay – SYS3 (4E00H–50FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 514CH ↳20812 | T1 | TRSDOS 2.3 SYS1: BASIC command handler (entry in resident command table). Starts non-DOS Level II BASIC by copying ROM vectors (36H bytes from 06D2H) back to 4000H, then jumping to the Level II BASIC cold start. |
TRSDOS 1.3 Open/Init Overlay – SYS2 (4E00H–5150H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 514CH-514DH ↳20812 ↳UPDTDC | T3 | TRSDOS 1.3 SYS2: Update password Trap Door Code (UPDTDC, 2 bytes). Computed by SETTDC from the password and stored here by S2OPEN. Compared against the directory entry's update TDC during protection checking. A match grants full (update) access to the file. |
| 514EH-514FH ↳20814 ↳ACCTDC | T3 | TRSDOS 1.3 SYS2: Access password Trap Door Code (ACCTDC, 2 bytes). Initially set equal to UPDTDC by S2OPEN. Compared against the directory entry's access TDC during protection checking. A match grants limited (read) access to the file. |
TRSDOS 2.3 Close/Kill Overlay – SYS3 (4E00H–50FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 5154H ↳20820 | T1 | TRSDOS 2.3 SYS2: drive number for current directory operation (1 byte). FFH = search all drives. Set before calling directory search routines. |
| 5155H-515CH ↳20821 | T1, N1 | TRSDOS 2.3 SYS2/SYS6: password buffer (8 bytes, 5155H–515CH). Space-padded 8-character password field. Used by the filespec parser, directory search, and the PROT command in SYS6. |
TRSDOS 2.3 Error Handler Overlay – SYS4 (4E00H–50FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 515BH ↳20827 | T1 | TRSDOS 2.3 SYS4: error message descriptor chains. Variable-length byte sequences; bits 0–5 of each byte = word index into the string pool at 5030H; bit 6 = continuation flag (more words follow); bit 7 = end of message. One chain per error code, indexed via 4F84H. |
TRSDOS 2.3 Close/Kill Overlay – SYS3 (4E00H–50FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 515DH-5167H ↳20829 | T1, N1 | TRSDOS 2.3 SYS2: filename/extension template buffer (11 bytes, 515DH–5167H). Space-padded 8-char name + 3-char extension. Populated by the filespec parser and used for directory entry matching. |
| 5160H-51B0H ↳20832 ↳TABLE1 | T3 | TRSDOS 1.3 SYS5 (DEBUG): single step tables: TABLE1 5160H (no prefix), TABLE2 518EH (ED), TABLE3 5195H (DD, FD). Entries of mask, value, type; the type byte holds the length (bits 3-0) and the kind of jump (bits 7-4); a byte below 05H ends each table and is the default type. |
| 5162H ↳20834 | T1, N1 | TRSDOS 2.3 SYS1: DEBUG command handler. Toggles the DEBUG flag (bit 7 at 430FH), patches the BREAK handler to trap RST F7H breakpoints, and installs the DEBUG display hooks at 4030H and 4031H. |
| 5168H-5169H ↳20840 | T1, N1 | TRSDOS 2.3 SYS2: filename hash value (2 bytes, 5168H–5169H). 16-bit CRC-style hash of the password buffer computed by 50D1H. Compared against the stored hash in the directory entry for password verification. |
| 516AH-516BH ↳20842 | T1 | TRSDOS 2.3 SYS2: copy of filename hash (2 bytes, 516AH–516BH). Duplicate of the 5168H hash value, retained for comparison after the directory sector is reloaded. |
| 516EH ↳20846 ↳SPRINT | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): show the message at HL coded with XOR 55H (count byte first); HL ends after it. |
| 517DH ↳20861 ↳RGRAN | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): read a gran (3 sectors) of the source from track D, sector E into the gran record at HL (sector and track first, then the data); RNEXT (517AH) takes HL from BUFPNT. Z, or NZ with the error code in A. |
| 5191H ↳20881 | T1 | TRSDOS 2.3 SYS1: TRACE command handler. Toggles TRACE mode by enqueueing or dequeueing the TRACE timer interrupt callback (target 4CD9H) in the SYS0 timer interrupt chain. |
| 519AH ↳20890 ↳WGRAN | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): write the gran record at HL to the destination at its stored track and sector. Z, or NZ with the error code in A. |
| 51AEH-51B1H ↳20910 ↳BUFPNT | T3 | TRSDOS 1.3 SYS12 (BASIC NAME and CMD"C"): BUFPNT (the line being compressed) and TEMPX (51B0H, where REMARK moves the program to), not in the file. |
| 51AFH ↳20911 | T1, N1 | TRSDOS 2.3 SYS1: option keyword matching buffer (variable length). Destination for parsed keyword values from the option parser at 507DH (SYS1 request code 60H). |
| 51B4H ↳20916 ↳PRTAVL | T3 | TRSDOS 1.3 SYS13 (BASIC CMD"O", CMD"J" and CMD"X"): the operand of LD A,00H at 51B3H in DISOUT; when it is not 00H DISOUT also prints the character. It is 00H in the file and CROSS (5108H) only ever stores 00H, so CMD"X" never prints. |
| 51B5H ↳20917 | T1, N1 | TRSDOS 2.3 SYS1: default extension string (3 bytes). Contains "CMD" (43H 4DH 44H). Used when loading unrecognized commands as program files. |
| 51B8H ↳20920 | T1, N1 | TRSDOS 2.3 SYS1: DOS READY prompt string (12 bytes). 0AH + "DOS READY" + 0DH. Displayed by the command prompt routine at 4E1FH. |
| 51BBH ↳20923 ↳VGRAN | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): read back the gran WGRAN wrote (into the ROM, HL = 0000H). Z, or NZ with the error code in A. |
| 51C3H ↳20931 | T1 | TRSDOS 2.3 SYS1: error message string for unrecognized commands. "WHAT?" + 0DH. Displayed when the command line parser fails to match any resident or overlay command. |
| 51C5H-51C6H ↳20933 ↳VER | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): self modified operand of LD DE at 51C4H: the track and first sector of the gran WGRAN wrote. |
| 51F1H ↳20977 ↳KEYLIN | T3 | TRSDOS 1.3 SYS5 (DEBUG): read a key (KEY, 0049H): ENTER and the arrows except the right arrow return Z and C; a comma, a space or the right arrow (as a space) return Z and NC; any other key from 20H is displayed and returned with NZ and NC. |
| 51F4H ↳20980 ↳GREAD | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): run the disk routine in IX after showing the message at IY with ' Track nn, Sector nn'; FUNCTA (51D8H) reads, FUNCTB (51E2H) writes, FUNCTC (51ECH) verifies. Tracks 40 and up get no message and 80H added to the sector. |
TRSDOS 2.3 Disk BASIC (BASIC/CMD) Variables and Jump Table (5200H–6575H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 5200H ↳20992 | T1, N1 | TRSDOS 2.3 Disk BASIC (BASIC/CMD) entry point. Command dispatcher for 19 Disk BASIC commands. Loaded by TRSDOS when the user types BASIC at the DOS READY prompt. |
| 5203H ↳20995 | T1 | TRSDOS 2.3 Disk BASIC: error message table (ERRTAB). Disk BASIC–specific error message strings for I/O errors. Referenced by the error display routine at 57E6H. |
| 5203H ↳20995 ↳PUSVAL | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): saves a parameter variable's value on the STACK for FN (from 526AH). |
| 5219H ↳21017 ↳ERR2 | T3 | TRSDOS 1.3 SYS9 (library commands part 2): error 11 (illegal command parameter) through ERRX (5223H, JP 4409H). ERR3 (521DH) gives error 10, ERR9 (5221H) error 2. |
| 521FH ↳21023 ↳ADJUST | T3 | TRSDOS 1.3 SYS5 (DEBUG): read a hex number into HL: Z = nothing typed; NZ = HL holds the value; C = it ended with ENTER or an arrow, NC = with a space or comma. Any other key goes back to START5. |
| 5226H ↳21030 ↳GETTAB | T3 | TRSDOS 1.3 SYS9 (library commands part 2): look C up in the 3 byte entries at HL (number, address): NC and HL = the address, C at the 00H end. |
| 522EH ↳21038 ↳GETFNM | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): finds the variable of an FN name (bit 7 set in its first character) through the ROM's PTRGT2 (2612H). |
| 523AH ↳21050 ↳FNDOER | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): FN (vector 4155H): saves the parameters, binds the arguments, evaluates the DEF FN formula and puts the parameters back. |
| 523EH-525CH ↳21054 ↳TABLE | T3 | TRSDOS 1.3 SYS9 (library commands part 2): 10 entries (LIBCOM number, address): 9 COPY 525DH, 15 DUAL 5F34H, 18 FORMS 5B1FH, 22 KILL 5669H, 26 MASTER 603EH, 27 PATCH 571BH, 31 RELO 5A14H, 33 ROUTE 5B9AH, 34 SETCOM 5C75H, 37 WP 5FD9H; 00H ends it. |
| 5257H ↳21079 ↳RBOOT | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): read the boot gran of the source, keep a copy at 5E00H, refuse a version below 12H, and lower the backup counter on the source (or set CXFLAG at 0); the copy gets 00H. |
| 5258H ↳21080 ↳SKIPSP | T3 | TRSDOS 1.3 SYS11 (library commands part 3: TAPE, PURGE, LIST): moves HL to the next character that is not a space, A = that character (SKIPS1, 525CH, passes the character at HL first). |
| 525DH ↳21085 ↳COPY | T3 | TRSDOS 1.3 SYS9 (library commands part 2): the COPY command: one file to another, a file to a drive, or every file with one extension (COPY /EXT:d :d, through SLANT 55B6H); one drive copies (SINGCP 5357H) ask for the diskettes in turn. |
| 525FH ↳21087 ↳HLDPAT | T3 | TRSDOS 1.3 SYS11 (library commands part 3: TAPE, PURGE, LIST): when @ is pressed (ROM 002BH), waits for ENTER (ROM 0049H). |
| 526FH ↳21103 ↳PDATA | T3 | TRSDOS 1.3 SYS11 (library commands part 3: TAPE, PURGE, LIST): outputs A to the screen (ROM 0033H) and, when LPFLAG (5277H) is not 00H, to the printer (ROM 003BH); a TAB becomes spaces to the next column that is a multiple of 8 (SPACIT, 5A91H). A is kept. |
| 5277H-5278H ↳21111 ↳LPFLAG | T3 | TRSDOS 1.3 SYS11 (library commands part 3: TAPE, PURGE, LIST): self modified operand of LD BC,0000H at 5276H: FFFFH when the LIST option PRT is given (SWITCH stores it). |
| 5286H ↳21126 ↳PRINTT | T3 | TRSDOS 1.3 SYS11 (library commands part 3: TAPE, PURGE, LIST): outputs the text at HL through PDATA up to a 03H (not output) or a 0DH (output). |
| 5293H ↳21139 ↳HEXC | T3 | TRSDOS 1.3 SYS11 (library commands part 3: TAPE, PURGE, LIST): outputs bits 0-3 of A as an ASCII hex digit through PDATA. |
| 529BH ↳21147 ↳GETTAB | T3 | TRSDOS 1.3 SYS6 (library commands part 1): find command number C in TABCOM (52B3H): NC and HL = the routine address, or CARRY when it is not there. |
| 529DH ↳21149 ↳DECBIN | T3 | TRSDOS 1.3 SYS11 (library commands part 3: TAPE, PURGE, LIST): stores A (0-99) as two ASCII digits at HL and HL+1. |
| 52A3H ↳21155 ↳DSPREC | T3 | TRSDOS 1.3 SYS9 (library commands part 2): add 1 to RECCS (52BAH) and show 'Copying Record nnnnn'. |
| 52A9H ↳21161 ↳SYSTEN | T3 | TRSDOS 1.3 SYS11 (library commands part 3: TAPE, PURGE, LIST): TAPE (S=d,D=d) with T, D or R: after the ROM's cassette speed prompt (3042H) goes to DSRC (53BCH, disk to tape), TSRC (54D3H, tape to disk) or TRAM (55ADH, tape into RAM and run). |
| 52B3H-52ECH ↳21171 ↳TABCOM | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the commands of SYS6: 19 entries of the LIBCOM number (1 byte) and the routine address (2 bytes), ended by 00H. APPEND 1, ATTRIB 2, AUTO 3, BUILD 5, CLEAR 6, CLOCK 7, CREATE 10, DATE 11, DIR 13, DO 14, DUMP 16, ERROR 17, FREE 20, LIB 23, LOAD 25, PAUSE 28, PROT 29, RENAME 32, TIME 36. |
| 52B4H ↳21172 ↳RDIR | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): read the directory track of the source into 6200H, put in the destination's flaw table and take out the protected files when CXFLAG is set. |
| 52B9H ↳21177 ↳ENTRY | T3 | TRSDOS 1.3 SYS5 (DEBUG): the transfer address: POP AF takes back the program's AF (pushed by DEBUG at 440DH), then JP 4E00H (START). |
| 52BAH-52BBH ↳21178 ↳RECCS | T3 | TRSDOS 1.3 SYS9 (library commands part 2): the number of the record being copied (FFFFH in the file; COPY0 sets it, DSPREC adds 1). |
| 52BDH ↳21181 ↳TRA | T3 | TRSDOS 1.3 SYS5 (DEBUG): the F command, the disk utility: ask for a filespec, OPEN it into BDCB (5555H) with BUFF1 (4300H), and show one 256 byte record at a time. ; or + next record, - or = previous record, M change bytes (ENTER writes the record back), BREAK asks for a new filespec. |
| 52EDH ↳21229 ↳AUTO | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the AUTO command: copy the command line (padded with spaces to 32 bytes) into the AUTO field at offset E0H of the GAT of the drive given (:d, default 0), write the GAT and show Auto = '...'. |
| 52F2H ↳21234 ↳WDIR | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): write and verify the directory track at 6200H on the destination. |
| 52F3H ↳21235 ↳DISPLY | T3 | TRSDOS 1.3 SYS9 (library commands part 2): show 'Copying ', the source filespec, ' to ' and the destination filespec (PRNTIT 5310H shows each). |
| 52FFH ↳21247 ↳DEF | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): DEF (vector 415BH): DEF FN stores the address of the definition in the FN variable; DEFUSR goes to 5354H. |
| 5301H ↳21249 ↳AUTDRV | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD C at 5300H: the drive of the AUTO command (00H in the file). |
| 5312H ↳21266 ↳EXMGRN | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): take the files with bit 5 of the attribute byte set out of one gran of the directory (DEALOC 5351H, RELEAS 537CH, CLRBIT 53ADH). |
| 5322H ↳21282 ↳USROUT | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): USR hook (41A9H): calls the USRTAB address with Register A = the argument type and Register HL = 4121H. |
| 532AH ↳21290 ↳S9WAIT | T3 | TRSDOS 1.3 SYS9 (library commands part 2): show the message at HL flashing until ENTER is pressed (FSFLAG 54A7H toggles it). |
| 5357H ↳21335 ↳SINGCP | T3 | TRSDOS 1.3 SYS9 (library commands part 2): COPY on one drive: reads as many 256 byte blocks as memory holds from BUFER1 (6300H) up to the memory top held in 4415H, asks for the destination diskette, writes them, and repeats. |
| 5361H ↳21345 ↳S6DATE | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the DATE command: with MM/DD/YY set 421AH-421CH (YEAR, day, MONTH) and DTSAVE (42B7H); without, show the date through MSGPRT. |
| 5366H ↳21350 ↳CHGBMP | T3 | TRSDOS 1.3 SYS5 (DEBUG): NOP in the file; BREADX stores 23H (INC HL) there once a file is opened, so the record number shown counts from 1. |
| 536EH ↳21358 ↳CKPROT | T3 | TRSDOS 1.3 CONVERT/CMD (copies the files of a Model I diskette to a TRSDOS 1.3 diskette): checks the password codes of a directory record (offset 10H update, 12H access; 4296H is a blank password): Z none, NZ update only, CARRY an access password of its own (not converted). |
| 5374H ↳21364 ↳CMD | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): CMD (vector 4173H): dispatch on the first letter of the string: D L P J Z C O X B E T R S A & I; any other gives FC. |
| 53A4H ↳21412 ↳LRLCHG | T3 | TRSDOS 1.3 SYS9 (library commands part 2): self modified operand of LD B at 53A3H: the LRL for the INIT of the single drive copy; OPENIT (59A5H) stores the source file's LRL, 538EH then stores 00H (256). |
| 53ABH ↳21419 ↳S6TIME | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the TIME command: with HH:MM:SS set 4217H-4219H (SECOND, MINUTE, HOUR); without, show the time through MSGPRT. |
| 53B8H ↳21432 ↳CLRBT2 | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): self modified operand of RES 0,B at 53B7H: built by CLRBIT as 80H plus 8 times the bit number. |
| 53BAH ↳21434 ↳MEMCHK | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): move BUFPNT to the next gran record; CARRY when it would start above MEMTOP. |
| 53BCH ↳21436 ↳DSRC | T3 | TRSDOS 1.3 SYS11 (library commands part 3: TAPE, PURGE, LIST): disk to tape: gathers the load module of the file at 5E00H and writes it as a SYSTEM tape (55H, 6 character name, 3CH blocks with checksum, 78H and the transfer address). |
| 53D3H ↳21459 ↳MWRIT | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): write and verify the gran records in the buffer; CARRY when the end mark FFH was reached. |
| 53E2H ↳21474 ↳CLOCK | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the CLOCK command: CHKFLG (5081H in SYS1) reads ON or OFF, then the ROM's CLOCKN (0298H) or CLOCKF (02A1H) sets or clears bit 0 of 4210H. |
| 53EBH-53EDH ↳21483 ↳BIN | T3 | TRSDOS 1.3 SYS6 (library commands part 1): three numbers converted by CONV1: 53EBH year or seconds, 53ECH day or minutes, 53EDH month or hours. |
| 53EEH ↳21486 ↳CONV1 | T3 | TRSDOS 1.3 SYS6 (library commands part 1): convert three two digit numbers at HL, separated by the character in C, into BIN+2, BIN+1, BIN; Z = good, NZ = syntax error. |
| 53FAH ↳21498 ↳FALOC | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the next gran in use of the source from SGAT (6000H): D = track, E = first sector, NC; CARRY at the end. |
| 5403H ↳21507 ↳DECBIN | T3 | TRSDOS 1.3 SYS6 (library commands part 1): two decimal digits at HL into A (0-99); Z = good, NZ = not two digits. |
| 541AH ↳21530 ↳DECCHK | T3 | TRSDOS 1.3 SYS6 (library commands part 1): one character at HL (HL advanced) as a digit: CARRY and A = 0-9, or NC for anything else. |
| 5423H ↳21539 ↳LIB | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the LIB command: show the 6 character names of SYS1's LIBCOM (50C9H), 8 to a line. |
| 5427H ↳21543 ↳LINE | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): LINE INPUT (vector 41A3H); LINE INPUT # goes to DLINE (5AC9H). |
| 5438H ↳21560 ↳MREAD | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): fill the buffer with the grans in use of the source; CARRY (and FFH stored) at the end of the source. |
| 5455H ↳21589 ↳S6PROT | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the PROT command, PROT :d (PW, LOCK): ask for the master password and compare its code with GAT offset CEH (error 25 if wrong). PW asks for a new master password and writes the GAT; LOCK gives every file with protection level 0 the master password's code as update and access password and level 6 (execute only). |
| 545FH ↳21599 ↳NODISK | T3 | TRSDOS 1.3 SYS5 (DEBUG): self modified operand of LD A at 545EH: 00H = the disk utility is editing a record (ENTER writes it), FFH = the M command is editing memory (ENTER returns to DEBUG). |
| 5465H ↳21605 ↳FWAIT | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): flash the prompt at HL until ENTER is pressed (KBD, 002BH), then erase the line (LINOFF, 5488H). |
| 548FH ↳21647 ↳DRV3 | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD C at 548EH: the drive of the PROT command. |
| 5492H ↳21650 ↳CKSRC | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): on a backup with one drive, ask for the source diskette (CKDES 54A5H: the destination; CKSYS 5509H: a system diskette when DATDSK is set). |
| 549AH-549BH ↳21658 ↳INPPAS | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD DE at 5499H: the code of the master password typed. |
| 549BH-54F2H ↳21659 ↳MESMIC | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): MESMIC (the copyright message, CMD"&"&) and PROTMS (Protection has CLEARED Memory): a count byte and the text XOR 55H each, shown by SCRMBL (563FH). |
| 54A3H-54A4H ↳21667 ↳PW | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD DE at 54A2H: the PW option from SWITCH (0000H = not given). |
| 54A6H ↳21670 ↳FLFLAG | T3 | TRSDOS 1.3 SYS9 (library commands part 2): the number of 256 byte blocks of memory a single drive copy uses (536DH). |
| 54A7H ↳21671 ↳FSFLAG | T3 | TRSDOS 1.3 SYS9 (library commands part 2): the flash state of the S9WAIT prompt (toggled at 5343H). |
| 54B9H ↳21689 ↳DGAT | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): read the GAT of the source into 6100H and its allocation bytes into 6000H, read the GAT of the destination, abort when a used track is flawed on the destination and take over its flaw table. |
| 54C3H-54C4H ↳21699 ↳LOCK | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD DE at 54C2H: the LOCK option from SWITCH (0000H = not given). |
| 54D0H ↳21712 ↳COPY0 | T3 | TRSDOS 1.3 SYS9 (library commands part 2): copy one file to another record by record (two drives, and each file of COPY /EXT); the destination is made with the source's LRL (LRLCH1 54E0H). |
| 54D3H ↳21715 ↳TSRC | T3 | TRSDOS 1.3 SYS11 (library commands part 3: TAPE, PURGE, LIST): tape to disk: reads a SYSTEM tape into 5E00H in disk load module form and writes it to NAME/CMD (INIT 4420H, CLOSE 4428H); a bad tape or checksum gives error 11. |
| 54E0H ↳21728 ↳LRLCH1 | T3 | TRSDOS 1.3 SYS9 (library commands part 2): self modified operand of LD B at 54DFH: the LRL of the new file, stored by OPENIT (59A8H) from the source file. |
| 54E9H ↳21737 ↳PROCES | T3 | TRSDOS 1.3 CONVERT/CMD (copies the files of a Model I diskette to a TRSDOS 1.3 diskette): converts one file: asks for the update password (ENTER copies without it), opens the source with ROPEN (57AEH) and the new file with INIT (4420H), asks Use it (Y/N/Q) for an existing file, copies byte by byte (RWLOOP 5478H) and CLOSEs. |
| 54F2H-54F3H ↳21746 ↳PASSW | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD DE at 54F1H: the master password's code, written into the files LOCK protects. |
| 54FDH-54FEH ↳21757 ↳BUFSAV | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD HL at 54FCH: the directory record PROT is looking at (in BUFF1, 4300H). |
| 550AH ↳21770 ↳DATDSK | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): self modified operand of LD A at 5509H (CKSYS): FFH = ask for a system diskette at the end, set by SETDAT (56ABH) for a backup of a data diskette involving drive 0. |
| 5517H ↳21783 | T1 | TRSDOS 2.3 Disk BASIC: BASIC error handler entry point. Processes Disk BASIC runtime errors; called when an error occurs during file I/O operations. |
| 5518H ↳21784 ↳DOLLAR | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the backup: CHKFOR and FOMAT when needed, DGAT, MREAD and MWRIT until the source is done, then RDIR, the new GAT and the date, WDIR. |
| 551AH ↳21786 | T1 | TRSDOS 2.3 Disk BASIC: USR(n) dispatch vector (3 bytes). JP nnnn to the routine that determines which USR function number was called and fetches the appropriate jump address. |
| 551AH ↳21786 ↳MASINP | T3 | TRSDOS 1.3 SYS6 (library commands part 1): read up to 8 characters (ROM 0040H into BUFF1, 4300H) and return their trap door code in HL through TRAP. |
| 551DH ↳21789 | T1 | TRSDOS 2.3 Disk BASIC: PTRFIL zero and file close vector (3 bytes). JP nnnn to the routine that zeroes PTRFIL and closes the currently open disk file. |
| 5520H ↳21792 | T1 | TRSDOS 2.3 Disk BASIC: disk INPUT check vector (3 bytes). JP nnnn to the routine that determines whether an INPUT request should come from a disk file. |
| 5523H ↳21795 | T1 | TRSDOS 2.3 Disk BASIC: direct statement dispatch vector (3 bytes). JP nnnn to the routine that dispatches direct statement execution under Disk BASIC. |
| 5526H ↳21798 | T1 | TRSDOS 2.3 Disk BASIC: line insertion preparation vector (3 bytes). JP nnnn to the routine that prepares for inserting a new program line. |
| 552CH ↳21804 | T1 | TRSDOS 2.3 Disk BASIC: close all files vector (3 bytes). JP nnnn to the routine that closes all open disk files (CLSALL at 61A5H). |
| 552FH ↳21807 | T1 | TRSDOS 2.3 Disk BASIC: zero PTRFIL and return vector (3 bytes). JP nnnn — zeroes PTRFIL and RETurns to the ROM BASIC caller. |
| 5532H ↳21810 | T1 | TRSDOS 2.3 Disk BASIC: character output to disk file vector (3 bytes). JP nnnn to the output character routine at 5A21H. |
| 5535H ↳21813 | T1, N1 | TRSDOS 2.3 Disk BASIC: LINE INPUT from disk vector (3 bytes). JP nnnn to the LINE INPUT disk handler at 5A30H. |
| 5538H ↳21816 ↳LRUN | T1, N1 | TRSDOS 2.3 Disk BASIC: LRUN command vector (3 bytes). JP nnnn — Load and RUN a program from disk. Entry point for the LRUN command. |
| 553BH ↳21819 | T1 | TRSDOS 2.3 Disk BASIC: cassette vs. disk I/O check vector (3 bytes). JP nnnn to the routine that determines whether the current command targets cassette or disk I/O. |
| 553EH ↳21822 | T1 | TRSDOS 2.3 Disk BASIC: CRLF destination check vector (3 bytes). JP nnnn to the routine that determines whether CRLF output goes to disk or printer. |
| 5544H ↳21828 | T1 | TRSDOS 2.3 Disk BASIC: disk I/O processing vector (3 bytes). JP nnnn to the main disk I/O dispatch routine. |
| 5547H ↳21831 | T1 | TRSDOS 2.3 Disk BASIC: INPUT#n check vector (3 bytes). JP nnnn to the routine that checks whether an INPUT statement is actually INPUT#n (file input). |
| 554DH ↳21837 | T1 | TRSDOS 2.3 Disk BASIC: sequential read setup vector (3 bytes). JP nnnn to the routine that sets up state for reading a sequential item from a disk file. |
| 554FH-5550H ↳21839 ↳WHERE | T3 | TRSDOS 1.3 SYS5 (DEBUG): the address of the byte being edited (4300H in the file). |
TRSDOS 2.3 Library Commands Overlay – SYS6 (5200H–6FFFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 5551H-5570H ↳21841 | T1 | TRSDOS 2.3 SYS6: primary parsed filespec buffer (32 bytes, 5551H–5570H). Holds the first NAME/EXT.PASSWORD:DRIVE filespec after parsing by SYS1. Used by all two-filespec library commands. |
| 5551H-5552H ↳21841 ↳CURSA | T3 | TRSDOS 1.3 SYS5 (DEBUG): the screen address of the byte being edited (3C00H in the file); CHECK stores it, GETKEY copies it into CURSOR (4020H). |
| 5553H ↳21843 ↳MOVFLG | T3 | TRSDOS 1.3 SYS5 (DEBUG): 00H = no edit block; not zero = CHECK draws the block at WHERE. |
| 5555H-5562H ↳21845 ↳BDCB | T3 | TRSDOS 1.3 SYS5 (DEBUG): the DCB of the disk utility's file (the file holds offsets 00H-0DH): DRV 555BH (offset 06H), NRN 555FH-5560H (offset 0AH, the record shown), ERN 5561H-5562H (offset 0CH). KEYN first reads the filespec into it. |
TRSDOS 2.3 Disk BASIC (BASIC/CMD) Variables and Jump Table (5200H–6575H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 5556H ↳21846 ↳PUSVAL | T1, N1 | TRSDOS 2.3 Disk BASIC: DEF FN handler (PUSVAL). Processes user-defined function calls. Entry point for the DEF FN evaluation mechanism. |
| 555FH ↳21855 ↳TRAP | T3 | TRSDOS 1.3 SYS6 (library commands part 1): pad the password typed (HL, B characters) with spaces to 8 and compute its trap door code into HL (never 0000H): the same algorithm as SETTDC in SYS2 (5107H). |
| 5560H ↳21856 ↳BPREP | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): read the HIT and the GAT of the source, check the master password (GAT offset CEH) against PTRAP, show the drives and run DOLLAR. |
| 5565H-5566H ↳21861 ↳SAVE3 | T3 | TRSDOS 1.3 SYS9 (library commands part 2): pointer to the directory record SLANT0 is on in the sector buffer at 4300H. |
| 5567H ↳21863 ↳S9TRK | T3 | TRSDOS 1.3 SYS9 (library commands part 2): the directory sector GETDIR (5568H) reads next; SLANT0 starts it at 3. |
| 5568H ↳21864 ↳GETDIR | T3 | TRSDOS 1.3 SYS9 (library commands part 2): read directory sector S9TRK of the drive into 4300H (TRKGET 4B3EH, XREAD 4675H). |
TRSDOS 2.3 Library Commands Overlay – SYS6 (5200H–6FFFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 5571H-5590H ↳21873 | T1 | TRSDOS 2.3 SYS6: secondary parsed filespec buffer (32 bytes, 5571H–5590H). Holds the second filespec for two-operand commands (COPY, APPEND, RENAME). Populated by the second pass of the filespec parser. |
TRSDOS 1.3 SYS13 BASIC Variable Storage (5587H–558AH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 5587H ↳21895 ↳YR | T3 | TRSDOS 1.3 SYS13: BASIC year storage. Used by the CMD"J" Julian-date conversion (SYS13 RETJUL/RETDAT routines) to hold the 2-digit year (00-99) read from the user's calendar-date string. Written via LD (YR),A at 4F1D and 4F9B; read via LD A,(YR) at 4FBC, 500D and 5066. Persistent in BASIC's workspace because BASIC stays resident; SYS13 is the transient overlay that uses it. Defined as YR EQU 5587H in BASIC.GBL. |
| 5588H ↳21896 ↳MT | T3 | TRSDOS 1.3 SYS13: BASIC month storage. Used by the CMD"J" Julian-date conversion (SYS13 RETJUL/RETDAT routines) to hold the month value (1-12). Written via LD (MT),A at 4F07, 4FCE, 500A, and 5028; read via LD A,(MT) at 4F2B, 4F37, 5014, 5024, 5037, and 5048. Persistent in BASIC's workspace because BASIC stays resident; SYS13 is the transient overlay that uses it. Defined as MT EQU 5588H in BASIC.GBL. |
| 5589H ↳21897 ↳DY | T3 | TRSDOS 1.3 SYS13: BASIC day storage. Used by the CMD"J" Julian-date conversion (SYS13 RETJUL/RETDAT routines) to hold the day-of-month value (1-31). Written via LD (DY),A at 4F12, 4FD3, 5003, 501F, 5033, and 5040; read via LD A,(DY) at 4F45, 501B, and 5058. Persistent in BASIC's workspace because BASIC stays resident; SYS13 is the transient overlay that uses it. Defined as DY EQU 5589H in BASIC.GBL. |
| 558AH-5593H ↳21898 ↳RTEMP | T3 | TRSDOS 1.3 SYS13: BASIC temporary ASCII-date storage (RTEMP DEFS 10: 10 bytes, 558AH-5593H). Used by SYS13's date-conversion routines as the staging area for the formatted ASCII output. For Julian (CMD"J" forward), 3 bytes of ASCII Julian day are placed here at 4F54 and copied from here to the user's string variable at 4F85 via LDIR. For Gregorian (CMD"J" reverse), the three calls of MOVIT (5054, 5062, 5070) place MM/DD/YY/ here (9 bytes: MOVIT adds a / after each field, so the last / lands at 5592H), and an LDIR at 509A copies the first 8 bytes to the user's string variable. Persistent in BASIC's workspace because BASIC stays resident; SYS13 is the transient overlay that uses it. Defined as RTEMP EQU 558AH in BASIC.GBL. |
| 559FH ↳21919 ↳RENAME | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the RENAME command: open the old file, check its access level (0-2), build the new filespec on the same drive, make sure it does not exist, then write the new name into the directory record and its new hash code into the HIT. |
| 55ADH ↳21933 ↳TRAM | T3 | TRSDOS 1.3 SYS11 (library commands part 3: TAPE, PURGE, LIST): tape into RAM: loads a SYSTEM tape to its load addresses (error 35 when a byte does not stay) and jumps to the transfer address, or returns when it is 0000H. |
| 55CCH ↳21964 ↳GETSRC | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the source drive from the command line (:d) or a prompt; GETDES (55F4H) the destination, GETFOR (5626H) the drive to format, both through GETDE3 (560EH: FDRIVD, FDRIVE, SINGLE). |
| 55E8H ↳21992 ↳SLANT0 | T3 | TRSDOS 1.3 SYS9 (library commands part 2): the directory loop of COPY /EXT and KILL /EXT: for every file with the extension asked for, build its filespec and CALL the routine whose address is in TOTCHG+1 (5649H). |
| 55F4H ↳22004 ↳CMPRES | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): CMD"C": Register E = 2 (no option), 1 (,R) or 0 (,S), then SYSS12 (4281H). |
TRSDOS 2.3 Library Commands Overlay – SYS6 (5200H–6FFFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 5600H-56FFH ↳22016 | T1 | TRSDOS 2.3 SYS6: primary FCB work area (256 bytes, 5600H–56FFH). File Control Block for the primary file used by library commands (COPY, LIST, PRINT, DIR, etc.). |
| 5600H ↳22016 ↳ENDBUG | T3 | TRSDOS 1.3 SYS5 (DEBUG): assembly constant, the lowest address the D and M commands accept and the display can reach. |
| 5600H-97FFH ↳22016 ↳BUFFR | T3 | TRSDOS 1.3 XFERSYS/CMD (puts TRSDOS 1.3 from drive 0 on a version 1.1 or 1.2 diskette in drive 1): BUFFR 5600H (the boot sector of drive 1, then the copy of the HIT of drive 0), SBUFF 5700H and DBUFF 5800H (the sector buffers of the two DCBs); MOVE reads up to 66 sectors from 5600H on, up to 97FFH, before it writes them to drive 1. |
| 560DH ↳22029 ↳PURGE | T3 | TRSDOS 1.3 SYS11 (library commands part 3: TAPE, PURGE, LIST): PURGE [*][:d] [(SYS,INV,ALL)]: checks the master password against GAT offset CEH (error 25), offers the system files with * (PURSYS, 57D4H), then offers each user file of the HIT with (Y/N/Q) and kills it on Y (OPEN with SCAFLG set, access level 0, KILL 442CH). |
| 5610H ↳22032 ↳DOSORT | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): CMD"O",n%,A$(i): the count into BASIC1 (4272H) and the descriptor address into BASIC2 (4274H), then SSYS13 (4284H). |
| 563DH ↳22077 ↳MOVNAM | T3 | TRSDOS 1.3 SYS6 (library commands part 1): copy the text at DE to HL up to a control character and end the copy with 03H. |
| 5645H ↳22085 ↳INPUT | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): show the prompt at HL and read up to B characters into NAMBUF (4EA1H); BREAK goes to ABORT (4030H). |
| 5649H-564AH ↳22089 ↳TOTCHG+1 | T3 | TRSDOS 1.3 SYS9 (library commands part 2): self modified operand of CALL at 5648H: 54D0H (COPY0) as loaded and for COPY (5261H), 5692H (KILLIT) for KILL (568CH). |
| 564AH ↳22090 ↳DSPNAM | T3 | TRSDOS 1.3 SYS6 (library commands part 1): show NAME1 ' ----> ' NAME2 and a new line. |
| 5653H ↳22099 ↳MREAD | T3 | TRSDOS 1.3 CONVERT/CMD (copies the files of a Model I diskette to a TRSDOS 1.3 diskette): reads track D, sector E of drive C of the source diskette into HL in single density by polling the FDC (Read Address to set the track register, Seek, Read Sector), 9 tries; error 1 or 4. |
| 565AH ↳22106 ↳GETPAS | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): read a password (GETPSF 5652H for FORMAT, GETPSB 5657H for BACKUP) and store its trap door code into PTRAP. |
| 5666H-5685H ↳22118 ↳NAME1 | T3 | TRSDOS 1.3 SYS6 (library commands part 1): NAME1 (5666H) and NAME2 (5676H): 16 bytes each for the two filespecs of RENAME, for the display. Not in the file. |
| 5666H ↳22118 ↳GETNAM | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): read the diskette name, pad it to 8 characters and put it into NAMEBF (4E98H). |
| 5669H ↳22121 ↳S9KILL | T3 | TRSDOS 1.3 SYS9 (library commands part 2): the KILL command: one file (OPEN 4424H, KILL 442CH) or every file with one extension through SLANT0; shows 'Killing ' and the filespec. |
| 568EH ↳22158 ↳APPEND | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the APPEND command: add the bytes of the first file to the end of the second (both LRL bytes must match; error 'LRL of Files Do NOT Match'); BREAK stops it. |
| 5693H ↳22163 ↳CLRGAT | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): clear 6000H-61FFH and mark the boot gran (6100H = 01H) and the directory track (6111H = 3FH) in the new GAT. |
| 56A2H-56A3H ↳22178 ↳BUFPNT | T3 | TRSDOS 1.3 SYS11 (library commands part 3: TAPE, PURGE, LIST): self modified operand of LD HL,5D00H at 56A1H: the pointer into the copy of the HIT at 5D00H. |
| 56B1H ↳22193 ↳CHKFOR | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): look at the destination: NZ = format it (not readable, or BACKUP answered Y to RE-FORMAT); a diskette with files asks 'Use Disk or not?'. |
| 56D5H-56D6H ↳22229 ↳ADD1 | T3 | TRSDOS 1.3 SYS9 (library commands part 2): the PATCH ADD= address (5771H); COPY keeps the source file's LRL in its first byte (5384H). |
| 56D7H-56F6H ↳22231 ↳FIND | T3 | TRSDOS 1.3 SYS9 (library commands part 2): the PATCH FIND= bytes (a length byte, then the bytes; not in the file); COPY keeps the low byte of the source ERN in its first byte (5394H). |
| 56F7H-5716H ↳22263 ↳CHAG99 | T3 | TRSDOS 1.3 SYS9 (library commands part 2): the PATCH CHG= bytes (a length byte, then the bytes; not in the file). |
| 5700H ↳22272 ↳DUMP | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the DUMP command, DUMP file (START=,END=,TRA=,RELO=): write memory START-END (START 6000H or above) as a load module: a header record (05H) with the name and the date, load records (01H) of up to 254 bytes, and the transfer address record (02H); default extension CMD. |
| 5703H ↳22275 ↳OCTCNS | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): &H (up to 4 hexadecimal digits) and &O or & (octal) constants (vector 4194H); the value goes into the FAC as an integer. |
| 5717H ↳22295 ↳CHGFLG | T3 | TRSDOS 1.3 SYS9 (library commands part 2): 00H; not zero once PATCH has made the change (586CH). |
| 5718H ↳22296 ↳FNDFLG | T3 | TRSDOS 1.3 SYS9 (library commands part 2): 00H; not zero once PATCH has found the ADD= address in the file (5844H). |
| 5719H-571AH ↳22297 ↳ERNSAV | T3 | TRSDOS 1.3 SYS9 (library commands part 2): the ERN of the file PATCH works on (57FAH); not read again. |
| 571BH ↳22299 ↳PATCH | T3 | TRSDOS 1.3 SYS9 (library commands part 2): the PATCH command: ADD=, FIND= and CHG= in a load module file, or in a system file (PATCH *n, HSYS 58FEH); shows 'Patch Made', 'String NOT Found', 'Can't Find Specified Address' or 'NO Change Required'. |
| 5728H ↳22312 ↳COMON | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): save the command line pointer in CSAVE, set MEMTOP and run CLRGAT; DOTITL (5714H) shows the title. |
| 5739H ↳22329 ↳BACKP | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the BACKUP command (entry 1, request 97H). |
| 5759H ↳22361 ↳DLHSMD | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): MID$(v$,n[,m]) = string (hook 41D9H); a string in the program text is first copied into string space. |
| 575AH ↳22362 ↳COMPRS | T3 | TRSDOS 1.3 SYS11 (library commands part 3: TAPE, PURGE, LIST): builds NAME/EXT:d and 03H in SDCB1 (5BA2H) from the directory record at HL. |
| 5762H ↳22370 ↳FRMAT | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the FORMAT command (entry 2, request A7H). |
| 57A1H ↳22433 ↳BEGIN | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the entry point: clear bit 4 of OVLFLG (SYS6 not resident), CFLAG = 55H, TRY1 and TRY2 = 2, then FRMAT for entry 2 or BACKP for entry 1; any other entry returns. |
| 57A4H ↳22436 ↳TRAP | T3 | TRSDOS 1.3 SYS11 (library commands part 3: TAPE, PURGE, LIST): the 2 byte trap door code of the 8 character password at DE, in HL (never 0000H). |
| 57AEH ↳22446 ↳ROPEN | T3 | TRSDOS 1.3 CONVERT/CMD (copies the files of a Model I diskette to a TRSDOS 1.3 diskette): opens a file of the source diskette: CRACK splits the spec, HASH finds it in the HIT, the name is compared with the directory record and SETDCB (583EH) fills the DCB (extents at DCB+0EH, extended records followed). |
| 57B1H-57B2H ↳22449 ↳START | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD HL at 57B0H (RELO1): the START address of DUMP (6000H by default). |
| 57B5H-57B6H ↳22453 ↳RELO | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD IY at 57B3H: the load address DUMP writes for the first byte (START when RELO= is not given). |
| 57BBH-57BCH ↳22459 ↳END | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD HL at 57BAH: the END address of DUMP. |
| 57C3H ↳22467 ↳TRAP | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): pad the password at HL (B characters) with spaces to 8 and compute its trap door code into HL (never 0000H). |
| 57D4H ↳22484 ↳PURSYS | T3 | TRSDOS 1.3 SYS11 (library commands part 3: TAPE, PURGE, LIST): asks 'System Files:d (Y/N/Q) ?'; on Y sets the system file pointers of the HIT (43E0H-43FFH) to FFH, frees the system tracks in the GAT and writes SYST (5F00H) to track 0, sector 2. |
| 57DAH ↳22490 | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): line input hook (41AFH): with PTRFIL set it reads the line from the file (ISFILE 57E4H), else for the main loop it runs the command mode line editor at 587CH (arrow keys, period, comma; L, E, D, A expanded to LIST, EDIT, DELETE, AUTO). |
| 5800H-5801H ↳22528 ↳TRA | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD HL at 57FFH: the transfer address DUMP writes (402DH by default). |
| 5803H ↳22531 ↳FOMAT | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): format the destination: Restore, wait for the index pulse and track 0, FORM, Restore, BOTWRI. |
| 581CH ↳22556 ↳PUTIT | T3 | TRSDOS 1.3 SYS6 (library commands part 1): INC (IX) then write A to the file at DE (ROM PUT, 001BH). DUMP loads IX with DCOUNT (5845H) only when RELO= is not given. |
| 5836H ↳22582 ↳BCKFLG | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): self modified operand of LD A at 5835H: 0FH when BACKUP formats the destination (DOLLAR), 00H for FORMAT. |
| 5845H ↳22597 ↳DCOUNT | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the count of the bytes PUTIT writes (when IX points here); DUMP then writes that many E5H bytes before it closes the file. Its 00H also ends SWTCH7. |
| 5846H-584EH ↳22598 ↳NAMFIL | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the 8 character file name for the DUMP header (and a ninth byte). |
| 584FH ↳22607 ↳LOAD | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the LOAD command: load the program file into memory without running it (LDPGM, 4430H) and return to TRSDOS Ready (402DH). |
| 5853H-5952H ↳22611 ↳BOOT | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the boot sector BOTWRI writes to track 0, sector 1, assembled to run at 4300H (ENT); the backup counter CNT1 is at 5875H. |
| 585EH ↳22622 ↳ATTRIB | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the ATTRIB command, ATTRIB file (I or N, ACC=, UPD=, PROT=): needs access level 0; sets or clears the invisible bit, the protection level (EXEC, READ, WRITE, NAME, KILL, FULL; without PROT= the level becomes 0) and the access and update password codes in the directory record. |
| 5868H-587BH ↳22632 ↳USRTAB | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): USRTAB, 20 bytes: the addresses of USR0-USR9, 1E4AH (FCERR) until DEFUSR sets them. |
| 58BFH-58CBH ↳22719 ↳PSYS | T3 | TRSDOS 1.3 SYS11 (library commands part 3: TAPE, PURGE, LIST): PURGE variables: PSYS, PINV, PALL (2 bytes each, FFFFH when the option is given), STAR (58C5H, 2AH for *), PUDRV (58C6H, ':0' and 03H), PDRV (58C9H, the drive), PW (58CAH, the code of the password typed). |
| 58CCH ↳22732 ↳LIST | T3 | TRSDOS 1.3 SYS11 (library commands part 3: TAPE, PURGE, LIST): LIST filespec [(ASCII,SLOW,PRT)]: shows the file as text (ASCII) or each record in rows of 60 bytes as characters, high and low hex digits, under a heading kept by SCRLCT (4214H); ends with 'EOF' at error 28 or 29. |
| 5944H ↳22852 ↳GETEND | T3 | TRSDOS 1.3 SYS6 (library commands part 1): move to the '=' of an ATTRIB option and copy its value into PWORD (5139H in SYS2): Z = no value, NZ = a value. |
| 5953H-5A52H ↳22867 ↳SYST | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the sector BOTWRI writes to track 0, sector 2: a load module of NOSYS (5957H, run address 4D00H). |
| 597BH ↳22907 ↳STAT | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD D at 597AH: ATTRIB's options given: bit 0 PROT=, bit 1 ACC=, bit 2 UPD=. |
| 5981H ↳22913 ↳STAT1 | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of OR at 5980H: the new protection level. |
| 5983H ↳22915 ↳ISTAT | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of OR at 5982H: 08H when I (invisible) was given. |
| 5985H ↳22917 ↳ISTAT1 | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of AND at 5984H: F7H when N (not invisible) was given, else FFH. |
| 599AH ↳22938 ↳SYSFLG | T3 | TRSDOS 1.3 SYS9 (library commands part 2): 00H; FFH while PATCH works on a system file (595CH). |
| 599BH ↳22939 ↳OPENIT | T3 | TRSDOS 1.3 SYS9 (library commands part 2): OPEN the file of DCB S9DCB1 (6162H) with BUFER1 (6300H) and store its LRL into LRLCHG (53A4H) and LRLCH1 (54E0H). |
| 59AFH-59BCH ↳22959 ↳INDEX | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the level names of ATTRIB: EX 6, RE 5 (REN = RENAME, 2), WR 4, 7E7EH (no level 3), NA 2, KI 1, FU 0. |
| 59BDH ↳22973 ↳LEGAL | T3 | TRSDOS 1.3 SYS6 (library commands part 1): NC when A is 0-9 or A-F, else CARRY. Not called in SYS6. |
| 59C9H ↳22985 ↳SYSGO | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): CMD"S" (CARRY clear: JP 402DH) and CMD"A" (CARRY set: JP 4030H): BASICG FFH, DOPROT into PROSAV, 4204H back to 4030H, CLSALL. |
| 59CBH ↳22987 ↳LEAL | T3 | TRSDOS 1.3 SYS6 (library commands part 1): NC when A is 0-9 or A-Z, else CARRY. Called by DUMP. |
| 59D9H ↳23001 ↳DIR | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the DIR command, DIR :d (SYS, INV, PRT): show the disk name and date, then for each file the name, attributes (I or N, S or *, X/U/A/B for the passwords, the level), LRL, records, grans, extents, EOF byte and creation date, and the free grans. |
| 5A14H ↳23060 ↳RELO | T3 | TRSDOS 1.3 SYS9 (library commands part 2): the RELO command: rewrite the load addresses of a load module file so that it loads at the ADD= address (the difference is kept in SAVE, 5B1BH). |
| 5A18H ↳23064 ↳DSPROW | T3 | TRSDOS 1.3 SYS11 (library commands part 3: TAPE, PURGE, LIST): shows B bytes from HL in three lines (characters, high digits, low digits) and a line of dashes; returns Z when the end of the 256 byte buffer was reached. |
| 5A27H-5A28H ↳23079 ↳RLADD | T3 | TRSDOS 1.3 SYS9 (library commands part 2): self modified operand of LD HL at 5A26H: the RELO ADD= address, stored by SWITCH (4454H) through the table RLTABL (5B12H). |
| 5A33H ↳23091 ↳XOPEN | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): XOPEN calls OPEN (4424H), XINIT (5A38H) calls INIT (4420H); ZOPEN then copies DOPROT and PROTFL into PROSAV (426FH). |
| 5A4DH-5A4EH ↳23117 ↳LPFLAG | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD BC at 5A4CH: the PRT option of DIR and FREE (not 0000H = print as well); PDATA and PRT2 read it. |
| 5A53H ↳23123 ↳BOTWRI | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): write the boot sector, the NOSYS sector, the GAT (6100H) and the empty HIT and directory sectors (5F00H). |
| 5A59H ↳23129 ↳FILSCN | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): FILSCN reads [#]n, FILFRM (5A63H) makes it a byte, FILIDX (5A66H) checks it against MAXFIL (Bad file number) and returns Register BC = the data block from FILPTR and Register A = its mode (Z when closed). |
| 5A69H ↳23145 ↳S6DLFN | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD B at 5A68H: the first directory record of the next sector DIR reads (steps of 5 up to 80). |
| 5A6BH ↳23147 ↳S6DDRV | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD C at 5A6AH: the drive of the DIR command. |
TRSDOS 2.3 Disk BASIC (BASIC/CMD) Variables and Jump Table (5200H–6575H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 5A77H-5B76H ↳23159 ↳DIRTMP | T1 | TRSDOS 2.3 Disk BASIC: variable storage area base (DIRTMP). 00H flag byte followed by 255 bytes of workspace (5A78H–5B76H). Used as a temporary directory/work buffer by Disk BASIC I/O routines. |
| 5A88H-5A89H ↳23176 ↳PNTBUF | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD HL at 5A87H: the record's byte in DIR's copy of the HIT at 4D00H. |
| 5AA5H-5AA6H ↳23205 ↳SYS | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD DE at 5AA4H: the SYS option of DIR (0000H = system files are not shown). |
| 5AA5H ↳23205 ↳PRTHED | T3 | TRSDOS 1.3 SYS11 (library commands part 3: TAPE, PURGE, LIST): writes the LIST heading ('File = ', 'LRL = ', 'REC = ') on the top line of the screen and puts the cursor back. |
| 5AB0H ↳23216 ↳TRKWRT | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): write the track image at HL with Write Track (F0H); it ends through the NMI (BORNMI). |
| 5AB3H-5AB4H ↳23219 ↳S6INV | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD DE at 5AB2H: the INV option of DIR (0000H = invisible files are not shown). |
| 5AEEH ↳23278 ↳VERFIT | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): read back sectors 1-18 of the track just written: Z = all read. |
| 5AFFH ↳23295 ↳SDRIVE | T3 | TRSDOS 1.3 CONVERT/CMD (copies the files of a Model I diskette to a TRSDOS 1.3 diskette): the source drive (binary); 5B00H (DDRIVE) the destination drive. Not in the file. |
| 5B01H ↳23297 ↳MOVFLG | T3 | TRSDOS 1.3 CONVERT/CMD (copies the files of a Model I diskette to a TRSDOS 1.3 diskette): FFH when only ENTER was pressed for the password: PROCE4 then writes the update password code (5CEFH for a blank one) and the attribute byte into the new directory record. Not in the file. |
| 5B02H-5B03H ↳23298 ↳FILPNT | T3 | TRSDOS 1.3 CONVERT/CMD (copies the files of a Model I diskette to a TRSDOS 1.3 diskette): the next HIT entry (5E00H-5EFFH), walked a column at a time; 5B04H (FILCNT) the entries left from 64, 5B05H (LFNCNT) the directory record that goes with it. Not in the file. |
| 5B04H-5B0BH ↳23300 ↳RCNUM | T3 | TRSDOS 1.3 SYS11 (library commands part 3: TAPE, PURGE, LIST): LIST variables: RCNUM (records shown), ASCFLG (5B06H), SLWFLG (5B08H), DATA1 (5B0AH, not used). |
| 5B07H-5B08H ↳23303 ↳PWSAVE | T3 | TRSDOS 1.3 CONVERT/CMD (copies the files of a Model I diskette to a TRSDOS 1.3 diskette): the update password code of the file being converted. Not in the file. |
| 5B1BH ↳23323 ↳FSVSEC | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): self modified operand of LD E at 5B1AH: the sector VERFIT reads. |
| 5B1BH-5B1CH ↳23323 ↳SAVE | T3 | TRSDOS 1.3 SYS9 (library commands part 2): RELO: the ADD= address minus the old load address (not in the file). |
| 5B1DH-5B1EH ↳23325 ↳SAVE1 | T3 | TRSDOS 1.3 SYS9 (library commands part 2): RELO: the end of the rebuilt file in BUFER2 (not in the file). |
| 5B1FH ↳23327 ↳FORMS | T3 | TRSDOS 1.3 SYS9 (library commands part 2): the FORMS command: WIDTH= and LINES= for the printer, through SWITCH and the table FORCOM (5B5FH). |
| 5B31H-5B62H ↳23345 ↳DCBR | T3 | TRSDOS 1.3 CONVERT/CMD (copies the files of a Model I diskette to a TRSDOS 1.3 diskette): the DCB of the source file (50 bytes); 5B63H-5B94H (DCBW) the DCB of the new file; their buffers 5B95H and 5C95H. Not in the file. |
| 5B35H ↳23349 ↳STEPR | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): step the head in one track and store the track (C) into SEKTRK (445BH) for the drive. |
| 5B44H-5B45H ↳23364 ↳CHAR | T3 | TRSDOS 1.3 SYS9 (library commands part 2): self modified operand of LD HL at 5B43H: the FORMS WIDTH= value (cleared at 5B22H, stored by SWITCH). |
| 5B51H-5B52H ↳23377 ↳FLINE | T3 | TRSDOS 1.3 SYS9 (library commands part 2): self modified operand of LD HL at 5B50H: the FORMS LINES= value (cleared at 5B26H, stored by SWITCH). |
| 5B55H ↳23381 ↳ASCII | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): Register A (0-99) as two decimal digits at HL. |
| 5B77H-5B8AH ↳23415 ↳USRTAB | T1 | TRSDOS 2.3 Disk BASIC: DEF USR jump vector table (USRTAB, 20 bytes, 5B77H–5B8AH). Ten 2-byte vectors (USR 0–9), each initialized to 4A 1EH (JP 1E4AH, BASIC error "FC ERROR"). Overwritten by DEF USR n=addr. |
| 5B89H ↳23433 ↳LRL2 | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD A at 5B88H: the LRL byte of the file DIR shows. |
| 5B8BH ↳23435 ↳MAXTRK | T1 | TRSDOS 2.3 Disk BASIC: GET/PUT direction flag (MAXTRK, 1 byte). 00H = GET (read); non-zero = PUT (write). Set by the GET/PUT command handlers at 6354H. |
| 5B8CH ↳23436 ↳DSKERR | T1 | TRSDOS 2.3 Disk BASIC: disk error code (DSKERR, 1 byte). Holds the most recent TRSDOS error code returned by a disk SVC call. Tested by error handling routines throughout Disk BASIC. |
| 5B8DH-5B8EH ↳23437 ↳PTRFIL | T1 | TRSDOS 2.3 Disk BASIC: file pointer / I/O mode flag (PTRFIL, 2 bytes, 5B8DH–5B8EH). Multi-purpose: tracks address of the file DCB in use; also signals whether the current command requires disk I/O vs. keyboard I/O. 0000H = no disk file active. |
| 5B8DH ↳23437 ↳PCHANG | T3 | TRSDOS 1.3 SYS9 (library commands part 2): self modified operand of LD A at 5B8CH (PDATA2): 2CH (comma); SETCOM stores 20H (5CF1H). |
| 5B8FH ↳23439 ↳FILPTR | T1 | TRSDOS 2.3 Disk BASIC: file block pointer table (FILPTR, up to 30 bytes). Table of 2-byte DCB (Device Control Block) pointers, one per open file (files 1 through max FILES). Each pair points to the FCB/DCB for that file number. Indexed by the file number from OPEN/GET/PUT/CLOSE etc. |
| 5B90H ↳23440 ↳S6EOF | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD L at 5B8FH: the EOF byte of the file DIR shows. |
| 5B9AH ↳23450 ↳ROUTE | T3 | TRSDOS 1.3 SYS9 (library commands part 2): the ROUTE command: LD A,1FH / JP 4409H, error 31 (Program not found); the rest of the ROUTE code (5B9FH-5C74H) is never reached. |
| 5BA2H-5C01H ↳23458 ↳SDCB1 | T3 | TRSDOS 1.3 SYS11 (library commands part 3: TAPE, PURGE, LIST): two 48 byte DCBs, SDCB1 and SDCB2 (5BD2H), not in the file. |
| 5BB5H-5C1EH ↳23477 ↳TRKNN | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the track building table: TRKNN (three parts), DDST, the entries (count and byte; FFFFH copies the text '(c) 1980 Tandy '), DDTRK (5BD3H, the track), DDSID (5BD6H, the side), DDSEC (5BD9H, the sector), SECTAB (5C0AH, the sector order 1, 4, 7 ... 18) and CSECTB (5C1DH). |
| 5BBBH ↳23483 ↳LOAD | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): LOAD "file"[,R] (vector 4188H); RUN "file" enters at LRUN (5BB3H). A file starting with FFH is a compressed program, read into memory at once (BINLOD 5BFEH); otherwise the ROM reads its lines through the 41AFH hook. |
| 5BCCH ↳23500 ↳SAVMTH | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD A at 5BCBH: the month the file was created. |
| 5BD4H ↳23508 ↳SAVYR | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD A at 5BD3H: the year the file was created. |
| 5C06H ↳23558 ↳INIT | T1 | TRSDOS 2.3 Disk BASIC: program start / ORG entry point (INIT). Cold-start initialization: validates DOS version compatibility, sets up the Disk BASIC vector table, asks FILES? and MEMORY SIZE? questions, then transfers to the Level II BASIC main loop. |
| 5C1FH ↳23583 ↳TRKIMG | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): build the image of track C (7010 bytes) at 6200H from the table (TBLBMP 5C7BH, EXPAND 5C8CH). |
| 5C4DH ↳23629 ↳SAVEA | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): self modified operand of LD A at 5C4CH: the track TRKIMG is building. |
| 5C75H ↳23669 ↳SETCOM | T3 | TRSDOS 1.3 SYS9 (library commands part 2): the SETCOM command: shows the RS-232 settings, sets them from SETCOM (BAUD=, WORD=, STOP=, PARITY=, WAIT, NOWAIT), sets the defaults for SETCOM () or turns the RS-232 off for SETCOM (OFF), through 41F8H-41FAH and the ROM's 005AH. |
| 5C90H ↳23696 ↳SAVE | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): SAVE "file" writes FFH and the program from TXTTAB to VARTAB; SAVE "file",A lists it to the file in ASCII. |
| 5C98H ↳23704 ↳PTCMD | T1 | TRSDOS 2.3 Disk BASIC: re-entry flag (PTCMD, 1 byte). Non-zero (typically '*') = BASIC is being restarted with preserved parameters; 00H = fresh start. Set by CMD"R" (restart BASIC). |
| 5C99H-5C9AH ↳23705 ↳SVTXTT | T1 | TRSDOS 2.3 Disk BASIC: saved BASIC program start address (SVTXTT, 2 bytes). Saved on BASIC entry from the ROM's TXTTAB variable; restored on CMD"R" re-entry to resume at the same program location. |
| 5C9BH-5C9CH ↳23707 ↳FILSVS | T1 | TRSDOS 2.3 Disk BASIC: saved FILES count (FILSVS, 2 bytes). Stores the answer to the HOW MANY FILES? question for CMD"R" re-entry. Initialized from 408EH (MAXFIL) on first entry. |
| 5C9DH-5C9EH ↳23709 ↳OLSTTP | T1 | TRSDOS 2.3 Disk BASIC: saved string storage top (OLSTTP, 2 bytes). Stores the lowest address available for string storage (top of free memory) on BASIC entry; restored on CMD"R" re-entry. |
| 5CB8H ↳23736 ↳CLOSE | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): CLOSE [#n,...] (vector 4185H): CLSFIL (5E14H) for each file given, or for every file. |
| 5CBDH ↳23741 ↳FORM | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): format and verify the 40 tracks (4 tries each), mark the flawed tracks in the flaw table of the new GAT (6160H) and show 'nn Flawed Tracks'. |
| 5CDCH ↳23772 ↳S6FREE | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the FREE command, FREE :d (PRT): a map of the disk, 5 tracks to a line, one character per gran: X in use, . free, 'Flawed' and 'Direct' for flawed tracks and the directory track. |
| 5CE9H ↳23785 ↳CLSALL | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): CLSALL (hook 41BBH): closes every file. -M: on the command line makes its first two bytes XOR A / RET for a time (648CH). |
TRSDOS 1.3 DOS Command Handler Overlay – SYS6 (5200H–623DH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 5CEFH ↳23791 ↳MASTPW | T3 | TRSDOS 1.3 SYS0 constant: Default master-password hash value (2 bytes). Represents the "no password set" state in directory hash fields. The DIR command compares directory hash bytes against this constant to distinguish files with no password from files with passwords set. |
| 5CF3H ↳23795 ↳FIELD | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): FIELD #n, w AS v$, ... (vector 417CH): points each string at its part of the record buffer (data block offset 34H); FIELD overflow past the record length. |
| 5D00H-5EFFH ↳23808 ↳BUFER1 | T3 | TRSDOS 1.3 SYS11 (library commands part 3: TAPE, PURGE, LIST): two 256 byte buffers, BUFER1 and BUFER2 (5E00H), not in the file; TAPE gathers a whole file from 5E00H up. |
| 5D4BH ↳23883 ↳RSET | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): RSET (5D4BH, OR 37H) and LSET (5D4CH, SCF): copy a string into a field, padded with spaces in front (RSET) or after (LSET). |
TRSDOS 2.3 Disk BASIC (BASIC/CMD) Variables and Jump Table (5200H–6575H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 5D53H-5E56H ↳23891 ↳BUF-3 | T1, N1 | TRSDOS 2.3 Disk BASIC: I/O buffer area (BUF-3, 260 bytes, 5D53H–5E56H). General-purpose disk I/O buffer used by sequential file read/write routines. |
| 5DEFH ↳24047 ↳EOF | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): EOF(n) (vector 4161H): -1 when the next record is the ending record and the byte offset equals the EOF byte. |
| 5E00H-5EFFH ↳24064 ↳SPAR_ | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the copy of the source boot sector (RBOOT). Not in the file. |
| 5E00H-5EFFH ↳24064 ↳HITBUF | T3 | TRSDOS 1.3 CONVERT/CMD (copies the files of a Model I diskette to a TRSDOS 1.3 diskette): the HIT of the source diskette; 5F00H-5FFFH (BUFER2) its GAT, then its directory sectors. Not in the file. |
| 5E03H-5E10H ↳24067 ↳SOFF | T3 | TRSDOS 1.3 SYS9 (library commands part 2): the SETCOM option values SWITCH stores (2 bytes each): SOFF 5E03H, SBAUD 5E05H, SWORD 5E07H, SSTOP 5E09H, SPAR 5E0BH, SWAIT 5E0DH, SSWAIT 5E0FH (NOWAIT); 0000H in the file. |
| 5E11H-5E49H ↳24081 ↳SETSWT | T3 | TRSDOS 1.3 SYS9 (library commands part 2): the SETCOM option table for SWITCH: OFF, BAUD, WORD, STOP, PARITY, WAIT, NOWAIT (each name padded to 6 characters, then the address of its value), ended by 00H. |
| 5E14H ↳24084 ↳CLSFIL | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): closes file A: CLOSE (4428H) unless it is an input file, then clears the first 52 bytes of its data block. |
| 5E33H ↳24115 ↳LOC | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): LOC(n) (vector 4164H) and LOF(n) at 5E7CH (vector 4167H): the record number, in logical records when the record length is not 256 (two DIV calls). |
| 5E44H ↳24132 ↳COUNT | T3 | TRSDOS 1.3 SYS6 (library commands part 1): FREE: the first track of the line minus 1. |
| 5E45H ↳24133 ↳CDIRET | T3 | TRSDOS 1.3 SYS6 (library commands part 1): FREE: the directory track (TRKGET). |
| 5E46H ↳24134 ↳HEXCOV | T3 | TRSDOS 1.3 SYS6 (library commands part 1): A (0-99) as two decimal digits at HL and HL+1; HL ends on the second digit. |
| 5E4AH-5E78H ↳24138 ↳BADTAB | T3 | TRSDOS 1.3 SYS9 (library commands part 2): the SETCOM baud rate table: 15 entries of 3 bytes, the rate as four decimal digits held as hex digits (as SWITCH stores BAUD=) and the byte for 41F8H, ended by FFFFH. |
| 5E52H ↳24146 ↳CREATE | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the CREATE command, CREATE file (REC=, LRL=): create a new file (error 40 if it exists) and, with REC=, write one record at the last record number to give it that size. |
| 5EA3H-5EC2H ↳24227 ↳FILNAM | T1 | TRSDOS 2.3 Disk BASIC: filename work buffer (FILNAM, 32 bytes, 5EA3H–5EC2H). Filename is stored here during OPEN/KILL/NAME operations. Filled by the NAMFIL routine at 63EDH. |
| 5EBFH ↳24255 ↳PUT | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): PUT (5EBFH) and GET (5EC0H) #n[,record] (vectors 4182H, 417FH): POSN (4442H) when a record is given, then WRITE (4439H) or READ (4436H); GET past the end clears the buffer. |
| 5EC2H ↳24258 ↳CONVHX | T3 | TRSDOS 1.3 SYS6 (library commands part 1): 4 BCD digits in HL into binary in HL, with POWR10 (5EF7H). |
| 5EFFH ↳24319 ↳CLEAR | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the CLEAR command: without options (not while a DO file runs) set MEMEND back to MEM2 and clear the memory from 6280H to MEMEND, reporting the first faulty byte; START=/END= clear START through END-1; MEM= sets MEMEND (not below 6000H). |
| 5F00H-5FFFH ↳24320 ↳DUM1 | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the empty HIT and directory sector FORM builds and BOTWRI writes. Not in the file. |
| 5F00H-5F26H ↳24320 ↳SYST | T3 | TRSDOS 1.3 SYS11 (library commands part 3: TAPE, PURGE, LIST): the load module PURGE * writes to track 0, sector 2: a block for 4D00H that shows 'Not a SYSTEM Disk' and loops, and the transfer address 4D00H. |
TRSDOS 2.3 Library Commands Overlay – SYS6 (5200H–6FFFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 6100H-68FFH ↳24832 | T1 | TRSDOS 2.3 SYS6: directory image buffer (2048 bytes, 6100H–68FFH). Used by the DIR command to hold up to 8 full directory sectors (256 bytes each) during directory listing operations. |
| 6100H-61FFH ↳24832 ↳FGAT | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the GAT being built (FLAWD = 6160H, its flaw table): the new GAT of FORMAT, or the source GAT with the destination's flaw table for BACKUP. Not in the file. |
| 6113H ↳24851 ↳ERRTRP | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): turns DOS error code A (1-38, higher codes as 1) into a BASIC error through DERTAB (6127H) and stores it into DSKERR. |
| 6114H ↳24852 ↳EZZOR | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the ERROR command, ERROR nn: show the full text of error nn (A = nn OR C0H to ERROR, 4409H). |
| 6130H-6161H ↳24880 ↳S9DCB | T3 | TRSDOS 1.3 SYS9 (library commands part 2): DCB of RELO's file (not in the file). |
| 6132H ↳24882 ↳ERR | T3 | TRSDOS 1.3 SYS6 (library commands part 1): JP 4409H (ERROR in SYS0) with the error code in A; the command errors of SYS6 end here. |
| 6135H ↳24885 ↳PDATA | T3 | TRSDOS 1.3 SYS6 (library commands part 1): output the character in A to the printer when LPFLAG (5A4DH) is set, and always to the screen. |
| 6147H ↳24903 ↳PRT2 | T3 | TRSDOS 1.3 SYS6 (library commands part 1): output the message at HL to the printer (LPRINT) when LPFLAG is set, and always to the screen (ROM 021BH). |
| 614DH ↳24909 ↳INIT | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): the transfer address. Restart with BASIC *, the command line program name and -F:n[V] -M:address, else How Many Files and Memory Size; sets up the file data blocks from ENDBAS, TXTTAB, the free memory and the sign on message. |
TRSDOS 2.3 Disk BASIC (BASIC/CMD) Variables and Jump Table (5200H–6575H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 651EH ↳25886 ↳FLRL | T1 | TRSDOS 2.3 Disk BASIC: logical record length storage (FLRL, 1 byte). Holds the LRL (logical record length) for the current file operation. Set during OPEN and used by GET/PUT to size record transfers. |
| 651FH ↳25887 ↳DOPROT | T1 | TRSDOS 2.3 Disk BASIC: protected file execution flag (DOPROT, 1 byte). FFH = permit running a protected file; 00H = do not run. Checked before loading files with protection bits set. |
| 6520H ↳25888 ↳PROTFL | T1 | TRSDOS 2.3 Disk BASIC: protection clear-memory flag (PROTFL, 1 byte). Non-zero = protection has cleared memory (first 1100 bytes of program RAM have been zeroed at 64FEH). Zero = no clearing needed. |
TRSDOS 2.3 Library Commands Overlay – SYS6 (5200H–6FFFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 6F00H-6FFFH ↳28416 | T1 | TRSDOS 2.3 SYS6: secondary FCB work area (256 bytes, 6F00H–6FFFH). File Control Block for the secondary file used by the APPEND command. |
| 7000H ↳28672 ↳LPC | T3 | TRSDOS 1.3 LPC/CMD (line printer control): loaded at 7000H-7057H, transfer 7000H. The driver (702EH-7057H, moved to the old MEMEND) clears bit 7, sends 00H to the ROM's status check (044BH), sends a carriage return that follows a form feed, carriage return or line feed to the ROM's CRLF count (042AH) without printing it, and every other character to 03C3H. |
Memory Boundaries and Top-of-Memory Markers
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 7FFFH ↳32767 | Both Model I and III ROM | 16K system top of physical memory. |
| BFFFH ↳49151 | Both Model I and III ROM | 32K system top of physical memory. |
| FFFFH ↳65535 | Both Model I and III ROM | 48K system top of physical memory. |
TRSDOS 1.3 Disk BASIC (BASIC/CMD) Variables and Workspace (5200H–6520H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 5200H ↳20992 ↳DOPROT | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): DOPROT, 1 byte, 00H in the file. RUN "file" stores FFH (5BB7H); SYS2 stores 00H when BASIC opens an execute only file; TSTPRT (60A3H) clears it before READY and before a direct statement; INIT restores it from PROSAV (426FH) on BASIC *. |
| 5200H ↳20992 ↳BEGIN | T3 | TRSDOS 1.3 SYS6 (library commands part 1): loaded at 5200H (SYSHI) for UTIL (42BAH: LD A,86H / RST 28H, entry 0). BEGIN clears FLAG1 (4414H) and SCAFLG (42FFH), sets BASICG (427AH) to FFH, finds the command number in C in TABCOM with GETTAB and jumps to the command routine with HL at the command line; an unknown number gives error 11. |
| 5200H ↳20992 ↳BEGIN | T3 | TRSDOS 1.3 SYS9 (library commands part 2): loaded at 5200H-60BDH (5200H through 60BDH less the DEFS areas, 3706 bytes). BEGIN stores 55H in CFLAG (42B4H), clears FLAG1 (4414H) and SCAFLG (42FFH), stores FFH in BASICG (427AH), looks the LIBCOM number in C up in TABLE (523EH) through GETTAB and goes to the command; a number not in TABLE gives error 11. |
| 5200H ↳20992 ↳BEGIN | T3 | TRSDOS 1.3 SYS11 (library commands part 3: TAPE, PURGE, LIST): loaded at 5200H-5BA1H and 5F00H-5F26H (2480 bytes). BEGIN stores 55H in CFLAG (42B4H), clears FLAG1 (4414H) and SCAFLG (42FFH), stores FFH in BASICG (427AH), looks the LIBCOM number in C up in TABLE (523EH: 23H TAPE, 1EH PURGE, 18H LIST) through GETTAB (5226H) and goes to the command; another number gives error 11. |
| 5200H ↳20992 ↳CONV | T3 | TRSDOS 1.3 CONVERT/CMD (copies the files of a Model I diskette to a TRSDOS 1.3 diskette): loaded at 5200H-5AFEH, transfer 5200H. Sets CFLAG (42B4H) to 55H, takes :s :d from the command line or asks for the drives, reads the source HIT (5E00H) and GAT (5F00H), converts every file of the HIT and returns through 402DH. |
| 5200H-559BH ↳20992 ↳START | T3 | TRSDOS 1.3 XFERSYS/CMD (puts TRSDOS 1.3 from drive 0 on a version 1.1 or 1.2 diskette in drive 1): loaded at 5200H-559BH, transfer 5200H: code 5200H-5494H, messages 5495H-5527H, DCB1 5528H, DCB2 555AH, SERBUF 5591H (not in the file), COUNT 559BH. Self-modified operands: SVER 5263H, SYSFLG 5272H, LFNSAV 53E6H-53E7H, SERFLG 543CH. |
| 5201H ↳20993 ↳PROTFL | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): PROTFL, 1 byte, 00H in the file. SYS2 stores FFH when BASIC opens an execute only file (the program in memory is protected); TSTPRT (60A3H) then clears 1100 bytes of the program and shows Protection has CLEARED Memory. |
| 5202H ↳20994 | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): 1 byte, 00H in the file and not changed by BASIC/CMD; when it is not 00H INIT (61E3H) asks the cassette speed through the ROM at 3042H. |
| 63B6H ↳25526 ↳FLRL | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): FLRL, 1 byte: FIELD keeps the record length of the file here while it checks the field widths. |
| 63B7H ↳25527 ↳PTRFLG | T3 | TRSDOS 1.3 Disk BASIC save area (PTRFLG, 1 byte), used only by SYS12. SYS12 stores 00H (SCCPTR: turn the 0DH line pointers of the program back into ASCII line numbers) or a value that is not 00H (SCCLIN: turn the 0EH line number constants into pointers) and SCNPGM reads it for each reference. |
| 63B8H-63B9H ↳25528 ↳LINE1 | T3 | TRSDOS 1.3 Disk BASIC save area (LINE1, 2 bytes), used only by SYS12. NAME stores startline (the first old line renumbered) here (4E3FH) and fetches it again after the references have been converted (4E80H). |
| 63BAH-63BBH ↳25530 ↳CONTXT | T3 | TRSDOS 1.3 Disk BASIC save area (CONTXT, 2 bytes), used only by SYS12. LINGT3 (4F76H) stores the address after the 3 bytes of the 0EH or 0DH line reference being changed; MAKPTR, SCNPT2 and the ON ERROR GOTO 0 case write the new reference back from it. |
| 63BCH ↳25532 ↳DSKERR | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): DSKERR, 1 byte: the DOS error code ERRTRP (6113H) last turned into a BASIC error (codes of 39 and up are stored as 1); CMD"E" shows its text through SYS4. |
| 63BDH ↳25533 ↳MAXTRK | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): MAXTRK, 1 byte: the PUT or GET flag, 00H GET, non zero PUT. |
| 63BEH-63BFH ↳25534 ↳PTRFIL | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): PTRFIL, 2 bytes: the data block of the file PRINT, INPUT, LIST and the ROM hooks use now; 0000H for the display, printer and keyboard. FILSET (5A54H), OPEN and LOAD set it; FINDRT (5451H, hook 41BEH) clears it. |
| 63C0H-63DFH ↳25536 ↳FILPTR | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): FILPTR, 32 bytes: the data block address of each file 0-15 (2 bytes each), set by FLSET1 (623BH) from ENDBAS up. File 0 is used by LOAD, RUN, MERGE, SAVE and KILL. |
| 63E0H-63E1H ↳25568 ↳FILPT1 | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): FILPT1, 2 bytes: a copy of file 0's data block address, since LOAD and the hooks at 41B5H and 41B8H point FILPTR at DIRTMP for a time. |
| 63E2H-63E3H ↳25570 ↳LSTFRE | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): LSTFRE, 2 bytes: byte 0 non zero when a program loaded from disk is to be run (RUN, LOAD ,R); byte 1 holds MAXFIL while LOAD makes it 0. |
| 63E4H ↳25572 ↳PTCMD | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): PTCMD, 1 byte: the first character of the DOS command line after BASIC (* restarts with the program in memory); INIT also stores * so that FLSET1 returns to its caller. |
| 63E5H-63E6H ↳25573 ↳SVTXTT | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): SVTXTT, 2 bytes: TXTTAB as INIT found it, used by BASIC *. |
| 63E7H-63E8H ↳25575 ↳FILSVS | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): FILSVS, 2 bytes: MAXFIL and VARREC (426DH-426EH) as INIT found them. |
| 63E9H-63EAH ↳25577 ↳OLSTTP | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): OLSTTP, 2 bytes: STKTOP as INIT found it, used by BASIC *. |
| 63EBH ↳25579 ↳BUFEND | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): BUFEND, 1 byte: INIT stores 00H here. |
| 63ECH ↳25580 ↳FILFLG | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): FILFLG, 1 byte: non zero when -F: was on the command line. |
| 63EDH ↳25581 ↳MEMFLG | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): MEMFLG, 1 byte: non zero when -M: was on the command line. |
| 63EEH-63EFH ↳25582 ↳CPMLIN | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): CPMLIN, 2 bytes: the address of the DOS command line after BASIC. |
| 63F0H-6408H ↳25584 ↳CPMNAM | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): CPMNAM, 25 bytes: a quote, the program name from the command line and 00H, given to LRUN. |
| 6400H-64FFH ↳25600 ↳BUFER2 | T3 | TRSDOS 1.3 SYS9 (library commands part 2): buffer of the destination file of COPY0 (INIT at 54E4H; a record of 256 bytes is copied into it from 6300H at 550CH) and RELO's output buffer (5A60H) (not in the file). |
| 6150H-624FH ↳24912 ↳BUF | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): BUF, 256 bytes: the input buffer (BUFPNT, 40A7H), set up by INIT over its own code. |
| 6162H-6193H ↳24930 ↳S9DCB1 | T3 | TRSDOS 1.3 SYS9 (library commands part 2): DCB of the source file of COPY and of the file of KILL and PATCH (not in the file). |
| 6167H ↳24935 ↳INKEY | T3 | TRSDOS 1.3 SYS6 (library commands part 1): BREAK goes to ABORT (4030H); '@' waits for ENTER; returns Z with the key or 00H in A. |
| 6188H ↳24968 ↳GETKBD | T3 | TRSDOS 1.3 SYS6 (library commands part 1): scan the keyboard: ROM 002BH, or while a DO file runs the ROM driver KEYBDZ (3024H) with IX = 4015H. |
| 6194H-61FFH ↳24980 ↳S9DCB2 | T3 | TRSDOS 1.3 SYS9 (library commands part 2): DCB of the destination file of COPY (not in the file). |
| 61A1H ↳24993 ↳HEXS | T3 | TRSDOS 1.3 SYS6 (library commands part 1): A as two hex digits at HL, HL advanced by 2. |
| 61B5H ↳25013 ↳HEXAAS | T3 | TRSDOS 1.3 SYS6 (library commands part 1): A (0-99) as two decimal digits at HL and HL+1. |
| 61C1H ↳25025 ↳BINDEC | T3 | TRSDOS 1.3 SYS6 (library commands part 1): output two spaces, then HL in decimal through the ROM's FOUT (BINDC1, 61CAH, without the spaces). |
| 61E1H-61E9H ↳25057 ↳DPRT1 | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the text HH:MM:SS or MM/DD/YY that MSGPR0 builds, and 0DH. |
| 61EAH ↳25066 ↳MSGPRT | T3 | TRSDOS 1.3 SYS6 (library commands part 1): show the time (C = ':') or the date (C = '/'); MSGPR0 (61F0H) builds the text at 61E1H. |
| 6200H ↳25088 ↳BUFF | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the main buffer from 6200H up: the track image of FORM, the gran records of BACKUP and the directory track. Not in the file. |
| 6200H-62FFH ↳25088 ↳BUFER4 | T3 | TRSDOS 1.3 SYS9 (library commands part 2): COPY0's record buffer for a file whose LRL is not 256: READ (54F3H) and WRITE (551AH) pass it (not in the file). |
| 6225H ↳25125 ↳OPENIT | T3 | TRSDOS 1.3 SYS6 (library commands part 1): open the file in S6DCB1 (6280H) with S6BUF1 (6300H), LRL 256. |
| 6234H ↳25140 ↳INITIT | T3 | TRSDOS 1.3 SYS6 (library commands part 1): open or create the file in S6DCB1 with S6BUF1, LRL 256. |
| 623AH ↳25146 ↳GETSYN | T3 | TRSDOS 1.3 SYS6 (library commands part 1): SYNTAX (441CH) with DE = S6DCB1 (6280H): the filespec at HL into the DCB. The release file's LOAD calls a patch at 5FBFH instead, which uses the system DCB 4465H. |
| 6250H ↳25168 ↳DIRTMP | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): DIRTMP: a byte in the start up code area that LOAD and EXFIND (59FDH) make 00H, a closed data block, and point FILPTR at, so that the closing of the files by the ROM passes file 0 by. |
| 6280H-62B1H ↳25216 ↳S6DCB1 | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the DCB of the first file (50 bytes); 62B2H-62E3H (S6DCB2) the DCB of the second file. Not in the file. |
| 6300H-63FFH ↳25344 ↳S6BUF1 | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the sector buffer of the first file; 6400H-64FFH (S6BUF2) that of the second. Not in the file. |
| 6300H-63FFH ↳25344 ↳BUFER1 | T3 | TRSDOS 1.3 SYS9 (library commands part 2): buffer of the source file (COPY, KILL, PATCH, RELO); a single drive copy fills memory from here up (not in the file). |
| 6350H-6367H ↳25424 ↳FILNAM | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): FILNAM, 24 bytes: NAMFIL (5F7FH) gathers a file name here in capitals before SYS1 checks it; the area holds the start up messages until then. |
| 64DCH ↳25820 ↳ENDBAS | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): ENDBAS: the end of BASIC/CMD, where FLSET1 puts the file data blocks (360 bytes each, 616 with variable records: mode, print position, the 50 byte DCB, the 256 byte buffer); a 00H and the program text follow them. |
| 5E69H ↳24169 ↳LRL2 | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): LRL2: the operand of LD A,nn at 5E68H, the record length LOC and LOF store at 5E47H and read at 5E58H and 5E71H. |
| 5E70H ↳24176 ↳EOF2 | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): EOF2: the operand of LD L,nn at 5E6FH, the EOF byte (LOF) or the byte offset (LOC) stored at 5E55H. |
| 5E7FH-5E80H ↳24191 ↳S6LRL | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD BC at 5E7EH: the LRL option of CREATE. |
| 5E89H ↳24201 ↳FILOU3 | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): writes Register A to the current file through the ROM's 001BH and keeps the print position at data block offset 1. |
| 5E95H-5E96H ↳24213 ↳NRECS | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD BC at 5E94H: the REC option of CREATE. |
| 5F01H ↳24321 ↳GETX | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): GETX: the operand of LD A,nn at 5F00H. 00H when PUT or GET gave a record number (the file is positioned to it), FFH for the next record. |
| 5F29H-5F2AH ↳24361 ↳LOWRAM | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD DE at 5F28H: the START option of CLEAR. |
| 5F34H ↳24372 ↳DUAL | T3 | TRSDOS 1.3 SYS9 (library commands part 2): the DUAL command: (ON) or no option sends display output to the printer too through DUALIT (4CE1H); (OFF) undoes it; refused while 442FH holds 80H. Shows 'Dual is now On' or 'Off'. |
| 5F38H-5F39H ↳24376 ↳HIGRAM | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD HL at 5F37H: the END option of CLEAR. |
| 5F4CH-5F4DH ↳24396 ↳NEWMEM | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD HL at 5F4BH: the MEM option of CLEAR. |
| 5F53H ↳24403 ↳INDSKC | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): reads a character of the current file through the ROM's 0013H; CARRY set at the end of the file (DOS errors 28 and 29). |
| 5F7FH ↳24447 ↳NAMFIL | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): reads a file name string (1-23 characters) into FILNAM in capitals and puts it into the DCB through SYNTAX (441CH); Bad file name otherwise. |
| 5FC3H ↳24515 ↳OPEN | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): OPEN "O", "I", "E" or "R", [#]n, "file"[,record length] (vector 4179H); PRGFIL (6007H) opens file Register A in mode Register D (also for LOAD, RUN, MERGE, SAVE on file 0). |
| 5FC9H ↳24521 ↳BUILD | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the BUILD command: write lines typed (up to 63 characters and 0DH) to a file (default extension BLD) until BREAK, then FFH, the end mark of a DO file. |
| 5FD9H ↳24537 ↳WPROT | T3 | TRSDOS 1.3 SYS9 (library commands part 2): the WP command: WP (DRIVE=n) makes drive n write protected for XWRITE (45F8H); WP alone stores FFH (none). Shows 'Disk Drive n is now Write Protected'. |
| 5FEEH-5FEFH ↳24558 ↳WPDRV | T3 | TRSDOS 1.3 SYS9 (library commands part 2): self modified operand of LD BC at 5FEDH: the DRIVE= value, stored by SWITCH through the table WPSW (6010H); MASTER reads it too (6051H). |
| 6000H-60FFH ↳24576 ↳SGAT | T3 | TRSDOS 1.3 SYS7 (FORMAT and BACKUP): the allocation bytes of the source GAT that FALOC clears gran by gran. Not in the file. |
| 6000H ↳24576 ↳MOVE | T3 | TRSDOS 1.3 MEMTEST/CMD (ROM, RAM and video test): loaded at 6000H-676AH, transfer 6000H. MOVE copies 600EH-6769H to 4300H-4A5BH and jumps to 4300H; the tests run there with the interrupts off and end with a JUMP to 0000H (reboot). |
| 603DH ↳24637 ↳DO | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the DO command: copy GOGO1 (60A6H) to xx90H of the top page, make it the keyboard driver (4016H), put the DO file's DCB at xxBBH and its buffer in the page below, set MEMEND and MEM1 to xxE0H two pages lower, and open the file (default extension BLD). |
| 603EH ↳24638 ↳MASTER | T3 | TRSDOS 1.3 SYS9 (library commands part 2): the MASTER command: MASTER (DRIVE=n) stores n into 42B3H (DIFULT), MASTER alone 0; a drive above 4413H gives error 2. Shows 'Disk Drive n is now the Master Drive'. |
| 6086H ↳24710 ↳CONVHX | T3 | TRSDOS 1.3 SYS9 (library commands part 2): HL holds up to four decimal digits as hex digits (as SWITCH stores a number): return their value in HL. |
| 609BH-609CH ↳24731 ↳TMPDCB | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD DE at 609AH: the address of the DO file's DCB (xxBBH). |
| 60A3H ↳24739 ↳TSTPRT | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): clears DOPROT; when PROTFL is set clears 1100 bytes of the program, shows Protection has CLEARED Memory and goes to READY. |
| 60A6H-60CBH ↳24742 ↳GOGO1 | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the DO file's keyboard routine, copied to xx90H: each call returns the next byte of the file; at FFH or the end of the file it puts the keyboard driver back from GOSAVE (42B1H) and clears DOFLAG (4CFDH). |
| 60A8H-60A9H ↳24744 ↳GODCB | T3 | TRSDOS 1.3 SYS6 (library commands part 1): self modified operand of LD DE at 60A7H inside GOGO1: the DO file's DCB, set before GOGO1 is copied. |
| 60CDH ↳24781 ↳KILL | T3 | TRSDOS 1.3 Disk BASIC (BASIC/CMD): KILL "file" (vector 4191H): closes every file (CLSALL; the release file has this call zapped to NOPs), opens the file as file 0 and calls KILL (442CH). |
| 60CFH ↳24783 ↳SPAUSE | T3 | TRSDOS 1.3 SYS6 (library commands part 1): the PAUSE command: show 'Press <ENTER> to continue' and wait for ENTER (the keys themselves at 3840H while a DO file runs). |
| 60EFH ↳24815 ↳GETCR | T3 | TRSDOS 1.3 SYS6 (library commands part 1): wait until 3840H, keyboard row 6, reads 01H (ENTER). |
LDOS 5.3.1 (Model I) - BOOT/SYS, SYS0/SYS, SYS1/SYS, SYS2/SYS, SYS3/SYS, SYS4/SYS, SYS5/SYS, SYS6/SYS and SYS7/SYS Variables and Entry Points
These entries document LDOS 5.3.1 (MISOSYS 1991) for the Model I: BOOT/SYS and the resident SYS0/SYS, verified file by file against the bytes (the disassembly pages of BOOT/SYS, SYS0/SYS, SYS1/SYS, SYS2/SYS, SYS3/SYS, SYS4/SYS, SYS5/SYS, SYS6/SYS and SYS7/SYS). Every data cell of SYS0/SYS, every cell it keeps outside the file, every named entry point and the start of every routine is listed, each with a link to its row in the disassembly. SYS1/SYS, the command interpreter, runs in the overlay area (4E00H-51F8H, 4E00H-51FFH being shared by every system file): its routines, tables and self-modified operands are listed with the label SYS1. SYS2/SYS (@OPEN, @INIT, @CKDRV and the hash codes, 4E00H-51FFH) is listed the same way with the label SYS2, its work cells and self-modified operands included. SYS3/SYS (@CLOSE and @FNAME, 4E00H-50A5H) is listed with the label SYS3. SYS4/SYS (@ERROR, 4E00H-51AEH) is listed with the label SYS4. SYS5/SYS (DEBUG, 4E00H-51FEH) is listed with the label SYS5, with the DEBUG cells 405DH-407CH it keeps in the resident area. SYS6/SYS (Library A, fifteen members loaded at 5200H, the member of FILTER and SET at 5A00H) is listed with the label SYS6 and the member number, one row for each section of each member and each command entry. SYS7/SYS (Library B, thirteen members loaded at 5200H) is listed the same way with the label SYS7 and the member number. Rows are tagged L1 and shown or hidden with the "Show LDOS (Model I)" toggle.
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 400CH ↳16396 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Restart Vectors. The Level II ROM sends its RST 28H, RST 30H and RST 38H restarts through these three bytes each (ROM 0028H, 0030H and 0038H jump to 400CH, 400FH and 4012H). SYS0/SYS loads a JP into each: the supervisor call dispatcher, the DEBUG entry and the interrupt service routine. RST 28H with a request code in Register A is how every overlay of the system is called. (disassembly) |
| 400FH ↳16399 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Jump to 44B4H, which saves Register Pair AF and issues request 87H (load and run SYS5/SYS, the DEBUG monitor). ROM 0030H (RST 30H, the breakpoint instruction DEBUG plants) comes here; SYS0/SYS's own 4C73H jumps here to enter DEBUG before a loaded program runs, and SYS5/SYS and SYS7/SYS read this vector's address (their 4F98H and 521CH). (disassembly) |
| 4012H ↳16402 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Jump to 4518H, the interrupt service routine. ROM 0038H (RST 38H, the maskable interrupt in mode 1) comes here on every interrupt of the expansion interface. SYS0/SYS's reset stores C3H (the JP) here again as its last step before it enables interrupts (507CH-507FH); FORMAT/CMD and BACKUP/CMD store other values here and put the byte back (FORMAT/CMD 6008H-6010H, 6446H; BACKUP/CMD 52C6H, 5ED3H-5EDBH). (disassembly) |
| 4015H ↳16405 ↳KIDCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Device Control Blocks of the Keyboard, Video and Printer. 4015H, KIDCB$, the keyboard's device control block, +00H: 01H, the device type (an input device). KI/DVR, SYS2/SYS, SYS6/SYS and SYS11/SYS address the block from here. (disassembly) |
| 4016H ↳16406 ↳KIDCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4016H-4017H, KIDCB$ +01H-+02H: 03E3H, the ROM's keyboard driver. SYS0/SYS's reset copies this address to 43B8H (4E25H-4E28H); KI/DVR (its 5436H, 5559H), SYS7/SYS and SYS11/SYS replace it with their own drivers and put it back. (disassembly) |
| 4018H ↳16408 ↳KIDCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4018H-401AH, KIDCB$ +03H-+05H: three bytes of 00H for the driver's use. SYS7/SYS stores into 4018H (its 5281H). (disassembly) |
| 401BH ↳16411 ↳KIDCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 401BH-401CH, KIDCB$ +06H-+07H: the device name KI. (disassembly) |
| 401DH ↳16413 ↳DODCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 401DH, DODCB$, the video display's device control block, +00H: 07H, the device type (input, output and control). @DSPLY (44E3H) sends its text to the block at 401DH. (disassembly) |
| 401EH ↳16414 ↳DODCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 401EH-401FH, DODCB$ +01H-+02H: 0458H, the ROM's video driver. SYS0/SYS's reset replaces it with 4378H, its own driver that shows lower case, when video memory keeps bit 6 of a byte written to it (4E2BH-4E3BH), and saves the address in force at 43BAH. (disassembly) |
| 4020H ↳16416 ↳DODCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4020H-4021H, DODCB$ +03H-+04H: 3C00H, the cursor position in video memory (the top left corner). SYS0/SYS sets it for each prompt (431BH, 4F53H) and leaves it at 3F40H after the reset (5076H-5079H); BASIC/CMD, SYS5/SYS, SYS6/SYS and SYS7/SYS read and set it. (disassembly) |
| 4022H ↳16418 ↳DODCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4022H, DODCB$ +05H: the character under the cursor, 00H when the cursor is off (the ROM's driver puts it back before it moves the cursor). SYS7/SYS reads it (its 5479H). (disassembly) |
| 4023H ↳16419 ↳DODCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4023H-4024H, DODCB$ +06H-+07H: the device name DO. (disassembly) |
| 4025H ↳16421 ↳PRDCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4025H, PRDCB$, the printer's device control block, +00H: 06H, the device type (output and control). @PRINT (44F8H) sends its text to the block at 4025H. (disassembly) |
| 4026H ↳16422 ↳PRDCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4026H-4027H, PRDCB$ +01H-+02H: 058DH, the ROM's printer driver. SYS0/SYS's reset copies the address to 43BCH (4E41H-4E44H). (disassembly) |
| 4028H ↳16424 ↳PRDCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4028H, PRDCB$ +03H: 42H (66), the lines on a printer page, the ROM's default. (disassembly) |
| 4029H ↳16425 ↳PRDCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4029H, PRDCB$ +04H: 00H, the count of lines printed on the page. (disassembly) |
| 402AH ↳16426 ↳PRDCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 402AH, PRDCB$ +05H: 00H, the driver's spare byte. (disassembly) |
| 402BH ↳16427 ↳PRDCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 402BH-402CH, PRDCB$ +06H-+07H: the device name PR. (disassembly) |
| 402DH ↳16429 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @EXIT and @ABORT. The two ways a program ends. Both issue request 93H, which runs the LDOS READY command loop of SYS1/SYS. Programs JP to 402DH (@EXIT) when they finish and to 4030H (@ABORT) when they stop on an error; SYS11/SYS (JCL) and BASIC/CMD (its 5545H-5559H) write other request codes or jumps into them while they run. (disassembly) |
| 4030H ↳16432 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Load Register A with 93H, the same request code as @EXIT: @ABORT, the end of a program after an error. The two entries are separate so that SYS11/SYS (JCL) can give them different request codes while a job runs. (disassembly) |
| 4033H ↳16435 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Jump to 44CAH: @DVRHK, the device driver hook. The caller gives the address of a device control block in Register Pair IX (or in Register Pair HL at 44C7H) and the request in Register B and Register C; 44CAH follows the block's links to its driver and enters it. (disassembly) |
| 4036H ↳16438 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4036H-403CH: the ROM keyboard driver's work area, one byte for each keyboard row 0-6, the keys it last saw held (the ROM's 03EBH-03EFH takes as new only keys not set here). FFH in every byte makes every key held at boot count as already seen, so a key held during the reset is not taken as typed. KI/DVR uses these bytes too (its 52C8H, 535FH, 5394H). (disassembly) |
| 403DH ↳16445 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Not in the file: 403DH, the ROM's video mode byte (bit 3 set for 32 characters a line), left as the ROM set it. BASIC/CMD reads it (its 5A0CH). (disassembly) |
| 403EH ↳16446 ↳OSVER$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: OSVER$, the Clock and the Date. 403EH, OSVER$: 53H, the system version 5.3 (BASIC/CMD reads it, its 5344H). (disassembly) |
| 403FH ↳16447 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 403FH: 00H. No code of SYS0/SYS addresses it. (disassembly) |
| 4040H ↳16448 ↳TIMER$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4040H, TIMER$: the tick counter, incremented on every clock interrupt by 4583H (40 a second on the Model I). Its bits 2-0 pick the task slot 458AH runs on each tick. FORMAT/CMD, BACKUP/CMD, KI/DVR, SYS2/SYS and SYS12/SYS read it to time delays and key repeats. (disassembly) |
| 4041H ↳16449 ↳TIME$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Not in the file: 4041H-4043H, TIME$: seconds, minutes and hours, kept by the clock task at 45BEH and set by the boot time prompt (4FB5H-4FBBH). Not loading them keeps the time running across a reset. (disassembly) |
| 4042H ↳16450 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Part of the cells that start at 4041H: Not in the file: 4041H-4043H, TIME$: seconds, minutes and hours, kept by the clock task at 45BEH and set by the boot time prompt (4FB5H-4FBBH). Not loading them keeps the time running across a reset. (disassembly) |
| 4043H ↳16451 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Part of the cells that start at 4041H: Not in the file: 4041H-4043H, TIME$: seconds, minutes and hours, kept by the clock task at 45BEH and set by the boot time prompt (4FB5H-4FBBH). Not loading them keeps the time running across a reset. (disassembly) |
| 4044H ↳16452 ↳DATE$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4044H, DATE$: the year, two digits as a binary number (80-99 for 1980-1999, 0-11 for 2000-2011), stored by the reset at 4F2FH from the year offset in 4466H. (disassembly) |
| 4045H ↳16453 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4045H: the day of the month (1-31), stored by the reset at 4F09H from 4307H. (disassembly) |
| 4046H ↳16454 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4046H: the month (1-12), stored by the reset at 4EF4H. 4D63H (@DATE) displays 4044H-4046H. (disassembly) |
| 4047H ↳16455 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4047H: the day of the year, low 8 bits (1-366), stored by the reset at 4F1FH. (disassembly) |
| 4048H ↳16456 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4048H: bit 0 = bit 8 of the day of the year (4F20H-4F23H), bits 3-1 = the day of the week, 1 for Sunday to 7 for Saturday (4F44H-4F4FH), bit 7 = a leap year (4ECDH-4ED0H). SYS7/SYS (DATE) sets the same bits. (disassembly) |
| 4049H ↳16457 ↳HIGH$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Not in the file: 4049H-404AH, HIGH$, the highest address free for programs. The reset stores the top of memory it finds here and at 4403H (4E17H-4E1AH); modules that install themselves in high memory (KI/DVR, PR/FLT, FDUBL/CMD, SYS9/SYS ...) lower it. (disassembly) |
| 404BH ↳16459 ↳INTIM$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 404BH, INTIM$: a copy of the interrupt latch (37E0H) the interrupt service routine read last (4518H-4522H): bit 7 the clock, bit 6 the disk controller. (disassembly) |
| 404CH ↳16460 ↳INTMSK$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 404CH, INTMSK$: the mask of the interrupt bits that are served (4524H). The reset stores C0H (bits 7 and 6) at 4E7FH-4E82H. (disassembly) |
| 404DH ↳16461 ↳INTVC$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 404DH-404EH, INTVC$, the first of eight vectors, one for each bit of the interrupt latch: bit 0. 4537H is the RET at the end of the interrupt service routine, so an unused bit does nothing. (disassembly) |
| 404FH ↳16463 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 404FH-4050H: the vector of interrupt bit 1, 4537H (a RET, not used). (disassembly) |
| 4051H ↳16465 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4051H-4052H: the vector of interrupt bit 2, 4537H (a RET, not used). (disassembly) |
| 4053H ↳16467 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4053H-4054H: the vector of interrupt bit 3, 4537H (a RET, not used). (disassembly) |
| 4055H ↳16469 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4055H-4056H: the vector of interrupt bit 4, 4537H (a RET, not used). (disassembly) |
| 4057H ↳16471 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4057H-4058H: the vector of interrupt bit 5, 4537H (a RET, not used). (disassembly) |
| 4059H ↳16473 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4059H-405AH: the vector of interrupt bit 6, the disk controller's interrupt request: 461CH, which waits until the controller is not busy, selecting the drive again from 4309H while it waits. (disassembly) |
| 405BH ↳16475 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 405BH-405CH: the vector of interrupt bit 7, the clock: 456FH, which runs the four task slots 08H-0BH, then counts the tick at 4040H and runs one of the slots 00H-07H. (disassembly) |
| 405DH ↳16477 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: DEBUG: breakpoint slot A, the low byte of its address (the second breakpoint of G, or the target of a single step); between breakpoints the memory display mode, 61H (A command) for characters, any other value hexadecimal. Cleared on every entry (4E2FH). (disassembly) |
| 405EH ↳16478 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: DEBUG: breakpoint slot A, the high byte of its address; between breakpoints the screen layout, 00H the register screen (X), 73H the full screen of memory (S). Cleared on every entry. (disassembly) |
| 405FH ↳16479 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: DEBUG: breakpoint slot A, the byte the F7H (RST 30H) was written over, put back on the next entry. (disassembly) |
| 4060H ↳16480 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: DEBUG: 4060H-4061H, breakpoint slot B, its address (the first breakpoint of G, or the instruction after a single step); between breakpoints the M address, the byte the M command changes, marked with bars in the memory display. Cleared on every entry. (disassembly) |
| 4062H ↳16482 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: DEBUG: breakpoint slot B, the byte the F7H was written over. (disassembly) |
| 4063H ↳16483 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: DEBUG: 4063H-4064H, the memory display address (D sets it, ; and - move it). (disassembly) |
| 4065H ↳16485 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: DEBUG: 4065H-4066H, the program's Register Pair AF, the first word of the register save area 4065H-407CH (AF, BC, DE, HL, AF', BC', DE', HL', IX, IY, SP, PC, low byte first), filled on entry (4E1DH) and loaded back by G (4FA3H). (disassembly) |
| 4067H ↳16487 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: DEBUG: 4067H-4068H, the program's Register Pair BC. (disassembly) |
| 4069H ↳16489 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: DEBUG: 4069H-406AH, the program's Register Pair DE. (disassembly) |
| 406BH ↳16491 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: DEBUG: 406BH-406CH, the program's Register Pair HL. (disassembly) |
| 406DH ↳16493 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: DEBUG: 406DH-406EH, the program's alternate Register Pair AF'. (disassembly) |
| 406FH ↳16495 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: DEBUG: 406FH-4070H, the program's alternate Register Pair BC'. (disassembly) |
| 4071H ↳16497 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: DEBUG: 4071H-4072H, the program's alternate Register Pair DE'. (disassembly) |
| 4073H ↳16499 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: DEBUG: 4073H-4074H, the program's alternate Register Pair HL'. (disassembly) |
| 4075H ↳16501 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: DEBUG: 4075H-4076H, the program's Index Register IX. (disassembly) |
| 4077H ↳16503 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: DEBUG: 4077H-4078H, the program's Index Register IY. (disassembly) |
| 4079H ↳16505 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: DEBUG: 4079H-407AH, the program's Stack Pointer; DEBUG runs on the stack below it. (disassembly) |
| 407BH ↳16507 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: DEBUG: 407BH-407CH, the program's PC, where G goes on (moved back one byte onto a breakpoint that fired). (disassembly) |
| 4160H ↳16736 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 BOOT/SYS sector 1 (the boot sector for a boot through a disk driver): its Stack Pointer, set at 4203H; the stack grows down into 4152H-415FH while SYS0/SYS loads. |
| 41DEH ↳16862 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The Reset's Return Word. 41DEH-41DFH: 0000H. The reset starts with the Stack Pointer at 41DEH, so a RET with nothing pushed takes this word: the RET NZ at 4E8FH (the system information sector could not be read) goes to 0000H, the ROM's restart. After a boot by sector 0 of BOOT/SYS the boot sector's last CALLs have stored 4277H here (77H 42H) after this block was loaded. (disassembly) |
| 41E0H ↳16864 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 BOOT/SYS sector 0 (the boot sector the ROM runs): its Stack Pointer, set at 4204H; at most 41D4H-41DFH is used. SYS0/SYS loads 00H 00H into 41DEH-41DFH as its last record, and the boot's CALLs overwrite them: at the jump to 4E00H they hold 77H 42H. |
| 4200H ↳16896 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 BOOT/SYS: the ROM reads cylinder 0, sector 0 (the boot sector) into 4200H-42FFH and jumps to 4200H. SYS0/SYS's reset then reads the system information sector (cylinder 0, sector 2) into 4200H-42FFH (its 4E85H): 4200H mark 53H, 4201H CONFIG/SYS flag (C9H none, 00H load), 4202H-420DH the days of each month, 4220H-426FH drive code tables of drives 0-7 for a boot through a driver, 4270H-42BFH drive code tables for a boot by sector 0, 42C2H date prompt switch, 42C3H time prompt switch (00H ask), 42C7H-42DBH day names, 42DCH-42FFH month names. |
| 4202H ↳16898 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 BOOT/SYS: byte 2 of boot sectors 0 and 1, the directory cylinder (the operand of CP 11H at 4201H; 11H on the system diskette). Read at 4216H (sector 0) and 4229H (sector 1); SYS0/SYS's reset copies it to 4709H before it reads the system information sector over it. |
| 4210H ↳16912 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 BOOT/SYS sector 1: the operand of OR 00H at 420FH, the bootstrap step rate FORMAT/CMD writes. SYS0/SYS's reset copies bits 1-0 to drive 0's drive code table (4703H) after a boot through a driver. |
| 42BCH ↳17084 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 BOOT/SYS sector 0: the Seek command byte 1BH stored at 42BBH; bits 1-0 are the bootstrap step rate FORMAT/CMD writes. SYS0/SYS's reset copies them to drive 0's drive code table (4703H) after a boot by sector 0. |
| 4300H ↳17152 ↳@KITSK | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @KITSK and @ICNFG Hooks. Two three byte hooks, each a RET and two spare bytes in the file. A module that wants to be called puts a JP there (C3H and an address). The keyboard drivers call @KITSK (4300H) on every key request (KI/DVR 52C5H, 549FH; BASIC/CMD 5C60H; BASIC/OV2 5621H) and SYS6/SYS installs and removes its own jump there; SYS0/SYS's reset calls @ICNFG (4303H) after a configuration file has been loaded (5073H), and SYS6/SYS writes it. (disassembly) |
| 4301H ↳17153 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4301H-4302H: the address of the @KITSK jump, 0000H while 4300H holds the RET. SYS6/SYS reads and writes it (its 5456H, 54FCH, 555DH). (disassembly) |
| 4303H ↳17155 ↳@ICNFG | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @ICNFG: RETurn at once. SYS0/SYS's reset calls it after it has loaded CONFIG/SYS (5073H); a configuration that needs to run code at boot leaves a jump here (SYS6/SYS stores into 4303H, its 530AH). (disassembly) |
| 4304H ↳17156 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4304H-4305H: the address of the @ICNFG jump, 0000H while 4303H holds the RET. (disassembly) |
| 4306H ↳17158 ↳SVDAT1$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Not in the file, so a reset keeps them: 4306H, SVDAT1$, the month of the system date OR 50H once a date is set (4EEBH-4EEFH; SYS7/SYS DATE 52ABH, 535FH), and 4307H, SVDAT2$, the day (4EE4H). The reset skips the date prompt when 4306H holds 51H-5CH (a month OR 50H), and the date and the time prompts when it holds 50H (4E9DH-4EA7H). (disassembly) |
| 4307H ↳17159 ↳SVDAT2$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: SVDAT2$, the day of the system date, not in the file, so a reset keeps it: Not in the file, so a reset keeps them: 4306H, SVDAT1$, the month of the system date OR 50H once a date is set (4EEBH-4EEFH; SYS7/SYS DATE 52ABH, 535FH), and 4307H, SVDAT2$, the day (4EE4H). The reset skips the date prompt when 4306H holds 51H-5CH (a month OR 50H), and the date and the time prompts when it holds 50H (4E9DH-4EA7H). (disassembly) |
| 4308H ↳17160 ↳LDRV$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4308H, LDRV$: the drive number of the last disk primitive call (4779H-477CH store Register C here); 4750H selects it again. FFH: no drive yet. BACKUP/CMD stores into it (its 547AH). (disassembly) |
| 4309H ↳17161 ↳PDRV$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4309H, PDRV$: the last value written to the drive select latch 37E1H (45F0H), which 461CH writes again while it waits so the drive stays selected. FFH in the file. (disassembly) |
| 430AH ↳17162 ↳JDCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 430AH-430BH, JDCB$: the address of the file or device control block of the current call, stored by the common file prologue (49F9H). SYS4/SYS reads it to name the file in an error message (its 4F6BH). (disassembly) |
| 430CH ↳17164 ↳JRET$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 430CH-430DH, JRET$: the return address of the program's call into the file system (49F6H), the address SYS4/SYS reports in REFERENCED AT (its 4FFAH). FORMAT/CMD, SYS6/SYS and SYS7/SYS point Register Pair HL at 430DH. (disassembly) |
| 430EH ↳17166 ↳OVRLY$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 430EH, OVRLY$: the request code of the system file now in the overlay area at 4E00H (00H: none). The overlay loader compares and stores it (4C03H-4C0AH); 4A92H and 4BE1H read it; BASIC/CMD and BASIC/OV3 store into it. (disassembly) |
| 430FH ↳17167 ↳SFLAG$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 430FH, SFLAG$, the system flags. Bit 1 run the program without DEBUG (4C6EH), bit 2 a program load by @RUN is in progress (4C62H), bit 3 FAST (the reset doubles the drive motor wait and sets bit 0 of port FEH, 4399H, 5061H), bit 4 BREAK disabled (455BH; the reset clears it, or sets it for an AUTO command that starts with 2AH), bit 5 a JCL job runs, bit 7 DEBUG is on (4C71H); the others are used by the overlays and programs (SYS5/SYS, SYS6/SYS, SYS7/SYS, BASIC/CMD). (disassembly) |
| 4310H ↳17168 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4310H-4311H: the address SYS5/SYS (DEBUG) calls for a command it does not know (its 4E95H): 4876H (OR A / RET), which returns at once with the flags set from Register A. SYS9/SYS stores the address of its extended DEBUG commands here and checks that 4876H is still there before it installs them (its 4E00H-4E22H); SYS6/SYS and SYS7/SYS put 4876H back. (disassembly) |
| 4312H ↳17170 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4312H-4314H: three bytes of 00H. No code of SYS0/SYS addresses them. (disassembly) |
| 4315H ↳17173 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4315H: the BREAK trap switch. C9H (RET) means off, as does any value but C3H (SYS1/SYS stores 00H, its 4E3BH and 4EA9H); a program that wants BREAK to stop it stores C3H (JP) here and the address at 4316H (BASIC/CMD, SYS1/SYS, SYS5/SYS, SYS6/SYS, SYS7/SYS). When the interrupt service routine sees BREAK while 4315H holds C3H and bit 4 of 430FH is clear, it stores 00H here and goes to the address at 4316H instead of returning (455FH-456EH). The supervisor dispatcher keeps it off while an overlay runs (4BD3H, 4BEAH). (disassembly) |
| 4316H ↳17174 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4316H-4317H: the address the BREAK trap goes to, 44B4H (enter DEBUG) in the file. SYS5/SYS and SYS7/SYS store other addresses (their 4F9BH, 5221H). (disassembly) |
| 4318H ↳17176 ↳INBUF$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Not in the file: 4318H-431AH, the first bytes of INBUF$, the 64 byte command line buffer (4318H-4357H: SYS1/SYS reads up to 63 characters into it and stores 03H at 4357H, its 4E16H-4E20H and 4E4FH). During the reset the date and time parser stores its three fields here, the last field typed at 4318H (4349H-4371H); then the reset copies the AUTO command into 4318H-4337H (5030H-5037H), and SYS1/SYS takes command lines from here. Until the first command, 4338H-4357H hold the CONFIG/SYS file specification and the end of the date parser. (disassembly) |
| 431AH ↳17178 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Part of the cells that start at 4318H: Not in the file: 4318H-431AH, the first bytes of INBUF$, the 64 byte command line buffer (4318H-4357H: SYS1/SYS reads up to 63 characters into it and stores 03H at 4357H, its 4E16H-4E20H and 4E4FH). During the reset the date and time parser stores its three fields here, the last field typed at 4318H (4349H-4371H); then the reset copies the AUTO command into 4318H-4337H (5030H-5037H), and SYS1/SYS takes command lines from here. Until the first command, 4338H-4357H hold the CONFIG/SYS file specification and the end of the date parser. (disassembly) |
| 431BH ↳17179 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Boot Prompt: Display, Input, Parse. Used only by the reset (4EB2H for the date, 4FA2H for the time); once the reset has finished, 431BH-4337H is part of INBUF$ and the AUTO command is copied over it. Register Pair HL gives the screen address of the prompt, Register Pair DE the prompt text, Register B the most characters to accept and Register C the limit for a separator (any character below it ends a field). Returns with the CARRY FLAG set when three fields of two digits were read, the fields stored at 431AH, 4319H and 4318H. (disassembly) |
| 4336H ↳17206 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Not in the file: 4336H-4337H, bytes 30 and 31 of INBUF$ (4318H-4357H), the last two bytes of the AUTO command the reset copies there. (disassembly) |
| 4338H ↳17208 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The CONFIG/SYS Filespec. 4338H-4347H: the file specification CONFIG/SYS.CCC:0: the file CONFIG/SYS with the password CCC on drive 0. SYS7/SYS's SYSGEN creates the file under this name. (disassembly) |
| 4348H ↳17224 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4348H: 03H, the end of the file specification. (disassembly) |
| 4349H ↳17225 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Parse Three Two Digit Fields. Reads the line at Register Pair HL as three fields of two digits each, separated by any one character below the limit in Register C, and stores them at 431AH, 4319H and 4318H (the first field typed at 431AH). Returns with the CARRY FLAG set when all three were read. A field that is not two digits, a separator not below Register C, or ENTER before the third field returns with the CARRY FLAG clear (the fields read so far are stored). 4358H-4377H is reused as JFCB$ after the reset. (disassembly) |
| 4358H ↳17240 ↳JFCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Rotate Register A left one bit: Register A = the first digit x 10. (disassembly) |
| 4373H ↳17267 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Not in the file: 4373H-4377H, the last bytes of JFCB$ (4358H-4377H). (disassembly) |
| 4378H ↳17272 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The Video Driver for Lower Case. SYS0/SYS's reset puts 4378H into the video's device control block (401EH) when video memory keeps bit 6 (lower case is fitted). It is the start of the ROM's video driver (0458H-046FH) with one change: for a character 20H-7FH it jumps straight to the ROM's 047DH, passing over the ROM's 0471H-047CH, which folds the codes 60H-7FH into upper case. Entered as a driver: Register Pair IX = the device control block (401DH), Register C = the character, the CARRY FLAG set for a request to read the character at the cursor. (disassembly) |
| 4399H ↳17305 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Wait for the Drive Motor. Reached by the JP 4399H at 45F8H when the controller reported the drive NOT READY (bit 7 of its status, which 461CH leaves in Register A) just before the drive was selected, so the motor was off. It calls the ROM's delay at 0060H with Register B = 7FH (about half a second at the normal clock speed) once, twice when bit 2 of byte +03H of the drive's code table is clear, and twice as often again when bit 3 of SFLAG$ (430FH, FAST) is set. Register Pair BC is kept. (disassembly) |
| 43B0H ↳17328 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Not in the file: 43B0H-43B7H. No code of the LDOS files on this diskette addresses these bytes. (disassembly) |
| 43B8H ↳17336 ↳KISV$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Not in the file: 43B8H-43B9H, KISV$, the keyboard driver address saved by the reset from 4016H (4E25H-4E28H). SYS6/SYS reads it (its 5205H). (disassembly) |
| 43BAH ↳17338 ↳DOSV$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Not in the file: 43BAH-43BBH, DOSV$, the video driver address saved by the reset (4E3EH): 0458H, or 4378H on a computer with lower case. SYS6/SYS reads it (its 520BH). (disassembly) |
| 43BCH ↳17340 ↳PRSV$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Not in the file: 43BCH-43BDH, PRSV$, the printer driver address saved by the reset from 4026H (4E41H-4E44H). PR/FLT and SYS6/SYS read it. (disassembly) |
| 43BEH ↳17342 ↳KIJCL$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Not in the file: 43BEH-43BFH, KIJCL$, where SYS11/SYS (JCL) and KI/DVR keep the keyboard driver address they replaced. (disassembly) |
| 43C0H ↳17344 ↳JLDCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Device Control Blocks of JL, SI and SO. 43C0H, JLDCB$, the job log's device control block, +00H: 08H, the type of a device with nothing assigned (bit 3). (disassembly) |
| 43C1H ↳17345 ↳JLDCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 43C1H-43C5H, JLDCB$ +01H-+05H: no driver address and no driver bytes yet. (disassembly) |
| 43C6H ↳17350 ↳JLDCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 43C6H-43C7H, JLDCB$ +06H-+07H: the device name JL. (disassembly) |
| 43C8H ↳17352 ↳SIDCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 43C8H, SIDCB$, the standard input's device control block, +00H: 08H, nothing assigned. (disassembly) |
| 43C9H ↳17353 ↳SIDCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 43C9H-43CDH, SIDCB$ +01H-+05H: no driver address and no driver bytes yet. (disassembly) |
| 43CEH ↳17358 ↳SIDCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 43CEH-43CFH, SIDCB$ +06H-+07H: the device name SI. (disassembly) |
| 43D0H ↳17360 ↳SODCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 43D0H, SODCB$, the standard output's device control block, +00H: 08H, nothing assigned. (disassembly) |
| 43D1H ↳17361 ↳SODCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 43D1H-43D5H, SODCB$ +01H-+05H: no driver address and no driver bytes yet. (disassembly) |
| 43D6H ↳17366 ↳SODCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 43D6H-43D7H, SODCB$ +06H-+07H: the device name SO. (disassembly) |
| 43D8H ↳17368 ↳S1DCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Not in the file: 43D8H-43FFH, five spare device control blocks (S1DCB$-S5DCB$, eight bytes each). The reset fills them with 00H (4E47H-4E4DH); SET and ROUTE (SYS6/SYS) create user devices in them. (disassembly) |
| 4400H ↳17408 ↳@CMD | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The Supervisor Call Vectors. The fixed entry points of the system, the same address for every program: each is either a JP to a routine of SYS0/SYS or a request stub, LD A with a request code and RST 28H. A request code names a system file in its low four bits (the file number plus 2: 3 for SYS1/SYS up to 0EH for SYS12/SYS) and a function of that file in bits 6-4. Programs CALL these addresses; the supervisor dispatcher (4BCDH) drops the return address the RST pushes, so the overlay's RET goes straight back to the program. That is why a stub needs no RET, and why the byte after some stubs is free: SYS0/SYS keeps variables there (4403H, 4423H, 4427H, 442BH, 442FH, 441FH, 4466H). (disassembly) |
| 4403H ↳17411 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Not in the file: 4403H-4404H, the top of memory found by the reset (4E1AH), kept apart from HIGH$ (4049H) so that a module chain in high memory can be found: SYS10/SYS walks the chain only when HIGH$ differs from it (its 4F2CH); SYS6/SYS reads it too. (disassembly) |
| 4405H ↳17413 ↳@CMNDI | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @CMNDI: Load Register A with 0B3H, the request code of SYS1/SYS's function 30H: execute the command line at Register Pair HL (ended by 0DH); when the command ends, @EXIT (402DH) runs and LDOS Ready follows (SYS1/SYS pushes 402DH as the command's return address, its 4E58H). SYS0/SYS's reset returns into 4405H to run the AUTO command (5029H-502BH); BASIC/CMD, SYS7/SYS and SYS11/SYS jump here. (disassembly) |
| 4409H ↳17417 ↳@ERROR | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @ERROR: Save the interrupted program's Register Pair AF to the stack. Register A holds the error number in bits 5-0, bit 6 set for the short message and bit 7 set to return to the caller instead of ending the program. SYS4/SYS takes it back from the stack. (disassembly) |
| 440DH ↳17421 ↳@DEBUG | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @DEBUG: Jump to 44B4H, which saves Register Pair AF and loads SYS5/SYS, the DEBUG monitor. SYS0/SYS's reset calls 440DH when D (or the DOWN ARROW key) is held at boot (5017H). (disassembly) |
| 4410H ↳17424 ↳@ADTSK | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @ADTSK: Jump to 45A5H to add a task: Register A = the task slot (0-11) and Register Pair DE = the task's block (its first word is the address of its routine). SYS0/SYS's reset adds the clock at slot 7 (4FBDH-4FC2H). (disassembly) |
| 4413H ↳17427 ↳@RMTSK | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @RMTSK: Jump to 45A2H to remove the task in slot Register A: its entry in the task table at 4500H gets the empty block 45B2H. (disassembly) |
| 4416H ↳17430 ↳@RPTSK | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @RPTSK: Jump to 45B4H. A task routine calls it to have its next run start at the instruction after the CALL; the task ends for this tick. (disassembly) |
| 4419H ↳17433 ↳@KLTSK | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @KLTSK: Jump to 459DH. A task routine calls it to remove itself from the task table; it returns to the routine that ran the task. (disassembly) |
| 441CH ↳17436 ↳@FSPEC | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @FSPEC: Load Register A with 0C3H, the request code of SYS1/SYS's function 40H: take a file specification from the text at Register Pair HL into the control block at Register Pair DE. (disassembly) |
| 441FH ↳17439 ↳DFLAG$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 441FH, DFLAG$, the device flags: bit 0 the spooler is installed, bit 1 type ahead, bit 2 the screen print and keyboard macro (JKL) module, bit 3 PR/FLT installed, bit 4 KI/DVR installed (KI/DVR 526FH, PR/FLT 521AH, SYS6/SYS and SYS7/SYS set and test them). 00H at boot. (disassembly) |
| 4420H ↳17440 ↳@INIT | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @INIT: Load Register A with 0A4H, the request code of SYS2/SYS's function 20H: open the file whose control block is at Register Pair DE, creating it when it does not exist (Register Pair HL = its 256 byte buffer, Register B = the record length, 0 for 256). (disassembly) |
| 4423H ↳17443 ↳KFLAG$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4423H, KFLAG$, the keyboard flags. The interrupt routine's keyboard scan (4DA6H) sets bit 0 when BREAK is pressed (unless BREAK is disabled), bit 1 when SHIFT and @ are held (pause) and bit 2 when ENTER is held; the keyboard drivers and the programs clear them. Bit 5 is the CAPS lock, set (20H) at boot. Read and changed by BACKUP/CMD, BASIC/CMD, KI/DVR, TED/CMD, SYS6/SYS, SYS7/SYS and SYS11/SYS. (disassembly) |
| 4424H ↳17444 ↳@OPEN | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @OPEN: Load Register A with 94H, the request code of SYS2/SYS's function 10H: open the existing file whose control block is at Register Pair DE (Register Pair HL = its buffer, Register B = the record length). @LOAD uses it (4C7CH). (disassembly) |
| 4427H ↳17447 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4427H: the last value written to port FEH, the speed control. The reset ORs 01H into it and writes it to the port when bit 3 of 430FH (FAST) is set after the configuration file is loaded (5065H-506EH); SYSTEM (FAST and SLOW, SYS7/SYS 5220H-5231H) changes it. (disassembly) |
| 4428H ↳17448 ↳@CLOSE | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @CLOSE: Load Register A with 95H, the request code of SYS3/SYS's function 10H: close the file or device whose control block is at Register Pair DE. (disassembly) |
| 442BH ↳17451 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 442BH: 00H, the spare byte after @CLOSE. No code of the LDOS files on this diskette addresses it. (disassembly) |
| 442CH ↳17452 ↳@KILL | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @KILL: Load Register A with 9CH, the request code of SYS10/SYS's function 10H: delete the file whose control block is at Register Pair DE. (disassembly) |
| 442FH ↳17455 ↳MFLAG$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 442FH, MFLAG$, the machine flags: bit 0 set by the reset when it was entered with Index Register IY not 0000H, a boot through a disk driver (the Lobo LX-80 interface), which selects the first block of drive tables in the system information sector (4E5EH-4E61H, 4FCEH; SYS6/SYS, SYS7/SYS and FORMAT/CMD read it). (disassembly) |
| 4430H ↳17456 ↳@LOAD | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @LOAD: Jump to 4C77H to load the program file named in the control block at Register Pair DE and return its transfer address in Register Pair HL. (disassembly) |
| 4433H ↳17459 ↳@RUN | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @RUN: Jump to 4C5EH to load the program file named at Register Pair DE and run it. (disassembly) |
| 4436H ↳17462 ↳@READ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @READ: Jump to 48ADH to read the next record of the file at Register Pair DE (into the record area at Register Pair HL when the record length is not 256). (disassembly) |
| 4439H ↳17465 ↳@WRITE | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @WRITE: Jump to 48CBH to write the next record of the file at Register Pair DE. (disassembly) |
| 443CH ↳17468 ↳@VER | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @VER: Jump to 48E6H to write the next record of the file at Register Pair DE and read it back to check it. (disassembly) |
| 443FH ↳17471 ↳@REW | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @REW: Jump to 4835H to put the file at Register Pair DE back at its first record. (disassembly) |
| 4442H ↳17474 ↳@POSN | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @POSN: Jump to 47CFH to put the file at Register Pair DE at the record number in Register Pair BC. (disassembly) |
| 4445H ↳17477 ↳@BKSP | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @BKSP: Jump to 4816H to move the file at Register Pair DE back one record. (disassembly) |
| 4448H ↳17480 ↳@PEOF | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @PEOF: Jump to 483CH to put the file at Register Pair DE at its end, ready to add records. (disassembly) |
| 444BH ↳17483 ↳@CKEOF | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @CKEOF: Jump to 4A1AH to test whether the file at Register Pair DE is at its end (Register A = 1CH and the NZ FLAG at the end, 1DH beyond it, 00H with the Z FLAG before it). (disassembly) |
| 444EH ↳17486 ↳@WEOF | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @WEOF: Jump to 4886H to write the end of file of the file at Register Pair DE into its directory record. (disassembly) |
| 4451H ↳17489 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Load Register A with 0A3H, the request code of SYS1/SYS's function 20H: carry out the command line at Register Pair HL and return to the caller; a line that cannot be carried out returns Register A = 02H with the NZ FLAG (SYS1/SYS 4E29H, 4E97H). SYS6/SYS (its 55A4H) and SYS7/SYS (its 525EH) jump here. (disassembly) |
| 4454H ↳17492 ↳@RREAD | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @RREAD: Jump to 480FH to read the current sector of the file at Register Pair DE again. (disassembly) |
| 4457H ↳17495 ↳@RWRIT | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @RWRIT: Jump to 499EH to write the file's buffer back to the current sector of the file at Register Pair DE. (disassembly) |
| 445AH ↳17498 ↳@LOC | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @LOC: Jump to 484DH to return in Register Pair BC the current record number of the file at Register Pair DE. (disassembly) |
| 445DH ↳17501 ↳@LOF | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @LOF: Jump to 4878H to return in Register Pair BC the number of records of the file at Register Pair DE. (disassembly) |
| 4460H ↳17504 ↳@SKIP | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @SKIP: Jump to 47CBH to pass over the next record of the file at Register Pair DE. (disassembly) |
| 4463H ↳17507 ↳@DODIR | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @DODIR: Load Register A with 0AEH, the request code of SYS12/SYS's function 20H: directory display or directory information of the drive in Register C. (disassembly) |
| 4466H ↳17510 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Not in the file: 4466H, the year of the system date as an offset from 1980 (0-31, 1980-2011), stored by the reset's date prompt (4EC4H) and by SYS7/SYS's DATE (its 5296H, 5353H); the reset works the leap year and the day of the week from it (4EF8H). (disassembly) |
| 4467H ↳17511 ↳@DSPLY | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @DSPLY: Jump to 44E3H to display the text at Register Pair HL (ended by 03H, or by 0DH, which is displayed). (disassembly) |
| 446AH ↳17514 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @PRINT: Jump to 44F8H to print the text at Register Pair HL (ended by 03H or 0DH). (disassembly) |
| 446DH ↳17517 ↳@TIME | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @TIME: Jump to 4D48H to store the time as HH:MM:SS (8 characters) at Register Pair HL. (disassembly) |
| 4470H ↳17520 ↳@DATE | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @DATE: Jump to 4D63H to store the date as MM/DD/YY (8 characters) at Register Pair HL. (disassembly) |
| 4473H ↳17523 ↳@FEXT | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @FEXT: Load Register A with 0D3H, the request code of SYS1/SYS's function 50H: give the file specification at Register Pair DE the extension at Register Pair HL when it has none. (disassembly) |
| 4476H ↳17526 ↳@PARAM | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @PARAM: Load Register A with 0E3H, the request code of SYS1/SYS's function 60H: read the parameters at Register Pair HL against the parameter table at Register Pair DE. (disassembly) |
| 4479H ↳17529 ↳@MSG | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @MSG: JUMP to 44E6H to send the text at Register Pair HL to the device whose control block is at Register Pair DE, until 03H or 0DH. SYS6/SYS calls it (its 5329H, 53C8H). (disassembly) |
| 447BH ↳17531 ↳@LOGOT | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @LOGOT: GOSUB to 44E3H to display the text at Register Pair HL on the video, then go on into @LOGER below to send it to the job log. (disassembly) |
| 447EH ↳17534 ↳@LOGER | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @LOGER: JUMP to 44FDH, a RET: the job log takes nothing until a module points this jump elsewhere. SYS1/SYS, SYS6/SYS and SYS11/SYS call 447EH. (disassembly) |
| 4480H ↳17536 ↳CFCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Not in the file: 4480H-449FH, CFCB$, the 32 byte control block that SYS1/SYS fills for the command being run (its 4E6CH); BASIC/CMD, its overlays, SYS6/SYS and SYS12/SYS use it too. (disassembly) |
| 44A0H ↳17568 ↳SFCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: SFCB$, the Control Block for System Files. 44A0H, SFCB$ +00H: 80H, bit 7 set: the block describes an open file, which the file prologue (49F3H) requires. (disassembly) |
| 44A1H ↳17569 ↳SFCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 44A1H, SFCB$ +01H: the file flags (bits 2-0 the access granted, bit 5 the buffer must be read first). The overlay loader stores 20H here before every load (4C20H-4C22H): full access and an empty buffer. (disassembly) |
| 44A2H ↳17570 ↳SFCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 44A2H, SFCB$ +02H: 00H, not used by SYS0/SYS's file routines. (disassembly) |
| 44A3H ↳17571 ↳SFCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 44A3H-44A4H, SFCB$ +03H-+04H: 4200H, the address of the 256 byte buffer the system file's sectors are read into (the module loader at 4C8DH takes its bytes from 4200H-42FFH). (disassembly) |
| 44A5H ↳17573 ↳SFCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 44A5H, SFCB$ +05H: 00H, the position of the next byte in the buffer. (disassembly) |
| 44A6H ↳17574 ↳SFCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 44A6H, SFCB$ +06H: 00H, the drive: system files are read from drive 0. (disassembly) |
| 44A7H ↳17575 ↳SFCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 44A7H, SFCB$ +07H: the directory record number of the system file, stored by the overlay loader (4C1CH): 3-7 for SYS1/SYS-SYS5/SYS, 20H-26H for SYS6/SYS-SYS12/SYS. (disassembly) |
| 44A8H ↳17576 ↳SFCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 44A8H, SFCB$ +08H: 00H, the end of file byte (not used for a system file). (disassembly) |
| 44A9H ↳17577 ↳SFCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 44A9H, SFCB$ +09H: 00H, the record length: 256 bytes. (disassembly) |
| 44AAH ↳17578 ↳SFCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 44AAH-44ABH, SFCB$ +0AH-+0BH: the next record number, set to 0000H before every load (4C25H-4C27H) so the file is read from its start. (disassembly) |
| 44ACH ↳17580 ↳SFCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 44ACH-44ADH, SFCB$ +0CH-+0DH: FFFFH, the ending record number, as high as it goes, so a system file never reaches its end of file before its last load record. (disassembly) |
| 44AEH ↳17582 ↳SFCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 44AEH-44AFH, SFCB$ +0EH-+0FH: the first extent of the system file (cylinder, then the first granule in bits 7-5 and the granules less one in bits 4-0), copied from bytes 16H-17H of its directory record by 47B4H. (disassembly) |
| 44B0H ↳17584 ↳SFCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 44B0H-44B3H, SFCB$ +10H-+13H: the number of granules of the first extent (a word, 47BBH-47C2H) and the second extent (bytes 18H-19H of the directory record, 47C3H). FFH in the file. (disassembly) |
| 44B4H ↳17588 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The DEBUG Launcher and Four More Vectors. 44B4H is where RST 30H (400FH), @DEBUG (440DH) and the BREAK trap (4316H) lead. Then four request stubs and the jumps to the arithmetic routines. (disassembly) |
| 44B8H ↳17592 ↳@CKDRV | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @CKDRV: Load Register A with 0C4H, the request code of SYS2/SYS's function 40H: check that the drive in Register C is ready and has a diskette. (disassembly) |
| 44BBH ↳17595 ↳@FNAME | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @FNAME: Load Register A with 0A5H, the request code of SYS3/SYS's function 20H: build the file specification of directory record Register B on drive Register C into the buffer at Register Pair DE. (disassembly) |
| 44BEH ↳17598 ↳@DOKEY | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @DOKEY: Load Register A with 0CDH, the request code of SYS11/SYS's function 40H: take a key for a JCL job. SYS11/SYS changes the operand at 44BFH to 0DDH while it answers an input request of the job and back to 0CDH (its 50C3H, 50D7H). (disassembly) |
| 44C1H ↳17601 ↳@MULT | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @MULT: Jump to 4B8FH to multiply Register Pair HL by Register A (the 24 bit product: Register Pair HL the high 16 bits, Register A the low 8 bits). (disassembly) |
| 44C4H ↳17604 ↳@DIV | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @DIV: Jump to 4BA9H to divide Register Pair HL by Register A (quotient in Register Pair HL, remainder in Register A). (disassembly) |
| 44C7H ↳17607 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @DVRHK: Find the Driver of a Device. The ROM's device routine (03C2H) jumps to 4033H, and so here at 44CAH, when the type of a device control block does not match the request: Index Register IX = the block, Register B = the request (01H input, 02H output, 04H control), Register C = the character, and the ROM's return address 03DDH on the stack. A block of type 10H is linked to another block (its +01H-+02H): the code follows the links. A type above 10H is an open file control block: its byte is read or written by 48ECH. A type with bit 3 set has nothing assigned and returns at once. Any other block's driver is called at its +01H-+02H. (disassembly) |
| 44E3H ↳17635 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @DSPLY, @PRINT and @MSG: Send a Text to a Device. 44E3H sends to the video (401DH), 44F8H to the printer (4025H), 44E6H (@MSG at 4479H) to the device control block in Register Pair DE. The text at Register Pair HL ends with 03H (not sent) or 0DH (sent). Register Pair HL comes back unchanged. (disassembly) |
| 44F8H ↳17656 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @PRINT: Point Register Pair DE to 4025H, PRDCB$, the printer's device control block. (disassembly) |
| 44FEH ↳17662 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 44FEH-44FFH: two bytes of 00H. No code of SYS0/SYS addresses them. (disassembly) |
| 4500H ↳17664 ↳TCB$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: TCB$, the Task Table. 4500H-4501H: the entry of task slot 0 (run on every eighth tick, when bits 2-0 of TIMER$ (4040H) equal 0): 45B2H, the empty block, whose routine is the RET at 45B1H. (disassembly) |
| 4502H ↳17666 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4502H-4503H: the entry of task slot 1 (run on every eighth tick, when bits 2-0 of TIMER$ (4040H) equal 1): 45B2H, the empty block, whose routine is the RET at 45B1H. (disassembly) |
| 4504H ↳17668 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4504H-4505H: the entry of task slot 2 (run on every eighth tick, when bits 2-0 of TIMER$ (4040H) equal 2): 45B2H, the empty block, whose routine is the RET at 45B1H. (disassembly) |
| 4506H ↳17670 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4506H-4507H: the entry of task slot 3 (run on every eighth tick, when bits 2-0 of TIMER$ (4040H) equal 3): 45B2H, the empty block, whose routine is the RET at 45B1H. (disassembly) |
| 4508H ↳17672 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4508H-4509H: the entry of task slot 4 (run on every eighth tick, when bits 2-0 of TIMER$ (4040H) equal 4): 45B2H, the empty block, whose routine is the RET at 45B1H. (disassembly) |
| 450AH ↳17674 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 450AH-450BH: the entry of task slot 5 (run on every eighth tick, when bits 2-0 of TIMER$ (4040H) equal 5): 45B2H, the empty block, whose routine is the RET at 45B1H. (disassembly) |
| 450CH ↳17676 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 450CH-450DH: the entry of task slot 6 (run on every eighth tick, when bits 2-0 of TIMER$ (4040H) equal 6): 45B2H, the empty block, whose routine is the RET at 45B1H. SYS7/SYS puts the clock display 4D3AH here and takes it out again (its 532AH-5334H). (disassembly) |
| 450EH ↳17678 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 450EH-450FH: the entry of task slot 7 (run on every eighth tick, when bits 2-0 of TIMER$ (4040H) equal 7): 45B2H, the empty block, whose routine is the RET at 45B1H. SYS0/SYS's reset puts the clock's block 45BEH here (4FBDH-4FC2H). (disassembly) |
| 4510H ↳17680 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4510H-4511H: the entry of task slot 8 (run on every tick): 45B2H, the empty block, whose routine is the RET at 45B1H. (disassembly) |
| 4512H ↳17682 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4512H-4513H: the entry of task slot 9 (run on every tick): 45B2H, the empty block, whose routine is the RET at 45B1H. (disassembly) |
| 4514H ↳17684 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4514H-4515H: the entry of task slot 10 (run on every tick): 45B2H, the empty block, whose routine is the RET at 45B1H. (disassembly) |
| 4516H ↳17686 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4516H-4517H: the entry of task slot 11 (run on every tick): 45B2H, the empty block, whose routine is the RET at 45B1H. SYS7/SYS puts the program counter display 4D6AH here and takes it out again (its 53A7H-53B1H). (disassembly) |
| 4518H ↳17688 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The Interrupt Service Routine. ROM 0038H (RST 38H in interrupt mode 1) jumps to 4012H and so here. It reads the expansion interface's interrupt latch at 37E0H (bit 7 the 25 millisecond clock, bit 6 the disk controller), keeps a copy at 404BH, and for every bit that is also set in the mask at 404CH calls the routine whose address is in that bit's vector at 404DH-405CH. Then it scans the keyboard for BREAK, SHIFT @ and ENTER (4DA6H): SHIFT BREAK selects the drive of the last disk call again, BREAK alone springs the BREAK trap at 4315H. Registers are kept. (disassembly) |
| 456FH ↳17775 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The Clock Interrupt: Run the Tasks. The vector of interrupt bit 7 (405BH), 40 times a second. It runs the tasks of slots 8, 9, 10 and 11, counts the tick in TIMER$ (4040H) and runs the task of slot 0-7 that bits 2-0 of the count select. (disassembly) |
| 458AH ↳17802 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Run the Task in Slot A. Register A = the slot (0-11). Points Index Register IX at the slot's task block and jumps to the routine whose address is the block's first word. The address of the slot's table entry is kept in the operand at 45B5H for @RPTSK and @KLTSK. (disassembly) |
| 459DH ↳17821 ↳@KLTSK | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @KLTSK, @RMTSK and @ADTSK. 459DH (@KLTSK) is called by a running task to remove itself; 45A2H (@RMTSK) removes the task in slot Register A; 45A5H (@ADTSK) puts the block at Register Pair DE into slot Register A. Interrupts are off while the two bytes of an entry change. A slot number of 12 or more is ignored. (disassembly) |
| 45A2H ↳17826 ↳@RMTSK | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @RMTSK: Point Register Pair DE to 45B2H, the empty task block. (disassembly) |
| 45A5H ↳17829 ↳@ADTSK | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @ADTSK: Compare Register A (the slot) against 0CH. The NO CARRY FLAG is set for a slot of 12 or more. (disassembly) |
| 45B2H ↳17842 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 45B2H-45B3H: the empty task block. Its first word is 45B1H, the RET above, so a free slot does nothing. (disassembly) |
| 45B4H ↳17844 ↳@RPTSK | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @RPTSK: Load Register Pair HL with the address of the running slot's entry in TCB$. The operand at 45B5H-45B6H is 0000H in the file; 458EH stores the entry's address there before every task runs. (disassembly) |
| 45B5H ↳17845 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Part of the cells that start at 45B4H: @RPTSK: Load Register Pair HL with the address of the running slot's entry in TCB$. The operand at 45B5H-45B6H is 0000H in the file; 458EH stores the entry's address there before every task runs. (disassembly) |
| 45BEH ↳17854 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The Clock Task. 45BEH-45BFH: the block's first word: 45C1H, its routine. (disassembly) |
| 45C0H ↳17856 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 45C0H, the block's byte +02H: the count of calls left before the next second, 05H. The routine counts it down through Index Register IX. (disassembly) |
| 45DBH ↳17883 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 45DBH-45DCH: two bytes of 00H. No code of SYS0/SYS addresses them. (disassembly) |
| 45DDH ↳17885 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 45DDH-45DFH: the limits of the clock fields: 3CH (60) seconds, 3CH (60) minutes, 18H (24) hours, read by 45D2H. (disassembly) |
| 45E0H ↳17888 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The Floppy Disk Driver: Select the Drive. SYS0/SYS's driver for the expansion interface's floppy disk controller (registers 37ECH-37EFH, drive select latch 37E1H). Every drive code table entry of a floppy drive jumps to 45FBH. 45E0H waits until the controller is not busy, then writes the drive's select line(s) and side bit to the latch; if the controller had reported NOT READY (the motor was off) it waits for the motor through 4399H. Index Register IY points at the drive's code table. (disassembly) |
| 45FBH ↳17915 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The Driver's Entry: Function Dispatch. The address every floppy drive code table jumps to (4700H +00H: JP 45FBH). Register B = the function: 00H nothing, 01H select, 02H-04H restore to cylinder 0, 05H step in one cylinder, 06H seek, 07H wait until not busy, 09H read a sector, 0AH verify a sector, 0BH-0DH write a sector, 0EH write a sector with the deleted data mark (directory), 0FH write a track. Register C = the drive, Register D = the cylinder, Register E = the sector, Register Pair HL = the buffer, Index Register IY = the drive code table. Returns with the Z FLAG set and Register A = 00H when the function succeeded, otherwise Register A = the error number. (disassembly) |
| 461CH ↳17948 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Wait Until the Controller Is Not Busy. Returns when bit 0 (BUSY) of the controller's status is clear, with the status in Register A. While it waits it writes the last drive select value (4309H) to the latch again, which keeps the drive selected and its motor running. It is also the vector of the controller's interrupt (4059H) and function 07H of the driver. (disassembly) |
| 462AH ↳17962 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Seek: Cylinder D, Sector E. 462AH waits for the controller first; 462DH does not. The sector number in Register E counts through both sides of a cylinder: a number at or above the sectors on a track (byte +07H, bits 4-0, plus 1) is reduced by that count and, on a drive with two sides (byte +04H bit 5), bit 4 of byte +03H is set for side 1. The sector and the cylinder go to the controller's sector and data registers, the cylinder also to byte +05H, and the Seek command is issued with the drive's step rate. Register Pair DE comes back unchanged. (disassembly) |
| 466BH ↳18027 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The Read and Write Engine. Functions 08H and up. Register B gets the number of tries and Register C the controller command: 88H Read Sector (10 tries), 88H for a verify (5 tries), A8H Write Sector, ABH Write Sector with the deleted data mark (function 0EH) and F4H Write Track (function 0FH), 5 tries for the writes. The three bytes after each CALL 469AH are its parameters: the first error number of the operation and the two bytes of the transfer loop's body. A write is refused with error 0FH when bit 7 of byte +03H of the drive code table (the software write protect) is set. (disassembly) |
| 4679H ↳18041 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The parameters of a read: 01H, the first error number of a read (469DH stores it at 46F6H, so the errors of the status bits are 03H lost data, 04H parity error, 05H not found, 06H a system data record (the deleted data mark of a directory sector), 07H a locked or deleted record), and 1AH 02H, the body of the transfer loop: LD A,(DE) / LD (BC),A, a byte from the data register into the buffer. (disassembly) |
| 467FH ↳18047 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The parameters of a verify: 01H, the first error number of a read, and 1AH 0EH, the loop body LD A,(DE) / LD C,03H: the byte is read from the data register and not stored (the 0EH takes the INC BC at 46D3H as its operand). Entered at 4681H from 4672H, the bytes 0EH A8H are LD C,0A8H: the command Write Sector for the writes. (disassembly) |
| 4697H ↳18071 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The parameters of a write: 09H, the first error number of a write (0BH lost data, 0CH parity error, 0DH not found, 0EH write fault, 0FH write protected), and 0AH 12H, the loop body LD A,(BC) / LD (DE),A, a byte from the buffer into the data register. (disassembly) |
| 46FFH ↳18175 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 46FFH: FDH, the last byte but one of the load record 461CH-4700H; the record ends with E9H at 4700H (FDH E9H, JP (IY)), but the next record (4700H-47CAH) loads C3H over 4700H, so in memory 46FFH-4700H are FDH C3H. No code of the LDOS files on this diskette jumps to 46FFH. (disassembly) |
| 4700H ↳18176 ↳DCT$ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: DCT$, the Drive Code Tables. 4700H-4702H, drive 0, +00H-+02H: JP 45FBH, SYS0/SYS's floppy disk driver; the drive is present. (disassembly) |
| 4703H ↳18179 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4703H, drive 0, +03H: 83H, step rate 3 and bit 7 (write protect) set. The reset keeps only bits 6-2 and puts in the bootstrap step rate of the boot sector (4E6EH-4E75H: AND 7CH, OR the rate), so the write protect bit is off after a boot. (disassembly) |
| 4704H ↳18180 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4704H, drive 0, +04H: 01H, select line 1 (drive 0). The reset ORs in bit 5 when the allocation table of the diskette in drive 0 says two sides (4FE3H-4FEDH). (disassembly) |
| 4705H ↳18181 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4705H, drive 0, +05H: 01H, the cylinder the head is on as the file was built; the first Seek tells the controller this value through its track register. (disassembly) |
| 4706H ↳18182 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4706H, drive 0, +06H: 22H, highest cylinder 34 (35 cylinders). (disassembly) |
| 4707H ↳18183 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4707H, drive 0, +07H: 09H, highest sector 9 (10 sectors a track, single density), one head. (disassembly) |
| 4708H ↳18184 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4708H, drive 0, +08H: 24H, 5 sectors to a granule (bits 4-0 plus 1) and 2 granules on a track (bits 7-5 plus 1). (disassembly) |
| 4709H ↳18185 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4709H, drive 0, +09H: 11H, directory cylinder 17. The reset stores the directory cylinder from byte 2 of the boot sector here (4E76H-4E79H). (disassembly) |
| 470AH ↳18186 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 470AH-4713H, drive 1: JP 45FBH (present), +03H 03H step rate 3, +04H 02H select line 2, +05H 11H head on cylinder 17, +06H 22H 35 cylinders, +07H 09H 10 sectors, +08H 24H 2 granules of 5 sectors, +09H 11H directory cylinder 17. Replaced by the reset from the system information sector. (disassembly) |
| 4714H ↳18196 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4714H-471DH, drive 2: JP 45FBH (present), step rate 3, select line 4, head on cylinder 17, 35 cylinders of 10 sectors, 2 granules of 5 sectors, directory cylinder 17. Replaced by the reset. (disassembly) |
| 471EH ↳18206 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 471EH-4727H, drive 3: JP 45FBH (present), step rate 3, select line 8, head on cylinder 17, 35 cylinders of 10 sectors, 2 granules of 5 sectors, directory cylinder 17. Replaced by the reset. (disassembly) |
| 4728H ↳18216 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4728H, drive 4, +00H: C9H (RET), not present. Replaced by the reset. (disassembly) |
| 4729H ↳18217 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4729H-4731H, drive 4, +01H-+09H: 00H, no driver and no geometry. (disassembly) |
| 4732H ↳18226 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4732H, drive 5, +00H: C9H (RET), not present. Replaced by the reset. (disassembly) |
| 4733H ↳18227 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4733H-473BH, drive 5, +01H-+09H: 00H, no driver and no geometry. (disassembly) |
| 473CH ↳18236 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 473CH, drive 6, +00H: C9H (RET), not present. Replaced by the reset. (disassembly) |
| 473DH ↳18237 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 473DH-4745H, drive 6, +01H-+09H: 00H, no driver and no geometry. (disassembly) |
| 4746H ↳18246 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4746H, drive 7, +00H: C9H (RET), not present. Replaced by the reset. (disassembly) |
| 4747H ↳18247 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4747H-474FH, drive 7, +01H-+09H: 00H, no driver and no geometry. (disassembly) |
| 4750H ↳18256 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The Disk Primitives. The named entry points the system and the utilities use for a sector operation: each loads the driver function into Register A and joins 4779H, which calls the driver of the drive in Register C through its drive code table. Each entry is five bytes, and the fifth byte of most is a variable. 4750H is the same with the drive of the last call (LDRV$, 4308H). (disassembly) |
| 4754H ↳18260 ↳SELECT | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: SELECT: Load Register A with 01H, the driver's function select the drive. (disassembly) |
| 4758H ↳18264 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4758H: the fifth byte of SELECT, the status byte of the command interpreter. SYS1/SYS clears it for every command line typed or given to @CMNDI, sets bit 1 for a line from a program (function 20H) and bit 2 while a line is typed, and tests bit 4 (no program run) and bit 1 (its 4E22H-4E53H, 4E8EH, 4E97H). Members of SYS6/SYS and SYS7/SYS test bit 1 and set bit 3, which KI/DVR tests (its 520BH); SYS4/SYS skips the error message when bit 6 is set and gives the short message when bit 7 is set (its 4EC7H-4EDDH) and clears bit 7, which TED/CMD sets (its 56AFH). (disassembly) |
| 4759H ↳18265 ↳RSELCT | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: RSELCT: Load Register A with 07H, the driver's function wait until the controller is not busy. (disassembly) |
| 475DH ↳18269 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 475DH: the fifth byte of RSELCT, the date stamping flags that SYS2/SYS (its 4EA7H) and SYS3/SYS (its 4E99H) use when they open and close files; BACKUP/CMD, SYS6/SYS and SYS7/SYS read it too. (disassembly) |
| 475EH ↳18270 ↳SEEK | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: SEEK: Load Register A with 06H, the driver's function seek cylinder Register D for sector Register E. (disassembly) |
| 4762H ↳18274 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4762H: the fifth byte of SEEK, FFH. No code of the LDOS files on this diskette addresses it. (disassembly) |
| 4763H ↳18275 ↳WRSECT | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: WRSECT: Load Register A with 0DH, the driver's function write the sector at Register Pair HL to cylinder Register D, sector Register E. (disassembly) |
| 4767H ↳18279 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4767H: the fifth byte of WRSECT, 01H: the cylinder where SYS8/SYS starts its search for free space (its 4EBFH). Nothing writes it, so every search starts at cylinder 1. (disassembly) |
| 4768H ↳18280 ↳WRPROT | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: WRPROT: Load Register A with 0EH, the driver's function write a sector with the deleted data mark, used for every directory sector (4B25H). (disassembly) |
| 476CH ↳18284 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 476CH: the fifth byte of WRPROT, 00H. No code of the LDOS files on this diskette addresses it. (disassembly) |
| 476DH ↳18285 ↳WRTRK | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: WRTRK: Load Register A with 0FH, the driver's function write a track (FORMAT/CMD) from the buffer at Register Pair HL. (disassembly) |
| 4771H ↳18289 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4771H: the fifth byte of WRTRK, 00H. No code of the LDOS files on this diskette addresses it. (disassembly) |
| 4772H ↳18290 ↳VERSEC | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: VERSEC: Load Register A with 0AH, the driver's function verify (read without storing) cylinder Register D, sector Register E. (disassembly) |
| 4776H ↳18294 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4776H: the fifth byte of VERSEC, 00H. No code of the LDOS files on this diskette addresses it. (disassembly) |
| 4777H ↳18295 ↳RDSECT | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: RDSECT: Load Register A with 09H, the driver's function read cylinder Register D, sector Register E into the buffer at Register Pair HL. The code goes on into 4779H. (disassembly) |
| 478EH ↳18318 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 478EH: 00H, the spare byte after the primitives. (disassembly) |
| 478FH ↳18319 ↳GETDCT | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: GETDCT and DCTBYT: Find a Drive's Code Table. 478FH (GETDCT) points Index Register IY at the drive code table of drive Register C (bits 2-0). 479CH (DCTBYT) returns in Register A byte Register A (an offset 0-9) of drive Register C's table; 4797H does that for byte +08H of the drive in byte +06H of the file control block at Index Register IX. 47A5H works out the address. (disassembly) |
| 479CH ↳18332 ↳DCTBYT | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: DCTBYT: Save the caller's Register Pair HL to the stack. (disassembly) |
| 47B4H ↳18356 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Copy a System File's Extents into SFCB$. The overlay loader (4C37H) calls this with Register A = the low byte of the first extent's address in the directory record in the buffer at 4200H (the record + 16H). It copies the first extent (cylinder, granule byte) to 44AEH-44AFH, stores the number of granules of that extent as a word at 44B0H-44B1H, and copies the second extent (record + 18H) to 44B2H-44B3H. (disassembly) |
| 47CBH ↳18379 ↳@SKIP | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @SKIP and @POSN: Position a File. 47CBH (@SKIP) works out the current record (484DH) and positions to the next one; 47CFH (@POSN) positions to record Register Pair BC. Register Pair DE = the file control block (Index Register IX after the prologue). In byte mode (bit 7 of +01H) with a record length below 256, the record number is turned into a sector and an offset (record x length); otherwise the record is the sector. When the buffer already holds that sector only the offset changes; else the buffer is written if it was changed, the next record number (+0AH-+0BH) becomes the sector and bit 5 of +01H marks the buffer to be read before the next byte. Then the end of file is tested (4A1DH). (disassembly) |
| 47CFH ↳18383 ↳@POSN | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @POSN: GOSUB to 49F3H, the file prologue: it checks that the control block at Register Pair DE is open, points Index Register IX at it, saves Register Pairs BC, DE and HL and Index Register IX for the return, and comes back with Register A = 00H. (disassembly) |
| 480FH ↳18447 ↳@RREAD | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @RREAD and @BKSP. 480FH (@RREAD) marks the sector the buffer holds to be read again; 4816H (@BKSP) moves back one record (in byte mode by the record length within the buffer when it can, else to the sector before). Both end at 47FEH with the new next record number on the stack. (disassembly) |
| 4816H ↳18454 ↳@BKSP | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @BKSP: GOSUB to 49F3H, the file prologue (Index Register IX = the file control block, Register A = 00H). (disassembly) |
| 4835H ↳18485 ↳@REW | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @REW and @PEOF. 4835H (@REW) positions the file at its first record; 483CH (@PEOF) at its end of file: the ending record number (+0CH-+0DH), less one when the end of file byte (+08H) is not 0, with the end of file byte as the offset. (disassembly) |
| 483CH ↳18492 ↳@PEOF | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @PEOF: GOSUB to 49F3H, the file prologue (Index Register IX = the file control block, Register A = 00H). (disassembly) |
| 484DH ↳18509 ↳@LOC | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @LOC and @LOF. 484DH (@LOC) returns in Register Pair BC the current record number of the file; 4878H (@LOF) the number of records (from the ending record number and the end of file byte). A position in sectors and bytes is divided by the record length; a partial record counts as one. Register A returns the high byte of the sector quotient. The result is put where the prologue's restore (4A14H) takes Register Pair BC from. (disassembly) |
| 4878H ↳18552 ↳@LOF | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @LOF: GOSUB to 49F3H, the file prologue (Index Register IX = the file control block, Register A = 00H). (disassembly) |
| 4886H ↳18566 ↳@WEOF | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @WEOF: Write the End of File to the Directory. Writes the buffer if it changed, then reads the file's directory record (drive +06H, record number +07H) and stores the end of file byte (record +03H) and the ending record number (record +14H-+15H) from the file control block. 49EDH enters at 488CH after a write when bit 3 of +01H asks for it. (disassembly) |
| 48ADH ↳18605 ↳@READ | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @READ, @WRITE and @VER. 48ADH reads the next record: with 256 byte records the next sector is read into the file's buffer (494FH); with shorter records the record's bytes are taken one by one into the record area at Register Pair HL. 48CBH writes the next record the same way (from the buffer, 49ABH, or byte by byte from Register Pair HL), and 48E6H does the same with the verify switch (49CFH) on. (disassembly) |
| 48CBH ↳18635 ↳@WRITE | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @WRITE: GOSUB to 49F3H, the file prologue (Index Register IX = the file control block, Register A = 00H). @VER joins at 48CEH with Register A = 01H. (disassembly) |
| 48E6H ↳18662 ↳@VER | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @VER: GOSUB to 49F3H, the file prologue (Index Register IX = the file control block, Register A = 00H). (disassembly) |
| 48ECH ↳18668 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: A File Used as a Device. @DVRHK (44D7H) comes here when a device's control block is an open file (type above 10H): Index Register IX = the file control block, Register B = the request (01H input, 02H output, 04H control), Register C = the character. The file is put into byte mode (bit 7 of +01H) and one byte is taken from it or put into it. 48FCH, the byte fetch, is also used by @READ. (disassembly) |
| 4919H ↳18713 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Put a Byte into a File. Puts the byte in Register A at the current position of the file at Index Register IX: reads the sector first if needed, stores the byte, marks the buffer changed (bit 4 of +01H), and moves the end of file (+08H, +0CH-+0DH) when the byte is at or past it, unless the file was positioned inside (bit 6 of +01H). When the buffer fills it is written out (49A1H). (disassembly) |
| 494FH ↳18767 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Read the Sector of the Next Record Number. 494FH tests the end of file first; 4953H does not. The file's access (bits 2-0 of +01H) must allow reading (below 6, else error 25H). The next record number is turned into a cylinder and sector (4A41H, which allocates space when needed), the sector is read into the buffer through RDSECT (4777H), bit 5 is cleared and the next record number goes up by one. A sector with the deleted data mark (error 06H) is accepted. (disassembly) |
| 4993H ↳18835 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Write the Buffer When It Was Changed. 4993H writes the buffer to the sector before the next record number only when the file is in byte mode (bit 7 of +01H) and the buffer was changed (bit 4); 499EH (@RWRIT) always writes it, 49A1H writes it after the prologue and 49ABH writes it as the next sector. The access (bits 2-0 of +01H) must allow writing (below 5, else error 25H). After the write (and a verify when 49CFH is 01H) the next record number goes up by one; when the write was at or past the end of file and the file was not positioned inside, the ending record number moves up, and bit 3 of +01H makes the directory record follow at once (488CH). (disassembly) |
| 499EH ↳18846 ↳@RWRIT | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @RWRIT: GOSUB to 49F3H, the file prologue (Index Register IX = the file control block, Register A = 00H). (disassembly) |
| 49CFH ↳18895 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Part of the cells that start at 49CEH: Load Register A with the verify switch: the operand at 49CFH is 00H in the file; @WRITE stores 00H and @VER 01H there (48CEH). (disassembly) |
| 49F1H ↳18929 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The File Prologue. Every file routine calls 49F3H first (49F1H skips the open test). Register Pair DE = the file control block. 49F3H loads byte +00H and rotates bit 7 (open) into the CARRY FLAG; 49F1H sets the CARRY FLAG instead (the JP NC that follows it is never taken: its bytes 1AH 07H are the LD A,(DE) / RLCA of 49F3H). The routine notes the caller's address in JRET$ (430CH) and the control block in JDCB$ (430AH), returns error 26H (file not open) when bit 7 is clear, and otherwise points Index Register IX at the block, saves Register Pairs BC, DE and HL and Index Register IX under the caller's return address with 4A14H on top, and returns with Register A = 00H. The caller's final RET then goes to 4A14H, which restores them. (disassembly) |
| 4A1AH ↳18970 ↳@CKEOF | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @CKEOF: Test the End of File. 4A1AH (@CKEOF) runs the prologue first; 4A1DH is called by the file routines. It compares the current position (the sector worked out from the next record number by 4D8FH, and the byte position +05H) with the ending record number (+0CH-+0DH) and the end of file byte (+08H). Returns Register A = 00H with the Z FLAG before the end, 1CH (error 28, end of file encountered) at the end, 1DH (error 29, record number out of range) past it, with the NZ FLAG. Register Pair HL comes back as the next record number and Register C as the position in the buffer. (disassembly) |
| 4A41H ↳19009 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Find the Sector of the Next Record Number. Turns the next record number (+0AH-+0BH) of the file at Index Register IX into a cylinder (Register D) and sector (Register E) on drive Register C. The record number divided by the sectors in a granule gives the file's granule and the sector in it (kept in the operand at 4B0CH). The file's extents are searched in the control block (+0EH-+1FH: the first extent at +0EH-+0FH starting at granule 0, then four entries of a starting granule word, a cylinder and a granule byte); an entry not in use has FFH as its cylinder. When the granule is in none of them, SYS8/SYS (request 9AH, @ALLOC) finds or allocates it and updates the entries. A hit in the third to fifth entry is moved to the second entry. The granule then becomes a cylinder (granules a cylinder from byte +08H and +04H bit 5 of the drive code table) and a sector. Returns with Register A = 00H and the Z FLAG set, or with the error number from SYS8/SYS. (disassembly) |
| 4B0CH ↳19212 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Part of the cells that start at 4B0BH: ADD the sector within the granule to Register A: the operand at 4B0CH (00H in the file) is stored by 4A4DH and 4AACH. (disassembly) |
| 4B10H ↳19216 ↳DIRRD | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: DIRRD and DIRWR: Read and Write a Directory Sector. 4B10H (DIRRD) reads the directory sector that holds record Register B of drive Register C into 4200H and returns Register Pair HL pointing at the record (error 11H, directory read error, on failure). 4B1FH (DIRWR) writes the sector at 4200H back with the deleted data mark and verifies it (error 12H, directory write error, or 0FH, write protected). Directory record B is the 32 byte slot (B AND E0H) of sector (B AND 1FH) + 2 of the directory cylinder. Register Pair DE is kept. (disassembly) |
| 4B1FH ↳19231 ↳DIRWR | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: DIRWR: Save the caller's Register Pair DE to the stack. (disassembly) |
| 4B45H ↳19269 ↳RDSSEC | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: RDSSEC: Read a Directory Sector. Reads cylinder Register D, sector Register E of drive Register C into the buffer at Register Pair HL and accepts it only when it carries the deleted data mark (read error 06H). When it does not, the diskette in the drive may have its directory on another cylinder: the boot sector (cylinder 0, sector 0) is read, byte 2 (the directory cylinder) is stored in the drive's code table (+09H) and the sector is read again from that cylinder. Returns the Z FLAG set on success; Register A = the read result less 6. (disassembly) |
| 4B64H ↳19300 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4B64H: 00H, a spare byte. No code addresses it. (disassembly) |
| 4B65H ↳19301 ↳DIRCYL | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: DIRCYL: Load Register A with 09H, the offset of the directory cylinder in a drive code table. (disassembly) |
| 4B6CH ↳19308 ↳MULTEA | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: MULTEA, DIVEA, @MULT and @DIV. Four arithmetic routines. 4B6CH (MULTEA): Register A = Register A x Register E (8 bits). 4B7BH (DIVEA): Register E / Register A, the quotient in Register A and the remainder in Register E. 4B8FH (@MULT, 44C1H): Register Pair HL x Register A, a 24 bit product in Register Pair HL (high 16 bits) and Register A (low 8 bits). 4BA9H (@DIV, 44C4H): Register Pair HL / Register A, the quotient in Register Pair HL and the remainder in Register A. Register Pair BC is kept by all four. (disassembly) |
| 4B7BH ↳19323 ↳DIVEA | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: DIVEA: Save the caller's Register Pair BC to the stack. (disassembly) |
| 4B8FH ↳19343 ↳@MULT | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @MULT: Save the caller's Register Pair BC to the stack. (disassembly) |
| 4BA9H ↳19369 ↳@DIV | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @DIV: Save the caller's Register Pair DE to the stack. (disassembly) |
| 4BBCH ↳19388 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4BBCH-4BC8H: 13 bytes of 00H. SYS1/SYS stores a word at 4BC0H (its 4F43H). (disassembly) |
| 4BC9H ↳19401 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4BC9H-4BCAH: every system file 1-12 starts with a load block for these two bytes: the length of the file's part at 4E00H (for example 03AFH for SYS4/SYS), so they always hold the length of the system file in the overlay area. SYS7/SYS reads and writes them (its 5764H, 5812H). (disassembly) |
| 4BC9H ↳19401 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: The Overlay Length (Data). Every system file from SYS1/SYS to SYS12/SYS carries a load block for the two bytes 4BC9H-4BCAH in the resident area of SYS0/SYS. They hold the length of the file's part in the overlay area: for SYS1/SYS 03F9H, the 1017 bytes 4E00H-51F8H. In the file this block is the last load block, after the four blocks of 4E00H-51F8H and before the transfer address record (4E00H). SYS7/SYS reads and writes the word (its 5764H, 5812H). The two bytes are data, not instructions. (disassembly) |
| 4BC9H ↳19401 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: The Overlay Length (Data). Every system file from SYS1/SYS to SYS12/SYS carries a load block for the two bytes 4BC9H-4BCAH in the resident area of SYS0/SYS. They hold the length of the file's part in the overlay area: for SYS2/SYS 0400H, the 1024 bytes 4E00H-51FFH, one more than the last loaded byte (51FEH), because 51FFH is a cell of SYS2/SYS that the file does not load. In the file this block is the last load block, after the six blocks of 4E00H-51FEH and before the transfer address record (4E00H). SYS7/SYS reads and writes the word (its 5764H, 5812H). The two bytes are data, not instructions. (disassembly) |
| 4BC9H ↳19401 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS3: The Overlay Length (Data). Every system file from SYS1/SYS to SYS12/SYS carries a load block for the two bytes 4BC9H-4BCAH in the resident area of SYS0/SYS. They hold the length of the file's part in the overlay area: for SYS3/SYS 02A6H, the 678 bytes 4E00H-50A5H. In the file this block is the last load block, after the three blocks of 4E00H-50A5H and before the transfer address record (4E00H). SYS7/SYS reads and writes the word (its 5764H, 5812H). The two bytes are data, not instructions. (disassembly) |
| 4BC9H ↳19401 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS4: The Overlay Length (Data). Every system file from SYS1/SYS to SYS12/SYS carries a load block for the two bytes 4BC9H-4BCAH in the resident area of SYS0/SYS. They hold the length of the file's part in the overlay area: for SYS4/SYS 03AFH, the 943 bytes 4E00H-51AEH. In the file this block is the last load block, after the four blocks of 4E00H-51AEH and before the transfer address record (4E00H). SYS7/SYS reads and writes the word (its 5764H, 5812H). The two bytes are data, not instructions. (disassembly) |
| 4BC9H ↳19401 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: The Overlay Length (Data). Every system file from SYS1/SYS to SYS12/SYS carries a load block for the two bytes 4BC9H-4BCAH in the resident area of SYS0/SYS. They hold the length of the file's part in the overlay area: for SYS5/SYS 03FFH, the 1023 bytes 4E00H-51FEH. In the file this block is the last load block, after the four blocks of 4E00H-51FEH and before the transfer address record (4E00H). The two bytes are data, not instructions. (disassembly) |
| 4BCBH ↳19403 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Call a Drive's Driver. The disk primitives (4787H) CALL here: the jump goes to the drive code table at Index Register IY, whose first three bytes are a JP to the driver or a RET. (disassembly) |
| 4BCDH ↳19405 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The Supervisor Dispatcher (RST 28H). ROM 0028H jumps to 400CH and so here with the request code in Register A. A code below 80H is handled at 4BEFH. For 80H and above, the return address of the RST is dropped (the overlay returns straight to the program that called the request stub), the BREAK trap switch (4315H) is turned off and saved, the system file the code names is loaded when it is not already at 4E00H (4BF5H), and its entry is called with Register A = the request code from OVRLY$ (430EH). Then the BREAK trap switch is put back. (disassembly) |
| 4BF5H ↳19445 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Load the System File of a Request. Register A = the request code, Register B = the library command (for 88H and 89H). A library request (88H, SYS6/SYS, or 89H, SYS7/SYS) always loads, because each command is its own member of the file. For the others nothing is loaded when the file named by the low four bits is already at 4E00H (OVRLY$, 430EH). Otherwise OVRLY$ gets the new code and the file is read through SFCB$ (44A0H): its directory record (3-7, or 20H-26H for the files from 8 on) is read from drive 0, its first extents copied, and the module loader (4C8DH) loads it, returning its entry address. A file missing from the directory or a load error displays SYS Error and aborts. (disassembly) |
| 4C54H ↳19540 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4C54H-4C5CH: the message displayed when a request cannot be served: an unknown request code below 80H, or a system file that is missing or cannot be loaded. (disassembly) |
| 4C5DH ↳19549 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4C5DH: 0DH, the end of the SYS Error text (displayed: the line ends). (disassembly) |
| 4C5EH ↳19550 ↳@RUN | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @RUN and @LOAD. 4C5EH (@RUN) sets bit 2 of SFLAG$ (430FH), loads the program file named in the control block at Register Pair DE (@LOAD) and runs it at its transfer address; when DEBUG is on (bit 7 of 430FH) and bit 1 is clear, it enters DEBUG at the program's first instruction instead. An error goes to @ERROR (4409H). 4C77H (@LOAD) opens the file with the buffer 4200H and loads it (4C8DH), returning the transfer address in Register Pair HL; a file not found becomes error 1FH (program not found), and bit 6 is set in every error number. (disassembly) |
| 4C77H ↳19575 ↳@LOAD | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @LOAD: Load a Program File. Register Pair DE = a file control block with the program's file specification. The file is opened with the buffer 4200H and 256 byte records (@OPEN) and loaded by 4C8DH, which returns the transfer address in Register Pair HL. On failure bit 6 is set in the error number (the short message), and 18H (file not in directory) becomes 1FH (program not found). (disassembly) |
| 4C8DH ↳19597 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The Module Loader. Loads the load module of the open file whose control block is at Register Pair DE, its sectors read into 4200H. Register B = the library member wanted (for SYS6/SYS and SYS7/SYS). Record types: 01H a load block (length, address, data), 02H the transfer address, 04H the end of a library member, 08H a library member's header (its number, entry address, the record of the file where it starts and the byte in that record), 0AH and 20H-FFH are a load file format error (22H), every other type below 20H is passed over by its length. Each data byte is checked after it is stored: a byte that does not stay is error 23H (memory fault) or 24H (read only memory), with bit 6 set. Returns the Z FLAG and the transfer (or member entry) address in Register Pair HL. (disassembly) |
| 4C9DH ↳19613 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: GOSUB to 4D1CH to fetch the next byte of the file into Register A: the record type. 4CC5H, 4CE2H and the member search come back here. (disassembly) |
| 4D3AH ↳19770 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The Clock Display Task and @TIME, @DATE. 4D3AH-4D3BH: the task block's first word: 4D3DH, its routine. (disassembly) |
| 4D3CH ↳19772 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4D3CH, the block's byte +02H: the calls left before the next display, 05H. (disassembly) |
| 4D48H ↳19784 ↳@TIME | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @TIME: Point Register Pair DE to 4043H, the hours of TIME$ (the fields are taken downwards: hours, minutes, seconds). (disassembly) |
| 4D63H ↳19811 ↳@DATE | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: @DATE: Point Register Pair DE to 4046H, the month of DATE$ (taken downwards: month, day, year). (disassembly) |
| 4D6AH ↳19818 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The Program Counter Display Task. 4D6AH-4D6BH: the task block's first word: 4D6CH, its routine. (disassembly) |
| 4D8FH ↳19855 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The Current Sector of a File. 4D8FH saves Register Pair HL under the return address and goes on into 4D92H; 4D92H loads Register C with the position in the buffer (+05H); 4D95H (Register C given) adjusts Register Pair HL, the next record number less one or the next record number, to the sector of the current position: in byte mode (bit 7 of +01H) one is added when Register C is not 0, and one is taken away when the buffer holds the sector before the next record number (bit 5 clear). In record mode Register Pair HL is not changed. (disassembly) |
| 4DA6H ↳19878 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The Keyboard Scan of Every Interrupt. Called by the interrupt routine (452FH) on every interrupt. It reads the keyboard rows directly: SHIFT (3880H, bits 1-0) with @ (3801H, bit 0) sets bit 1 of KFLAG$ (4423H), the pause; ENTER (3840H, bit 0) sets bit 2; BREAK (3840H, bit 2) without SHIFT sets bit 0 unless BREAK is disabled (bit 4 of 430FH). Returns with the NZ FLAG set when BREAK is held and the CARRY FLAG set when a SHIFT key is held. (disassembly) |
| 4DD8H ↳19928 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Not in the file: 4DD8H-4DEFH. No code of the LDOS files on this diskette addresses these bytes. (disassembly) |
| 4DF0H ↳19952 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: Base Cells for Resident Modules. 4DF0H-4DFDH: 14 bytes of 00H, the cells listed above, empty at boot. (disassembly) |
| 4DFEH ↳19966 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 4DFEH-4DFFH: 43B0H, the address of the eight bytes 43B0H-43B7H. No code of the LDOS files on this diskette reads this word. (disassembly) |
| 4E00H ↳19968 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The Reset: Memory, Video and Drive 0. The transfer address of SYS0/SYS: the boot sector jumps here with interrupts off. Sector 0 of BOOT/SYS leaves Index Register IY = 0000H; sector 1 (a boot through a disk driver) leaves Index Register IY pointing at drive 0's drive code table. The reset finds the top of memory, sets the speed and the cassette latch, saves the ROM's driver addresses, installs the lower case video driver when the video memory has it, clears the spare device control blocks, sets up drive 0 from the boot, enables the interrupts and reads the system information sector (cylinder 0, sector 2) into 4200H. All of 4E00H-50FFH is used only here; the system files load over it afterwards. (disassembly) |
| 4E00H ↳19968 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: Entry: Pick the Function of the Request. The supervisor dispatcher (4BCDH) loads SYS1/SYS into 4E00H for a request code whose bits 3-0 are 3 and calls 4E00H with Register A = the request code (from OVRLY$, 430EH) and the caller's Register Pairs BC, DE and HL. Bits 6-4 of the code pick the function: 00H (83H) nothing; 10H (93H: @EXIT 402DH, @ABORT 4030H, @CMD 4400H) the LDOS Ready command loop; 20H (A3H, 4451H) carry out the command line at Register Pair HL and return to the caller; 30H (B3H, @CMNDI 4405H) carry out the command line at Register Pair HL, then LDOS Ready; 40H (C3H, @FSPEC 441CH) take a file specification; 50H (D3H, @FEXT 4473H) add a default extension; 60H (E3H, @PARAM 4476H) read a parameter list. Function 70H, which no vector of SYS0/SYS issues, is carried out as 20H. (disassembly) |
| 4E00H ↳19968 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Entry: Pick the Function of the Request. The supervisor dispatcher (4BCDH) loads SYS2/SYS into 4E00H for a request code whose bits 3-0 are 4 and calls 4E00H with Register A = the request code (from OVRLY$, 430EH, which always gets the code of the latest request) and the caller's Register Pairs BC, DE and HL. Bits 6-4 of the code pick the function: 10H (94H, @OPEN 4424H) open an existing file or a device; 20H (A4H, @INIT 4420H) open a file or create it; 40H (C4H, @CKDRV 44B8H) check a drive; 50H (D4H) the file name hash; 60H (E4H) the password hash. Any other function (00H for request 84H, which SYS6/SYS, BACKUP/CMD and FORMAT/CMD issue to have SYS2/SYS in memory before they need it) returns at once. (disassembly) |
| 4E00H ↳19968 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS3: Entry: Pick the Function of the Request. The supervisor dispatcher (4BCDH) loads SYS3/SYS into 4E00H for a request code whose bits 3-0 are 5 and calls 4E00H with Register A = the request code (from OVRLY$, 430EH, which always gets the code of the latest request) and the caller's Register Pairs BC, DE and HL. Bits 6-4 of the code pick the function: 10H (95H, @CLOSE 4428H) close a file or a device; 20H (A5H, @FNAME 44BBH) build the file specification of a directory record. Any other function returns at once. The dispatcher has dropped the return address of the RST 28H, so the final RET of a function goes straight back to the program that called the vector. (disassembly) |
| 4E00H ↳19968 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS4: Overlay Entry Point. The supervisor dispatcher (4BCDH) loads SYS4/SYS into 4E00H for a request code whose bits 3-0 are 6 and calls 4E00H with Register A = the request code (from OVRLY$, 430EH). The only request of SYS4/SYS that SYS0/SYS issues is 96H, from the @ERROR vector at 4409H. The first instruction jumps over the message definition table to the code at 4EAEH. (disassembly) |
| 4E00H ↳19968 ↳@DEBUG | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: DEBUG Entry: Save Every Register. The supervisor dispatcher (4BCDH) loads SYS5/SYS into 4E00H for request 87H and calls 4E00H. Request 87H comes only from 44B4H (PUSH AF / LD A,87H / RST 28H), which three roads lead to: the RST 30H vector at 400FH (a breakpoint F7H that DEBUG planted, or the start of a program run while DEBUG is on, SYS0/SYS 4C73H), the BREAK trap when 4316H holds 400FH or 44B4H, and @DEBUG at 440DH (the D key held at boot). The dispatcher drops the return address of its RST 28H, so on entry the stack holds the dispatcher's return 4BE7H, then the program's Register Pair AF pushed by 44B4H, then the program's address (its PC): the address after the RST 30H, the interrupted address, or the program's transfer address. DEBUG never returns to 4BE7H, so the BREAK trap switch at 4315H stays off (C9H, stored by the dispatcher at 4BDAH) until the G command turns it on. The registers are pushed and copied in one move to the register save area 4065H-407CH. (disassembly) |
| 4E03H ↳19971 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS4: Error Message Definition Table. One run of bytes for each message, found through the index table at 505AH: the low byte of the run's address is the index entry of its error number. Each byte names a word of the dictionary at 5088H: bits 5-0 are the word number (1-55), bit 7 set marks the last word of the message, and bit 6 of the last byte says how SYS4/SYS names the file or device of the error (4F70H): clear, the control block at JDCB$ (430AH) is an open file or device and is named from it; set, the control block is read as the file specification it holds before an open (the errors of an open, a load or a file name). The messages are built word by word with a space after each word. (disassembly) |
| 4E0CH ↳19980 ↳@CLOSE | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS3: Function 10H (Request 95H): @CLOSE. Register Pair DE = the control block of an open file or device. @CLOSE (4428H) is called by BACKUP/CMD, BASIC/CMD, BASIC/OV2, PATCH/CMD, SYS6/SYS, SYS7/SYS and TED/CMD. A control block whose byte +00H has bits 7 and 6 clear (10H, an open device) is closed at 5029H. For a file the prologue of SYS0/SYS is run, the file's directory record is read, the file's buffer is written when it was changed, and the end of the file is brought into the directory record (4E2AH). (disassembly) |
| 4E16H ↳19990 ↳@CMNDI | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: Functions 20H (request A3H, 4451H: return to the caller) and 30H (request B3H, @CMNDI, 4405H: LDOS Ready after the command): the caller's command line at Register Pair HL is copied to INBUF$ (4318H-4356H, 63 bytes, 03H at 4357H); function 20H sets bit 1 of 4758H, function 30H clears 4758H and pushes 402DH. (disassembly) |
| 4E17H ↳19991 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Function 50H (Request D4H): The File Name Hash. Register Pair HL = 11 bytes, the file name (8 bytes) and the extension (3 bytes), each padded with spaces, as a directory record holds them at +05H-+0FH. The hash code is the Exclusive OR of the 11 bytes, rotated left one bit after each byte; 00H is turned into 01H, because 00H in the Hash Index Table (the HIT, sector 1 of the directory cylinder) marks a free directory record. The code is stored at 51E1H and returned in Register A with the NZ FLAG. @OPEN and @INIT call it at 4F51H; SYS6/SYS's RENAME issues request D4H (its 52D0H). (disassembly) |
| 4E23H ↳20003 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: Back the PC onto a Breakpoint. A breakpoint is an F7H (RST 30H) written over the first byte of an instruction. When it runs, the RST pushes the address after it, so the saved PC is one past the breakpoint. If the byte before the saved PC is F7H, the PC is moved back one, onto the instruction the breakpoint stood on; 4E2FH then puts its first byte back. The test is made on every entry, so a BREAK or a program start whose address follows an F7H byte is moved back too. (disassembly) |
| 4E27H ↳20007 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Function 60H (Request E4H): The Password Hash. Register Pair DE = an 8 byte password field, padded with spaces. The bytes are taken from the last to the first and mixed into a 16 bit value that starts at FFFFH; the result is returned in Register Pair HL with the Z FLAG. Eight spaces (no password) give 4296H, the password PASSWORD gives 42E0H, and the master password RS0LT0FF (the manual: it allows access to any file) gives 113DH, the value @OPEN compares with at 4FDAH. @OPEN and @INIT call it at 4F57H; SYS7/SYS (its 532CH and 54E3H), BACKUP/CMD (its 6C6BH) and FORMAT/CMD (its 727AH) issue request E4H. (disassembly) |
| 4E2AH ↳20010 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS3: Put the End of the File into the Directory Record. Register Pair HL = the file's directory record in the sector at 4200H. The end of file byte (+08H) and the ending record number (+0CH-+0DH) of the control block are compared with the record's +03H and +14H-+15H and copied into the record when they differ. Bit 2 of +00H of the control block, set by the sector write of SYS0/SYS (49C6H) whenever a sector of the file is written, then decides: a written file gets the date stamp (4E69H) and its record is written; a changed record of a file that was not written is written without a new date (4ECFH); otherwise the record is not written (4ED5H). Register Pair HL ends at the record's +15H on every path. (disassembly) |
| 4E2EH ↳20014 ↳@CMD | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: The LDOS Ready Command Loop. Function 10H (request 93H): @EXIT (402DH), @ABORT (4030H) and @CMD (4400H) all lead here. The stack is set up afresh at 41E0H, the BREAK trap is armed when DEBUG is on, LDOS Ready is displayed and a line of up to 63 characters is read from the keyboard into INBUF$ (4318H) through the ROM's line input at 0040H. The command gets 402DH (@EXIT) as its return address, so when it ends the loop runs again. (disassembly) |
| 4E2FH ↳20015 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: Clear the Two Breakpoint Slots. Two slots of three bytes: slot A at 405DH-405FH and slot B at 4060H-4062H, each the address of a breakpoint (low byte first) and the byte the F7H was written over. For each slot the address is read and cleared; if it is not 0000H and the byte there is still F7H, the saved byte is put back. Both addresses are 0000H afterwards. The same bytes are used for other things between breakpoints: 405DH is the memory display mode, 405EH the screen layout and 4060H-4061H the address the M command changes, so entering DEBUG sets the display back to the hexadecimal register screen and the M address to 0000H. When the G command set only one breakpoint, or none, 405DH-405EH still hold the display mode bytes and are taken as an address; the saved byte is written there only if that address holds F7H. The G command (4FD0H) also jumps here when a breakpoint cannot be written, to take back the breakpoints already planted. (disassembly) |
| 4E49H ↳20041 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: The Command Loop. Every command but G comes back here. The Stack Pointer is put back to the program's (from 4079H), the screen is drawn, the cursor goes to the start of the bottom line (3FC0H) and one key is read by 5189H, which shows it there in lower case. G (67H) is tested first; for the other commands the address 4E49H is pushed so that each handler's RET comes back here. The keys: S full screen memory, ; and - move the memory display, A and H the ASCII or hexadecimal memory display, C and I single step, D set the memory display address, M change memory, R change a register pair, U keep redrawing, X the register screen. Any other key goes to the address held at 4310H (4876H, which only returns, unless SYS9/SYS has put its extended commands there), with Register A = the key and 4E49H on the stack. (disassembly) |
| 4E52H ↳20050 ↳@CKDRV | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Function 40H (Request C4H, @CKDRV): Check a Drive. Register C = the drive (0-7). The drive must be present in its drive code table, its diskette must turn (the index hole must pass the sensor within half a second, unless bit 4 of byte +04H of the table is set) and the allocation table (sector 0 of the directory cylinder) must read. Then the drive code table is brought into line with the diskette from the allocation table's bytes CCH and CDH: the highest cylinder (+06H), bit 7 of +04H (cylinder 0 single density while the others are double) and bit 5 of +04H (two sides); and bit Register C of 475DH is set when the diskette carries the directory date format of this release (bit 3 of byte CDH), cleared when not. Returns the Z FLAG and Register A = 00H when the drive is ready, the CARRY FLAG then set when the diskette is write protected (the controller's status bit 6 or bit 7 of +03H); otherwise the NZ FLAG. Register Pairs BC, DE and HL and Index Register IY are kept. @OPEN and @INIT call it at 4F64H and 503CH; BACKUP/CMD, DATECONV/CMD, SOLE/CMD, SYS6/SYS and SYS7/SYS call @CKDRV (44B8H). (disassembly) |
| 4E5CH ↳20060 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: Carry Out a Command Line. Register Pair HL = the command line (in INBUF$, 4318H). The line is first passed to the job log (447EH). A line that starts with a period is a comment (4EA0H). A line that starts with ! is always run as a program file. Otherwise the first word is taken as a file specification into CFCB$ (4480H) and looked up in the table of library commands at 4EBDH; a command found there is carried out by its member of SYS6/SYS or SYS7/SYS (4EA8H). Any other word gets the extension /CMD when it has none and is loaded and run by @RUN (4433H), with Register Pair HL pointing at the rest of the line. (disassembly) |
| 4E69H ↳20073 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS3: Stamp the Date and the Time into the Directory Record. Register Pair HL = the record's +15H, Register B = the record number, Register C = the drive. Bit 6 of the record's +01H, the MOD flag (the file was changed since it was last backed up; DIR shows it as +), is set, and the date of DATE$ goes into the record: the month (4046H) into bits 3-0 of +01H, the day (4045H) into bits 7-3 of +02H and bits 2-0 of the year (4044H) into bits 2-0 of +02H. When the bit of the drive in 475DH is set (@CKDRV of SYS2/SYS sets it when the diskette carries the directory date format of this release) the time goes into +12H-+13H too: the hours (4043H) in bits 7-3 of +12H, the minutes (4042H) in bits 2-0 of +12H and bits 7-5 of +13H, and the year as an offset from 1980 (0-31) in bits 4-0 of +13H. The seconds are not kept. (disassembly) |
| 4E7BH ↳20091 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: Self-modified operand of LD A,00H at 4E7AH: the first character of the command line less 21H (4E66H), 00H for a line that starts with !, which runs the word as a program file without searching the command table. (disassembly) |
| 4E90H ↳20112 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The Reset: The Date. The system information sector is now at 4200H. Its byte 01H (the configuration file flag) is saved for later and replaced by 00H. When its date prompt switch (42C2H) is not 00H the date is skipped. When the date was set before a reset (4306H holds a month OR 50H) it is used again without a prompt; 4306H = 50H skips the date and the time. Otherwise Date? is asked at 3F17H until three good fields are typed (MM/DD/YY, years 80-99 for 1980-1999 and 00-11 for 2000-2011). (disassembly) |
| 4E97H ↳20119 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: End a Command That Cannot Be Carried Out. Reached when BREAK ended the typed line, when the first word is not a file specification and when it is a device name. A command line from a program (function 20H, bit 1 of 4758H set) returns to the program with Register A = 02H and the NZ FLAG; otherwise @ABORT (4030H) ends it and LDOS Ready follows. (disassembly) |
| 4E99H ↳20121 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: X and S: Choose the Screen. 405EH is the screen layout: 00H the register screen (twelve register pairs and four lines of memory), any other value the full screen of sixteen lines of memory. X enters at 4E99H with Register A cleared; S enters at 4E9AH with Register A = 73H, its key. (disassembly) |
| 4E9DH ↳20125 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS3: Self-modified second byte of BIT 0,A at 4E9CH (47H in the file): 4E96H stores 47H + the drive x 8, so the date stamp tests bit n of 475DH for drive n. (disassembly) |
| 4E9EH ↳20126 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: U: Keep Redrawing the Screen. The screen is drawn again and again so that memory a background task changes (the clock at 4041H-4043H, for instance) is seen changing, until a key is pressed. (disassembly) |
| 4EA0H ↳20128 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: A Comment Line. A command line that starts with a period is not carried out. While a JCL job runs (bit 5 of SFLAG$, 430FH) the command returns at once, so the job goes on with its next line; otherwise the next line is read from the keyboard without LDOS Ready being displayed again. (disassembly) |
| 4EA8H ↳20136 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: Carry Out a Library Command. The word was found in the table at 4EBDH: Register E = the entry's member number and Register D its flags. When bit 7 of the flags is clear, Register Pair DE is the address of the command's code in SYS1/SYS (only BOOT, 4EB6H). When it is set the command is a member of a library: of SYS6/SYS (request 88H) when bit 6 is clear, of SYS7/SYS (request 89H) when bit 6 is set. RST 28H loads member Register B and runs it with Register Pair HL at the parameters. SYS1/SYS stays in memory at 4E00H-51F8H while the member runs above it, at 5200H (5A00H for FILTER and SET). (disassembly) |
| 4EA8H ↳20136 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: D: Set the Memory Display Address. Reads a hexadecimal address and makes it the first address of the memory display (4063H-4064H). D with no number leaves it as it is. (disassembly) |
| 4EABH ↳20139 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Self-modified second byte of the bit instruction at 4EAAH (RLC B in the file): SET or RES of bit Register C (the drive) of 475DH, stored by 4EA4H from bit 3 of the diskette's configuration byte. (disassembly) |
| 4EAEH ↳20142 ↳@ERROR | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS4: @ERROR Service Entry, Option Decode and Display Gating. Entered from 4E00H with Register A = the request code. A program calls @ERROR (4409H) with the error number in Register A: bits 5-0 the number, bit 6 set for the short message (the text alone), bit 7 set to get control back instead of ending at @ABORT (4030H). 4409H pushes Register Pair AF and issues request 96H; the dispatcher drops the return address of the RST 28H and CALLs 4E00H, so the stack holds the dispatcher's return 4BE7H, then the program's Register Pair AF, then the program's return address. Bit 6 of SFLAG$ (430FH) clears the short message bit; bit 6 of 4758H (the command interpreter's status byte) suppresses the message; bit 7 of 4758H builds the short message in the program's buffer at Register Pair DE without displaying it. (disassembly) |
| 4EAEH ↳20142 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: ; and -: Move the Memory Display. The semicolon moves the memory display address at 4063H-4064H forward and the minus sign moves it back: by 64 bytes (the four lines) on the register screen, by 256 bytes (the sixteen lines) on the full screen. The minus sign enters at 4EC6H with Register Pair BC = FFC0H; for the full screen Register B tells the two apart (00H forward, FFH back). (disassembly) |
| 4EB6H ↳20150 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: BOOT: Start the System Again. The table entry of BOOT holds the address 4EB6H instead of a member number. The head of drive 0 is sent to cylinder 0, and the HALT makes the Model I boot again: on the Model I a HALT raises the same non maskable interrupt as the RESET button, and the ROM's handler at 0066H, which finds the disk controller, jumps to 0000H, where the ROM reads the boot sector of drive 0. (disassembly) |
| 4EBDH ↳20157 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: The Library Command Table (Data). 35 entries of 8 bytes, searched by 50CBH (called from 4E82H) and listed by the LIB command (the member 19H of SYS6/SYS reads the table from 4EBDH while SYS1/SYS is still in memory). Each entry is the command name in capitals, padded with spaces to 6 characters, then two bytes: the member number and the flags. Flags 80H: a member of SYS6/SYS, request 88H; C0H: a member of SYS7/SYS, request 89H (bit 7 a library command, bit 6 SYS7/SYS). The two bytes of BOOT are the address 4EB6H. A 00H after the last entry ends the table (4FD5H). The member numbers are those of the type 08H member headers of SYS6/SYS and SYS7/SYS, which also give the address each member is entered at; several commands share the code of one member through different entry addresses. Member 1CH of SYS7/SYS has no entry here. (disassembly) |
| 4ECBH ↳20171 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: A and H: Choose the Memory Display Mode. Register A holds the key: 61H (a) or 68H (h). It is kept at 405DH, which 5143H tests for 61H: memory is then shown as characters, otherwise in hexadecimal. 405DH is also the low byte of the address in breakpoint slot A, cleared on every entry (4E2FH), so DEBUG starts in hexadecimal. (disassembly) |
| 4ECFH ↳20175 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS3: Write the Directory Record and Count the File's Granules. 4ECFH writes the sector with the record (Register B, drive Register C) back to the diskette. 4ED5H looks at bit 7 of the record's +01H, the create flag: a file whose space was set by CREATE keeps all of it (the manual: such a file never becomes smaller than its created size). For any other file the granules of its extents are counted into Register Pair DE, following the link (FEH and a record number in place of an extent) to the extension records that hold its further extents. (disassembly) |
| 4ECFH ↳20175 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: Draw the Register Screen. With 405EH = 00H the screen shows twelve lines, one for each register pair of the save area (4065H-407CH) in the order of the name table at 4F53H: the name, an equals sign, the high and the low byte in hexadecimal; for AF and AF' then the eight flags of Register F by name (4F77H), for the others the sixteen bytes of memory the pair points at (5131H). Four lines of memory from the display address at 4063H-4064H follow (4F2EH). All text goes through the ROM's display routine at 0033H, which also takes the control codes 0DH (next line) and 1CH (cursor to the top left corner) and the codes C0H-FFH, each of which shows 0-63 spaces. With 405EH not 00H, 4F44H draws sixteen lines of memory instead. (disassembly) |
| 4ED7H ↳20183 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Read the Index Hole, or Give Up at the Time Limit. Called from the three loops at 4E78H-4E85H with Register D = the time limit. When TIMER$ (4040H) has reached the limit it does not return to its caller but jumps to 4EE3H; otherwise it returns the NZ FLAG when the controller's status shows the index hole at the sensor (bit 1), the Z FLAG when not. (disassembly) |
| 4ED8H ↳20184 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS4: Bit 7 of 4758H: Build the Short Message for the Program. Register Pair DE still holds the program's own Register Pair DE, the buffer the program wants the text in. The short message is forced in Register B and in the error number saved on the stack, so the text is built alone and, at 4F49H, not displayed. (disassembly) |
| 4EE3H ↳20195 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: The Drive Is Not Ready. Reached from 4EDBH (the time limit, with the return address of the CALL 4ED7H on the stack) and from 4E92H (the allocation table could not be read, with the status saved at 4E87H on the stack). Either word is taken off, Register A gets bit 0 set and the routine returns with the NZ FLAG. (disassembly) |
| 4EE4H ↳20196 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS4: Error Code Prefix Builder. The full message starts with a line feed, three asterisks, Error code =, the error number in two decimal digits, a comma and a space, written at Register Pair DE (4200H). Register Pair DE ends one past the space. (disassembly) |
| 4EE8H ↳20200 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Open a Device. @OPEN and @INIT come here when the control block at Index Register IX starts with 2AH, a device specification that @FSPEC (SYS1/SYS) copied there: 2AH (an asterisk) and the two letters of the device name in +01H-+02H. The device control blocks are searched for that name in their bytes +06H-+07H: KIDCB$ (4015H), DODCB$ (401DH) and PRDCB$ (4025H), then the blocks at 43C0H-43FFH (JLDCB$, SIDCB$, SODCB$ and the five spare blocks for devices made by SET and ROUTE). When the name is found the control block becomes the open device: +00H 10H, +01H-+02H the address of the device control block, +03H-+05H 00H, +06H-+07H the name. A name that is not found returns error 08H (device not available). (disassembly) |
| 4EF4H ↳20212 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The Reset: Store and Display the Date. Stores the month, the day and the year in DATE$ (4044H-4046H), works out the day of the year (4047H, bit 0 of 4048H) and the day of the week (bits 3-1 of 4048H, from 1 for Sunday), and displays the date at 3F17H as, for example, Tue, Jan 1, 1980. (disassembly) |
| 4F02H ↳20226 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS4: Message Decompression Loop. Register C = the error number, Register B = 00H, Register Pair DE = where the text goes (4200H, 4215H or the program's buffer). The number picks a run of the definition table through the index table at 505AH; each byte of the run names a word of the dictionary at 5088H, which is copied with bit 7 of its last character cleared and a space after it, until the byte with bit 7 set. (disassembly) |
| 4F03H ↳20227 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS3: Work Out the Granules the File Does Not Need. Register Pair DE = the granules in the file's extents, Register Pair HL = one byte past the FFH that ends them, in the record whose sector is at 4200H (Register B). The granules the file needs are its ending record number (the sectors it uses) divided by the sectors in a granule, rounded up. When the extents hold more, the difference is freed: the allocation table is read into 5100H and the work starts at the last extent (4F6FH). (disassembly) |
| 4F2BH ↳20267 ↳@OPEN | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Function 10H (Request 94H, @OPEN): Open a File. Register Pair DE = a control block holding a file specification NAME/EXT.PASSWORD:D (as @FSPEC leaves it, ended by 03H or 0DH) or a device specification (2AH and the two letters of a device name), Register Pair HL = the address of the file's 256 byte buffer, Register B = the record length (00H for 256). The prologue 49F1H points Index Register IX at the block and makes the final RET restore the caller's registers. The specification is taken apart (50F4H) and hashed; then the Hash Index Table of the drive named, or of drives 0-7 in turn when no drive is named, is searched for the name's hash code, each match checked against its directory record, and when the file is found its access is decided from the password and the control block is filled (5084H). Returns the Z FLAG and Register A = 00H, or the NZ FLAG and Register A = the error number: 13H illegal file name, 16H HIT read error, 11H directory read error, 18H file not in directory, 19H file access denied, 20H illegal drive number, 08H device not available. @INIT calls 4F2EH. (disassembly) |
| 4F2EH ↳20270 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: @OPEN after its prologue (49F1H), called by @INIT (5028H): SFLAG$ saved at 4FFDH and its bits 1 and 2 cleared, then the device or file open. (disassembly) |
| 4F2EH ↳20270 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS3: Free the Last Granule of an Extent. Register Pair HL = the second byte of the extent, Register Pair DE = the granules still to free, Register B = the record whose sector is at 4200H, Register C = the drive, and the allocation table at 5100H (one byte for each cylinder, a bit set for each granule in use). The extent's last granule is found (its cylinder and its place on the cylinder), its bit in the allocation table is cleared and the extent's count of granules is lowered by one. An extent left with no granule goes on at 4F6FH. (disassembly) |
| 4F2EH ↳20270 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: Draw the Memory Lines. Register B lines of sixteen bytes, from the address in Register Pair HL. Each line starts with seven spaces (code C7H), of which the first completes the line before (the register lines and the memory lines are each 63 characters long, without a carriage return), then the address in hexadecimal and a space, then the sixteen bytes (5131H): with seven, four, one and 52 characters, each line ends exactly at the last column, so the next one starts on a new line. The register screen enters at 4F2EH for four lines from the memory display address; the full screen enters at 4F33H with sixteen lines. (disassembly) |
| 4F33H ↳20275 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS4: Frame and Display the Message. Register Pair DE = one past the space after the last word, Register Pair HL = one past the last definition byte, and the start of the text is on top of the stack. The first letter is made a capital, the full message gets three asterisks at its end, a carriage return ends the text, and the text at 4200H is displayed and logged unless bit 7 of 4758H was set. For the full message the file or device and the address of the call are shown next (4F69H). (disassembly) |
| 4F44H ↳20292 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: Draw the Full Screen of Memory. The S command's screen: the 256 bytes of the page that holds the memory display address, on sixteen lines. The cursor starts at 3BFFH, one byte before video memory, so the first of the seven spaces of the first line falls outside the screen and the 1024 characters end at 3FFEH: the screen is filled without scrolling. (disassembly) |
| 4F53H ↳20307 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: The Register Pair and Flag Names (Data). Twelve names of three characters, in the order of the register save area at 4065H-407CH: 4EEAH shows them on the register screen and the R command (502CH) looks a name up here to find the word it changes. Then the eight flag names, one for each bit of Register F from bit 7 to bit 0: S sign, Z zero, 1 for bit 5, H half carry, 1 for bit 3, P parity or overflow, N subtract, C carry. Bits 5 and 3 have no name of their own and show 1 when they are set. (disassembly) |
| 4F5EH ↳20318 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Self-modified operand of LD A,00H at 4F5DH: the drive of the file specification (FFH when none, 5101H; 0-7 from 512AH), then the drive where the file was found (4FC2H). (disassembly) |
| 4F5EH ↳20318 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS4: Return to the Program or Abort. The stack holds the error number saved at 4EC3H, the program's Register Pairs BC, DE and HL, and the program's return address. Bit 7 of the error number decides: set, back to the program through the dispatcher's end (4BE7H, which puts the BREAK trap switch back); clear, the program ends at @ABORT. (disassembly) |
| 4F64H ↳20324 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS4: Self-modified operand of JP M,0000H at 4F63H: 4EB2H stores the dispatcher's return address 4BE7H here, the way back to the program for an error number with bit 7 set. (disassembly) |
| 4F69H ↳20329 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS4: Device or File Specification Builder. Called from 4F5BH for the full message, with Register Pair HL one past the last definition byte. Index Register IX = JDCB$ (430AH), the control block the file prologue of SYS0/SYS (49F9H) noted for the latest file call. Bit 6 of the last definition byte picks the source of the name: clear, an open control block (an open file is named from its directory record, 4FB0H; an open device from its +06H-+07H); set, the block is read as the file specification it holds before an open (4F8BH). The line is displayed and the referenced at line follows (4FF7H). (disassembly) |
| 4F6FH ↳20335 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS3: An Extent Has No Granule Left. Register Pair HL = the second byte of an extent with no granule left (or, from 4F2CH, the byte after the FFH that ended the extents). The two bytes become FFH FFH, the mark of an unused entry and of the end of the extents, and Register Pair HL steps back to the extent before. When there is none in this record and the record is an extension record (attribute bit 7), the extension record is freed: its attribute becomes 00H, its byte in the HIT 00H, and the link at +1EH-+1FH of the file's own record (whose number the extension record holds at +01H) becomes FFH FFH. The work then goes on at the last extent of the file's own record. (disassembly) |
| 4F7FH ↳20351 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: G: Go, with up to Two Breakpoints. G aaaa,b1,b2 then ENTER. aaaa, when given, replaces the saved PC at 407BH-407CH; each breakpoint address given is planted by 4FC9H, the first in slot B (4060H-4062H), the second in slot A (405DH-405FH). ENTER ends the line at any point. Then the BREAK trap is turned on with 400FH as its address, so BREAK enters DEBUG again, and the program goes on at 4FA3H with every register taken from the save area. (disassembly) |
| 4F85H ↳20357 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Go On to the Next Drive. Register C = the drive just searched. When the specification named a drive (4F5EH not FFH) there is no other drive to search: the NZ FLAG is returned with the CARRY FLAG clear. Otherwise Register C is advanced and the CARRY FLAG is set while it is below 8. (disassembly) |
| 4F89H ↳20361 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The Reset: The Time. When the time prompt switch (42C3H) is 00H, Time? is asked at 3F57H: hours, minutes and seconds, two digits each, separated by any character below 3BH (the : included). Seconds, or minutes and seconds, may be left out (they count as 0). A field out of range asks again; a good time goes into TIME$ (4041H-4043H). (disassembly) |
| 4F8BH ↳20363 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS4: The Control Block as a File Specification. Before an open the control block holds the file specification as typed, ended by 03H or 0DH; a device specification starts with 2AH (the asterisk) and the two letters of the name. Index Register IX = the control block; the caller's Index Register IX is on the stack. (disassembly) |
| 4F90H ↳20368 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Not This Record: Read the HIT Again. The directory record whose hash code matched is not the file (an extension record, not in use, or another name). Its sector has replaced the HIT in 4200H, so the HIT is read again and the search goes on with the next byte. (disassembly) |
| 4F9AH ↳20378 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: A Hash Match: Check the Directory Record. Register L = the position in the HIT, which is the directory record number, Register C = the drive. The record is read (DIRRD reads the directory sector that holds it into 4200H) and must be the first record of a file (bit 7 of its attribute clear: SYS8/SYS gives the extension records it makes attribute 90H), in use (bit 4) and have the same name and extension (+05H-+0FH) as 51EAH-51F4H. (disassembly) |
| 4F9DH ↳20381 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS3: Self-modified operand of LD B,00H at 4F9CH: the number of the file's own directory record, from +01H of an extension record that has been freed (4F8EH). (disassembly) |
| 4FA3H ↳20387 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: Run the Program with the Saved Registers. The G command and the single step (50B5H) come here. The eleven words of the save area from AF to SP are pushed onto the stack from the top down and popped into the registers, both sets; the Stack Pointer is set to the program's, the saved PC is pushed onto the program's stack and a RET jumps to it, with Register Pair HL loaded from the save area just before. (disassembly) |
| 4FB0H ↳20400 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS4: An Open File: the Name From Its Directory Record. Index Register IX = the control block of an open file: +06H the drive, +07H the number of its directory record. The record is read into 4200H (the message has already been displayed from there) and the name and the extension are copied from it, then a colon and the drive digit. (disassembly) |
| 4FB2H ↳20402 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS3: Write the Directory Record and the Allocation Table. While granules remain to be freed (Register Pair DE) the work goes back to 4F2EH. Then the directory sector at 4200H is written; a write protected diskette (error 0FH) is not an error here: nothing is written and the close goes on. Otherwise the allocation table at 5100H is written too. 4FC5H, where every path of the close meets, reads the sector of the file's own record again when another sector is at 4200H, and points Register Pair DE at the control block for 4FD8H. (disassembly) |
| 4FBDH ↳20413 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The Reset: Clock, Drives and the Diskette. Starts the clock task in slot 7, copies the drive code tables of drives 1-7 from the system information sector (the first block after a driver boot, the second otherwise), reads the allocation table of the diskette in drive 0 into 4200H, notes a diskette with two sides in drive 0's table and shows the diskette's name and date on the screen (3CD6H, 3CE0H). (disassembly) |
| 4FC0H ↳20416 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: The File Is Found: Decide the Access. The name matches. The drive where the file is becomes the drive of the specification (4F5EH), the attribute goes to 51FBH, and the access the open gives (bits 2-0 of +01H of the control block, 0 the most access) is decided: 00H when the password's hash code is 113DH (the master password RS0LT0FF) or equals the record's +10H-+11H; otherwise the protection level in bits 2-0 of the attribute, except that level 7 is refused (error 19H, file access denied) and level 6 (execute only) gives 06H, or 05H (read) with bit 1 of SFLAG$ set (run the program without DEBUG) when the open is the program load of @RUN; for level 6 the BREAK trap is also left off when the request returns. (disassembly) |
| 4FC9H ↳20425 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: Plant a Breakpoint. Register Pair HL = the address, Register Pair DE = the last byte of a slot (4062H for slot B, 405FH for slot A). The byte at the address is kept in the slot, F7H (RST 30H) is written over it and read back: if the byte did not change to F7H (ROM, or no memory there), the command is given up at 4E2FH, which takes back the breakpoints already planted and goes back to the command loop. Otherwise the address is stored in the slot, high byte then low byte going down, and Register Pair DE is left at the last byte of the slot below (405FH after slot B). (disassembly) |
| 4FD6H ↳20438 ↳@FSPEC | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: @FSPEC: Take a File Specification. Function 40H (request C3H, 441CH); the command loop calls it too (4E6FH). Register Pair HL = the text, Register Pair DE = where the specification goes (a file control block). It copies NAME/EXT.PASSWORD:D: a name of up to 8 letters and digits, then a / and an extension of up to 3, a period and a password of up to 8, a colon and a drive of 1. Small letters become capitals and characters past a field's length are dropped. Instead of a name the text may hold an asterisk and a device name of up to 2 letters and digits, such as the keyboard's KI. The specification ends with 03H. When the word taken is TO, ON, OVER or USING (the table at 5027H) it is passed over and the next word is taken. Returns Register A = 00H and the Z FLAG, Register Pair DE unchanged and Register Pair HL after the specification (past the character that ended it and any spaces after it, or at an ending 0DH, 03H or open parenthesis); or the NZ FLAG with Register A = the character found where a name, a password or a drive was needed. (disassembly) |
| 4FD8H ↳20440 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS3: Build the File Specification of a Directory Record. Register B = a directory record whose sector is at 4200H, Register C = its drive, Register Pair DE = where the text goes. The text is the name without its trailing spaces, then a / and the extension when the extension is not blank, then a colon, the drive's digit and 03H, the end of text mark of a file specification: NAME/EXT:d. No password is written. After @CLOSE the control block holds this text, so a program can open the file again with the same block. Returns Register A = 00H with the Z FLAG and Register Pair DE at the 03H; Register B is changed. (disassembly) |
| 4FDAH ↳20442 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: M: Change Memory. M aaaa then a space. The address typed (or, when none is typed, the one at 4060H-4061H) becomes the M address at 4060H-4061H, which the memory display marks with bars on both sides of its byte. If ENTER ended the address the command stops there. Otherwise the screen is drawn, the address is shown at the start of line 13 (3F40H) and its byte at the start of line 14 (3F80H) with a minus sign, and a new value is read: a space stores it and goes on to the next address, ENTER stores it and stops, a space or ENTER with no digits leaves the byte as it is, and any other key that is not a hexadecimal digit (X, say) stops without storing. Only the last two digits typed count. (disassembly) |
| 4FF7H ↳20471 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS4: Display the Name and the Referenced At Line. Register Pair HL = the device line (501EH) or the file line (502CH). After it the referenced at line gives, as four hex digits, the address of the program's CALL into the file system: JRET$ (430CH), the return address the file prologue noted, less 3. (disassembly) |
| 4FFDH ↳20477 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Self-modified operand of LD B,00H at 4FFCH: SFLAG$ (430FH) before @OPEN cleared bits 1 and 2 (4F31H); bit 2 (program load by @RUN) is tested for an execute only file. (disassembly) |
| 5000H ↳20480 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The Reset: AUTO, CONFIG/SYS and the Return to LDOS. Decides what runs after the boot. An AUTO command (the allocation table's 42E0H) is taken unless it is empty (0DH) or ENTER is held; one that starts with 2AH cannot be stopped that way and runs with BREAK disabled. D (or DOWN ARROW) held enters DEBUG. The AUTO command is copied to INBUF$ (4318H). The end of the reset is copied to 405DH and run there, because loading CONFIG/SYS (through @LOAD, 4430H) loads system files over 4E00H-51FFH. CONFIG/SYS is loaded unless the flag says none (bit 7) or CLEAR (or 9) or SPACE (or /) is held. The return addresses pushed make the last RET display the AUTO command (4467H) and carry it out (4405H), or go to LDOS READY (4400H). (disassembly) |
| 500DH ↳20493 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS4: Message Template Literals. The fixed parts of the messages, copied or displayed from here: the prefix of the full message (500DH-501DH, its 2AH 2AH 2AH also used as the suffix at 500EH), the device line (501EH-502BH), the file line (502CH-5042H) and the referenced at line (5043H-5059H). The letters X, N, E and D are placeholders that 4F82H, 4F98H-4FF1H and 5004H overwrite before the line is displayed. (disassembly) |
| 5010H ↳20496 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: R: Change a Register Pair. R, the name of a register pair (two letters, a third character for the alternate pairs: AF', BC', DE', HL'), a space, the new value in hexadecimal and ENTER. The name is looked up in the table at 4F53H, which gives the word of the save area at 4065H + 2 x its place; every pair can be changed this way, the Stack Pointer and the PC too. A name not in the table, or ENTER before the value, ends the command with nothing changed; a space or ENTER with no digits leaves the pair as it is. Letters come from 5189H in lower case and are made capitals here (RES 5) to match the table. (disassembly) |
| 5014H ↳20500 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS3: Self-modified operand of LD A,00H at 5013H: the drive's digit, 30H-37H (4FDDH), written after the colon of the file specification. (disassembly) |
| 5016H ↳20502 ↳@INIT | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Function 20H (Request A4H, @INIT): Open or Create a File. The same registers as @OPEN. The file is opened when it is on a diskette (the Z FLAG, the CARRY FLAG clear). When @OPEN returns error 18H (file not in directory), the file is created: on the drive named, or on the first of drives 0-7 that is ready, not write protected and has a free directory record. A new file gets the access 00H, the attribute 10H (in use, protection level 0), or 17H (protection level 7) when the specification holds a password, its record length, its name and extension and the password's hash code; it has no extents. Returns the Z FLAG and the CARRY FLAG for a new file; the NZ FLAG with Register A = 1AH (full or write protected disk) when no drive could take it, or with the error of the open or of a disk access. (disassembly) |
| 5018H ↳20504 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: A Device Name. The text did not start with a letter or a digit. When it starts with an asterisk, a device name of up to 2 letters and digits follows (KI, DO, PR); any other character is an error. (disassembly) |
| 501CH ↳20508 ↳@FNAME | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS3: Function 20H (Request A5H): @FNAME. Register B = a directory record number, Register C = a drive, Register Pair DE = a buffer of at least 15 bytes. @FNAME (44BBH) reads the record and writes its file specification NAME/EXT:d with the 03H mark into the buffer (4FD8H). Returns Register A = 00H with the Z FLAG, or 11H (directory read error) with the NZ FLAG; Register Pairs DE and HL and Register C are kept, Register B is changed. SYS6/SYS (its 53E6H) and SYS7/SYS (its 527BH, 52A0H and 531FH) call 44BBH. The record is not tested for being in use. (disassembly) |
| 5027H ↳20519 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: The Words @FSPEC Passes Over (Data). Four entries in the layout of the command table, searched by 50CBH from 5010H: a word padded with spaces to 6 characters and two bytes, here always 4200H, which @FSPEC does not use. A 00H ends the table. In a line such as FILE1 TO FILE2, a second call of @FSPEC after FILE1 takes TO, finds it here and takes FILE2 instead. (disassembly) |
| 5029H ↳20521 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS3: Close a Device. Register Pair DE = the control block of a device opened by @OPEN of SYS2/SYS (+00H 10H, +01H-+02H the address of the device control block, +06H-+07H the two letters of the device name). The block is made into the device specification again: an asterisk, the two letters and 03H. (disassembly) |
| 5030H ↳20528 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Self-modified operand of LD A,10H at 502FH: the attribute of a file @INIT creates, 10H (501EH) or 17H when the specification holds a password (5141H). (disassembly) |
| 5042H ↳20546 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS3: Make the RES Instruction for a Granule. Register A = a granule's place on its cylinder (0-7), Register B = the cylinder's allocation table byte. The bit number is put into the RES instruction at 504CH, which then clears that bit of Register B. (disassembly) |
| 5048H ↳20552 ↳@FEXT | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: @FEXT: Add a Default Extension. Function 50H (request D3H, 4473H); the command loop calls it too, to add CMD (4E8AH). Register Pair DE = a file specification ended by 03H, Register Pair HL = a 3 character extension. When the name has no extension, a / and the three characters are put in after the name, and the 16 bytes from the end of the name on (a password and a drive) move up 4 places. A specification that has a / is not changed. Register Pair DE comes back unchanged; Register Pair HL too when nothing is added, and otherwise one less than the address of the extension. (disassembly) |
| 504DH ↳20557 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS3: Self-modified second byte of RES 0,B at 504CH (80H in the file): 5049H stores 80H + the granule x 8, so the granule's bit of the allocation table byte is cleared. (disassembly) |
| 504FH ↳20559 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS3: Read the Allocation Table. Reads sector 0 of the directory cylinder of drive Register C, the granule allocation table (GAT), into 5100H, the page above SYS3/SYS in the overlay area. Returns the Z FLAG with Register A = 00H, or the NZ FLAG with Register A = 14H (GAT read error). Register Pairs DE and HL are kept. (disassembly) |
| 5055H ↳20565 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Create the Directory Record. Register Pair HL = the byte of the free record in the HIT at 4200H, so Register L = the record number; Register C = the drive. The name's hash code goes into the HIT and the HIT is written back; then the record's sector is read and the record is made: +00H-+04H from 51FBH-51FFH (the attribute, 00H, 00H, the end of file byte 00H, the record length), +05H-+15H from 51EAH-51FAH (the name, the extension, the password hash code at +10H-+11H, the two bytes 51F7H-51F8H at +12H-+13H, and the ending record number 0000H), +16H-+1FH FFH (no extents). The sector is written back and the control block filled. (disassembly) |
| 505AH ↳20570 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS4: Error Code Index Table. One byte for each error number 00H-2DH (0-45): the low byte of the address of the error's run in the definition table, whose high byte is 4EH (4F09H-4F0EH). A larger error number is taken as 2DH (4F02H-4F08H). The errors 29H, 2AH, 2BH and 2DH have no message of their own: their bytes point at runs that make unknown error code. (disassembly) |
| 505EH ↳20574 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: C and I: Single Step. Runs the one instruction at the saved PC. The first byte (or, after a prefix DDH, FDH or EDH, the second) is looked up in one of the three tables at 50E0H: each entry is a mask, a value and a result; the first entry for which the byte AND the mask equals the value gives the result, and when none does the table's last byte is the result. Bits 3-0 of the result are the instruction's length, bits 7-4 its kind: 0 none, 1 JP (HL), 2 JP (IX) or JP (IY), 3 a relative jump (JR, DJNZ), 4 an absolute jump, 5 a return, 6 a call. A breakpoint is planted after the instruction (slot B); for kinds 1-5 a second one at the place it goes to (slot A): Register Pair HL from the save area, Index Register IY from the save area, the relative target, the operand, the return address on the program's stack. A call gets the second breakpoint at its operand for I only; for C it runs in full and stops after it. Then the program runs (4FA3H) and either breakpoint brings it back to DEBUG. A breakpoint that cannot be written (ROM) gives the command up (4FD0H). The RST instructions are not in the tables: they count as one byte with no target. (disassembly) |
| 5060H ↳20576 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: Put the Extension In. Register Pair HL = the byte after the name (the 03H, a period or a colon). The 16 bytes from there are moved up 4 places, then the / and the three characters of the extension are stored in the gap after the name. (disassembly) |
| 5062H ↳20578 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS3: Write the Allocation Table. Writes the allocation table at 5100H to sector 0 of the directory cylinder of drive Register C with the deleted data mark, as every directory sector is written, and verifies it. Returns the Z FLAG when written and verified, else the NZ FLAG; Register A = 15H (GAT write error) either way. Register Pairs DE and HL are kept. (disassembly) |
| 5079H ↳20601 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: Copy a Field of Letters and Digits. 5079H copies a field of up to 8 characters, 507BH of up to Register B characters, from the text at Register Pair HL to Register Pair DE. Letters and digits are copied, small letters as capitals; letters and digits past the field's length are passed over. The field ends at 03H, 0DH or an open parenthesis (Register Pair HL stays at it), or at any other character (Register Pair HL passes it, and any spaces after a space). An 03H is stored after the field. Returns Register A and Register C = the character that ended the field, Register Pair DE at the 03H and the Z FLAG set when at least one character was copied (the NZ FLAG for an empty field). (disassembly) |
| 507BH ↳20603 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: The field copy entered with its own length in Register B (5079H sets 8): used by @FSPEC for the extension (3), the drive (1) and a device name (2) and by @PARAM for a parameter name (6, into 4200H). (disassembly) |
| 507BH ↳20603 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS3: Read the Hash Index Table. Reads sector 1 of the directory cylinder of drive Register C, the Hash Index Table (HIT, one byte for each directory record: the hash code of its file name, 00H for a free record), into 4200H. Returns the Z FLAG when read, else the NZ FLAG; Register A = 16H (HIT read error) either way. Register Pair HL = 4200H; Register Pairs BC and DE are kept. (disassembly) |
| 5084H ↳20612 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: The Reset's Display Helpers. 5084H displays three letter name number Register B of the table at Register Pair HL; 5094H a comma and a space; 5099H a space; 509EH Register A (0-99) as two digits, the tens left out when it is 0 and Register D is 0. All display through the ROM at 0033H. (disassembly) |
| 5084H ↳20612 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Fill the File Control Block. Register Pair HL = the file's directory record in 4200H, Register B = its record number, Register C = the drive, Index Register IX = the control block. The block gets: +00H 80H (an open file); +01H the access (bits 2-0, from 5090H), bit 5 (the buffer must be read first), bit 3 when the specification ended with ! (5098H) and bit 7 when the record length is not 256 (byte mode); +02H 00H; +03H-+04H the buffer (50A0H); +05H 00H, the position in the buffer; +06H the drive; +07H the record number; +08H the end of file byte (record +03H); +09H the record length the caller asked for (51FFH); +0AH-+0BH 0000H, the next record; +0CH-+0DH the ending record number (record +14H-+15H); from +0EH the record's extents (cylinder, granule byte), each one after the first preceded by the number of granules in the extents before it, as far as the record has them; the rest of the 32 bytes FFH. Returns the Z FLAG and Register A = 00H. (disassembly) |
| 5088H ↳20616 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS4: Compressed Word Dictionary. 56 words, each stored once, its last character with bit 7 set (4F18H-4F27H: RLCA moves bit 7 into the CARRY FLAG). Word n is found by skipping n word ends from 5088H, so the first word, number 0, is never reached: a definition byte with word number 0 would skip 256. The words 3 (o) and 36 (y) are used by no message either. The block of the file ends at 50FFH and the last block, 5100H-51AEH, continues the word protected. (disassembly) |
| 508DH ↳20621 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS3: Write the Hash Index Table. Writes the HIT at 4200H to sector 1 of the directory cylinder of drive Register C with the deleted data mark and verifies it. Returns the Z FLAG when written and verified, else the NZ FLAG; Register A = 17H (HIT write error) either way. Register Pairs BC and DE are kept. (disassembly) |
| 5090H ↳20624 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Self-modified operand of LD A,00H at 508FH: the access the open gives (00H-06H, 500EH or 5019H), for bits 2-0 of byte +01H of the control block. (disassembly) |
| 5098H ↳20632 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Self-modified operand of OR 00H at 5097H: 08H when the file specification ends with ! (513BH), bit 3 of byte +01H of the control block. (disassembly) |
| 50A0H ↳20640 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Self-modified operand of LD DE,0000H at 509FH (2 bytes): the caller's buffer address (4F44H), for bytes +03H-+04H of the control block. (disassembly) |
| 50B1H ↳20657 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: The INC HL inside CP 23H at 50B0H (its operand byte 23H), entered by the JR Z at 50B3H to pass over spaces after a field. (disassembly) |
| 50B6H ↳20662 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 50B6H: 1EH, clear to the end of the line, the first byte of the date prompt (4EACH). (disassembly) |
| 50B7H ↳20663 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 50B7H-50BDH: the prompt Date ? followed by a space. (disassembly) |
| 50B9H ↳20665 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: Self-modified operand of LD A,00H at 50B8H: the field flag of the field copy, the field length (never 00H) from 507CH, 00H once a character is copied (50A2H). (disassembly) |
| 50BDH ↳20669 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: Is It a Letter or a Digit?. Returns the CARRY FLAG clear when Register A is 30H-39H (a digit) or 41H-5AH (a capital letter), and set for any other character. Register A is not changed. (disassembly) |
| 50BEH ↳20670 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 50BEH: 03H, the end of text mark of the date prompt. (disassembly) |
| 50BFH ↳20671 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 50BFH: 1EH, clear to the end of the line, the first byte of the time prompt (4F9CH). (disassembly) |
| 50C0H ↳20672 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 50C0H-50C6H: the prompt Time ? followed by a space. (disassembly) |
| 50C7H ↳20679 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 50C7H: 03H, the end of text mark of the time prompt. (disassembly) |
| 50C8H ↳20680 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS0: 50C8H-50FFH: 56 bytes of 00H, the end of the file's last block before 5100H. (disassembly) |
| 50CBH ↳20683 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: Look a Word Up in a Table. Register Pair BC = a table of 8 byte entries (a word in capitals padded with spaces to 6 characters, then two bytes) ended by 00H; Register Pair DE = the word, ended by 03H, 0DH or any character that is not a letter or a digit. Used for the command table (4E82H), the words @FSPEC passes over (5010H) and the parameter table of @PARAM (5132H). Up to 6 characters are compared: the word matches an entry when all 6 are equal, or when the word ends where the entry has a space. Returns the Z FLAG with Register A = 00H and Register Pair DE = the entry's two bytes, or Register A = 01H and the NZ FLAG when no entry matches. Register Pair HL and Register C are kept; Register B is not. (disassembly) |
| 50E0H ↳20704 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: The Instruction Tables of the Single Step (Data). Three tables of entries of three bytes: a mask, a value and a result. The single step (507DH) takes the first entry for which the instruction byte AND the mask equals the value; each table ends with one byte, below 05H, that is the result when no entry matches. In a result, bits 3-0 are the length of the instruction in bytes and bits 7-4 its kind: 0 none, 1 JP (HL), 2 JP (IX) or JP (IY), 3 a relative jump, 4 an absolute jump, 5 a return, 6 a call. 50E0H is for the first byte of an instruction with no prefix, 510EH for the byte after EDH, 5115H for the byte after DDH or FDH. (disassembly) |
| 50EDH ↳20717 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Fill with FFH. Stores FFH in Register B bytes from Register Pair HL on, then returns Register A = 00H with the Z FLAG. 50E9H ends the control block with it, 5076H the extents of a new directory record. (disassembly) |
| 50F4H ↳20724 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Take the File Specification Apart. Register Pair HL = the specification NAME/EXT.PASSWORD:D (the name a letter and up to 7 letters or digits, the extension a letter and up to 2 more, the password the same as the name; capitals only, which @FSPEC makes of small letters). 51E2H-51F4H are filled with spaces, then the name goes to 51EAH-51F1H, the extension to 51F2H-51F4H, the password to 51E2H-51E9H, the drive number to 4F5EH (FFH when none) and the ! flag to 5098H. Returns the Z FLAG, or the NZ FLAG with Register A = 13H (illegal file name: the name does not start with a letter) or 20H (illegal drive number: not 0-7). (disassembly) |
| 5100H ↳20736 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 BOOT/SYS: the 256 byte sector buffer of the boot sectors (5100H-51FFH): the directory sector of SYS0/SYS (attribute byte 5100H, first extent 5116H-5117H), the allocation table (51CDH, configuration byte) for sectors 1 and 6, then each sector of SYS0/SYS. |
| 510DH ↳20749 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: @PARAM: Read a Parameter List. Function 60H (request E3H, 4476H) enters at 510EH. Register Pair HL = the text after a command word, Register Pair DE = the caller's parameter table: entries of 8 bytes, a parameter name padded with spaces to 6 characters and the address of the word that takes its value, ended by 00H. After any spaces the list is an open parenthesis, NAME=value or NAME entries separated by commas, and a close parenthesis. A name given alone stores FFFFH. A value is a decimal number, X'hex', a text in quotation marks (the word gets the address of the text's first character in the command line) or a word that starts with Y or ON (FFFFH), N or OF (0000H). Returns the Z FLAG when the list was read or there is none (Register A = 0DH when the line ends with no list, otherwise 00H), with Register Pair HL past the list; the NZ FLAG for a name the table does not have, an empty name, a bad value or a character that does not belong. (disassembly) |
| 510EH ↳20750 ↳@PARAM | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: @PARAM entry (4476H, request E3H): Register Pair HL = the text after the command word, Register Pair DE = the parameter table (8 byte entries: a name padded to 6 characters and the address of the word for its value, ended by 00H). (disassembly) |
| 5131H ↳20785 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: Show Sixteen Bytes of Memory. Register Pair HL = the first address. Shows => and a space, then the sixteen bytes, each after one separator character (5164H): in hexadecimal, two digits; with 405DH = 61H (the A command), a space and the byte as a character, a period for 00H-1FH and C0H-FFH. Register Pair HL ends sixteen bytes further on. Register Pair BC is kept. (disassembly) |
| 513FH ↳20799 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: The Password Field. Called when the specification holds a . and so a password: a file created with a password gets the attribute 17H (in use, protection level 7, no access without the password) instead of 10H. Then the password is copied like the name, up to 8 characters. (disassembly) |
| 5144H ↳20804 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Copy a Field. 5144H copies a field of up to 8 characters (the name or the password), 5146H a field of up to Register B characters (the extension), from the text at Register Pair HL to Register Pair DE. The first character must be a capital letter A-Z, the others capital letters or digits; any other character ends the field. Returns Register A = the character after the field and Register Pair HL past it, and Register B = the characters not used. (disassembly) |
| 5157H ↳20823 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: Read a Value. Register Pair HL = the equals sign, Register Pair BC = 0000H, Register Pair DE = the address of the parameter's word (the parameter table is on the stack). The first character of the value picks how it is read. (disassembly) |
| 5160H ↳20832 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Find a Free Directory Record. The Hash Index Table of drive Register C is at 4200H (Register H = 42H). Byte n of the HIT stands for directory record n, which is in sector (n AND 1FH) + 2 of the directory cylinder, so only the bytes whose bits 4-0 are below the number of directory record sectors (the sectors of the cylinder less the allocation table and the HIT) stand for records on the diskette. The search starts at the byte that TIMER$ (4040H) gives and goes up to FFH; when it finds no free byte it searches again from 08H. Returns the Z FLAG with Register Pair HL at a free byte (00H), or the NZ FLAG when every record is taken. (disassembly) |
| 5164H ↳20836 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: The Separator before a Byte. Register Pair HL = the address of the byte about to be shown, Register B = the bytes left on the line (16 down to 1). Before the byte at the M address (4060H-4061H) the code AAH is shown, a graphics character lit on its right half: a bar just left of the byte. Before the byte after it the code 95H is shown, lit on its left half: a bar just right of the M address's byte. Before any other byte a space. Before the ninth byte of the line (Register B = 08H) one more space splits the line in two halves of eight. (disassembly) |
| 5188H ↳20872 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: A Value Given as a Word: Y, N, ON, OFF. Register A = the value's first letter as a capital, Register Pair HL at it, Register Pair BC = 0000H. Y gives FFFFH, N gives 0000H, O followed by N gives FFFFH and O followed by F gives 0000H; the rest of the word (YES, NO, OFF) is passed over up to a close parenthesis, a comma or the end of the line. Any other letter returns the NZ FLAG. (disassembly) |
| 5189H ↳20873 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: Read One Key of a Command. Waits for a key and shows it at the cursor. ENTER returns at once, not shown, with the Z FLAG and the CARRY FLAG set. Keys below 20H are ignored. Any other key is made lower case (bit 5 set) and shown, and returns with the CARRY FLAG clear and the Z FLAG set for a comma or a space, clear for anything else. Register Pair DE is kept. SYS9/SYS's extended debugger changes the byte at 5196H (EFH, the SET 5,A of 5195H) to 6FH while text is typed, making the instruction BIT 5,A so that capitals are kept, and puts EFH back afterwards. (disassembly) |
| 5196H ↳20886 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: Byte changed from outside: the second byte of SET 5,A at 5195H (EFH); SYS9/SYS writes 6FH (BIT 5,A) while text is typed so that keys keep their capitals, then EFH again. (disassembly) |
| 5198H ↳20888 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Self-modified operand of CP 00H at 5197H: the number of directory record sectors of the drive (sectors on the cylinder less 2, 5182H). (disassembly) |
| 51A4H ↳20900 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: Read a Hexadecimal Number. Reads keys until a comma, a space or ENTER. When that is the first key, returns at once with the Z FLAG set (the CARRY FLAG too for ENTER) and Register Pair HL as it was. Otherwise Register Pair HL = the number, the last four digits typed, and the Z FLAG is clear; the CARRY FLAG is set when ENTER ended it. A key that is not a hexadecimal digit ends the command: JP C,4E49H back to the command loop, which resets the Stack Pointer (the X key is used for this). SYS9/SYS calls this routine for its own commands. (disassembly) |
| 51A6H ↳20902 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Not in the File. The file loads nothing at 51A6H-51BCH; no code of SYS2/SYS addresses these bytes, so they keep whatever was there before SYS2/SYS was loaded. (disassembly) |
| 51ABH ↳20907 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: Read a Decimal Number. Register Pair HL = the first digit, Register Pair BC = 0000H. Each digit makes Register Pair BC ten times larger plus the digit (the value wraps above 65535); the first character that is not a digit ends the number, with Register Pair HL at it. The caller (5174H) stores the result whatever the flags say. (disassembly) |
| 51BDH ↳20925 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: Read or Write the Hash Index Table. 51BDH reads, 51BEH writes, sector 1 of the directory cylinder (the HIT) of drive Register C, with the buffer 4200H. The bytes F6H AFH at 51BDH are OR AFH, which leaves the NZ FLAG (read); entered at 51BEH, the AFH alone is XOR A, which leaves the Z FLAG (write). A read accepts only a sector with the deleted data mark of a directory sector (error 16H, HIT read error, when it fails); a write puts the deleted data mark on it and verifies it (error 17H, HIT write error). Returns the Z FLAG on success, else the NZ FLAG with Register A = the error; Register Pair HL = 4200H, Register Pairs BC and DE kept. SYS6/SYS's RENAME calls both entries (its 52A7H, 52B8H). (disassembly) |
| 51BEH ↳20926 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: The write entry of the HIT routine: the second byte (AFH, XOR A) of OR AFH at 51BDH; the HIT at 4200H is written to sector 1 of the directory cylinder of drive Register C with the deleted data mark and verified (error 17H). SYS6/SYS (RENAME, its 52B8H) calls it. (disassembly) |
| 51C0H ↳20928 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: Read a Hexadecimal Number in Quotes. Register Pair HL = the character after the X, Register Pair BC = 0000H. A quote (27H) must come first; then each hexadecimal digit (0-9, A-F, a-f) makes Register Pair BC 16 times larger plus the digit, up to a character that is not one. The closing quote is passed over when it is there. The test also takes the characters 3AH-40H as the digits 3-9 and 5BH-60H as 4-9. Returns the Z FLAG with the number in Register Pair BC, or the NZ FLAG when the quote after the X is missing. (disassembly) |
| 51C0H ↳20928 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: Hexadecimal Digit to Its Value. Register A = a character. Returns Register A = 00H-0FH with the CARRY FLAG clear for 0-9 and a-f (the keys come lower case from 5189H), or the CARRY FLAG set for any other character. Each test is an addition that carries out of Register A when the character is past the end of a range. (disassembly) |
| 51D1H ↳20945 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: Hexadecimal Output. 51D1H shows the byte at Register Pair HL and steps Register Pair HL past it; 51D5H shows Register Pair HL as four digits; 51DAH shows Register A as two digits; 51E3H shows bits 3-0 of Register A as one digit. Each digit goes to the ROM's display routine at 0033H, which 51EBH jumps to. SYS9/SYS calls 51D1H, 51D5H and 51DAH too. (disassembly) |
| 51E1H ↳20961 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: The Work Area. The cells where @OPEN and @INIT keep the parts of the specification and the five bytes that start a new directory record. 51E1H-51F8H are not in the file; 51F9H-51FEH are loaded with 00H; 51FFH is the last byte of the 0400H that SYS2/SYS takes up (4BC9H) but is not in the file. SYS6/SYS (RENAME, its 5272H-52B8H) and SYS7/SYS (its 5284H-53AFH) use these cells after an @OPEN. (disassembly) |
| 51E2H ↳20962 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: 51E2H-51E9H, not in the file: the password of the file specification, spaces when none (50F4H); hashed by 4E27H. SYS7/SYS reads it. (disassembly) |
| 51EAH ↳20970 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS1: The Texts of SYS1/SYS (Data). The extension the command loop gives a program name (4E87H) and the prompt it displays (4E3EH). (disassembly) |
| 51EAH ↳20970 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: 51EAH-51F4H, not in the file: the file name (8) and extension (3) of the specification, padded with spaces, the form of a directory record's +05H-+0FH; hashed by 4E17H. SYS6/SYS uses it. (disassembly) |
| 51EEH ↳20974 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: A Byte and a Space, or a Space. 51EEH shows Register A as two hexadecimal digits and a space; 51F1H shows only the space. SYS9/SYS calls 51F1H. (disassembly) |
| 51F5H ↳20981 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: 51F5H-51F6H, not in the file: the hash code of the password (4F5AH), compared with 113DH and the record's +10H-+11H, copied to +10H-+11H of a new record. SYS7/SYS stores and reads it. (disassembly) |
| 51F5H ↳20981 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS5: Show Three Characters. Shows the three bytes from Register Pair HL as characters (the register pair names at 4F53H) and leaves Register Pair HL past them: 51F5H calls 51FBH twice and then goes on into it. (disassembly) |
| 51F7H ↳20983 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: 51F7H-51F8H, not in the file: not set by SYS2/SYS; @INIT copies them to +12H-+13H of a new directory record. SYS7/SYS stores a hash code there. (disassembly) |
| 51FBH ↳20987 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: 51FBH-51FEH: the attribute (4FCBH, 5031H) and three bytes of 00H, copied to +00H-+03H of a new directory record. (disassembly) |
| 51FFH ↳20991 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS2: 51FFH, not in the file: the record length the caller gave in Register B (4F41H), for byte +09H of the control block and +04H of a new directory record. (disassembly) |
| 5200H ↳20992 ↳MEMORY | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 1 (MEMORY): Entry, Parameters and CLEAR. The MEMORY command (library member 1EH). SYS1/SYS's command loop issues request 88H with Register B = 1EH; the overlay loader of SYS0/SYS (4BF5H) loads this member at 5200H-5603H and the supervisor dispatcher calls 5200H with Register Pair HL at the command's parameters. The parameters are read by @PARAM (4476H) straight into the operands of the instructions that use them (table at 54E9H). CLEAR (5214H) fills 5200H up to HIGH$ with 00H; ADD, WORD and BYTE (523BH) show and change memory; HIGH (5294H) reserves memory below HIGH$; with neither, MEMORY shows HIGH$ or lists the modules above it (52CFH); GO (545FH) jumps to an address last. (disassembly) |
| 5200H ↳20992 ↳DIR | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): Entry, the File Specification and the Drive. The DIR command (library member 21H), loaded at 5200H-5BE0H. Register Pair HL points at the text after DIR: an optional partspec (name and extension with $ for any character, a leading - to show the files that do not match), an optional drive (:d, or the digit alone), then the parameters in brackets (table at 5A42H). The partspec goes into the masks at 5B6AH (8 bytes) and 5B72H (3 bytes), the drive into 52AEH (the first drive shown) and 53FEH (FFH: no drive given, show every drive). (disassembly) |
| 5200H ↳20992 ↳KILL | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 3 (KILL): Entry and the Loop over the File Specifications. The KILL command (library member 18H), loaded at 5200H-5370H. Register Pair HL points at the text after KILL: one or more file specifications, or device names (*XX). Each is taken in turn: a file is opened to check its access and deleted with @KILL (4424H, 442CH); a device is taken out of its device control block (5286H). Each deletion is shown as Deleting: name:d. BREAK between two specifications ends the command; an error ends it through @ERROR. (disassembly) |
| 5200H ↳20992 ↳LIB | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 4 (LIB, CLS, TOF): the Three Entries. One member serves three commands, loaded at 5200H-52D2H: LIB (member 19H) enters at 5200H, CLS (24H) at 5203H and TOF (25H) at 5206H, the entry addresses their member headers in the file give. CLS clears the screen; TOF moves the printer to the top of the next form; LIB lists the library commands (5222H). Each ends with Register Pair HL = 0000H. (disassembly) |
| 5200H ↳20992 ↳DO | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): Entry, Open the JCL File and Create SYSTEM/JCL. The DO command (library member 91H), loaded at 5200H-59D7H (its end is 5D00H, the symbol table reaching above the loaded bytes). It reads a /JCL source file line by line, works out the lines that are kept and the parameter values put into them, writes the result to a file SYSTEM/JCL on the first writable drive, and runs it. An optional control character after DO changes this: * runs the SYSTEM/JCL that is already there (532BH), = runs a named file without compiling it (5314H), $ compiles to SYSTEM/JCL without running it (52C0H, the quiet flag). The source file keeps its default extension /JCL. (disassembly) |
| 5200H ↳20992 ↳SPOOL | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 6 (SPOOL): Entry and an Installed Spooler. The SPOOL command (library member A2H), loaded at 5200H-59DAH. It builds a printer spooler in high memory: a module of 016BH bytes (copied from 5844H), a queue block of 44 bytes (from 59AFH), a table of 4 byte slots, one for each 256 byte memory page and each disk sector of the buffer, and the memory pages. The module takes over the output of the device (its control block's driver address), stores each character in the queue, sends the queue to the device from an interrupt task (slot 9) two characters a tick while the device is ready, and moves pages between memory and the spool file from the keyboard task (@KITSK, 4300H), since a disk transfer cannot run inside the interrupt. The spooler's parameter block (module +0AH, 10 bytes) is addressed by Index Register IY at 584EH while the member runs and by 4DF0H-4DF1H once it is installed. When a spooler was installed before (4DF1H not 00H), its parameter block is copied back here and only OFF, PAUSE, RESUME and CLEAR are accepted. (disassembly) |
| 5200H ↳20992 ↳COPY | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 7 (COPY, APPEND): the Two Entries and APPEND. One member serves COPY (member 32H, entry 5200H) and APPEND (member 31H, entry 5203H), loaded at 5200H-5A6DH. The source's control block is 5986H and the destination's 59DAH. APPEND opens both files (the destination must exist and be a file), refuses files whose directory records give different record lengths, and positions the destination at its end. When its end is at a sector boundary and STRIP is not given, whole sectors are copied (53DCH); otherwise, and for a device as the source, byte by byte (5519H). STRIP backs the destination up one byte first. (disassembly) |
| 5200H ↳20992 ↳LIST | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 8 (LIST): Entry, Parameters and the File. The LIST command (library member 41H), loaded at 5200H-563BH. It lists a file on the screen, or with P on the printer, as text (ASCII) or with HEX as records in hexadecimal and characters. The parameters (table 55C2H) are read only when a bracket follows; their values go straight into the operands that use them. The file is opened with the extension TXT added when it has none, and when that file is not found, as typed. Its control block is 564CH (a copy of the specification at 566CH), its buffer 5700H. (disassembly) |
| 5200H ↳20992 ↳RENAME | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 9 (RENAME): Read the Two Names. The RENAME command (library member 53H), loaded at 5200H-53A4H. The old file's specification goes to the control block at 53C4H, the new name to 53A4H (as typed when @FSPEC refuses it, such as /EXT); the parts the new name leaves out (name, extension, password) are taken from the old one. The old file must allow renaming (access level 0-2, else error 25H). The new name gets the old file's drive (another drive is error 20H) and must not exist. Then the directory record gets the new name and extension, and the hash index table the new name's hash. (disassembly) |
| 5200H ↳20992 ↳DEVICE | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 10 (DEVICE): Parameters and the Drives. The DEVICE command (library member 61H), loaded at 5200H-56DFH. It shows up to three parts, each on unless its parameter is turned off: DRIVES (one line for each drive whose code table starts with a JP, C3H), BYTEIO (the device control blocks) and STATUS (the options and the system modules kept in memory). P sends every line to the printer too. 520DH copies P into the N cell, so the display stops at each page of 14 lines unless P is given. A drive whose diskette can be read shows the diskette's name from its GAT, with WP when it or its code table is write protected. (disassembly) |
| 5200H ↳20992 ↳LINK | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 11 (LINK): Link Two Devices. The LINK command (library member 62H), loaded at 5200H-53A1H: LINK *d1 *d2. Only at LDOS command level. The first device must not be routed (bit 4 of its type). A module of 41 bytes named LK and the four letters of the two devices (52C7H) is put in high memory (HIGH$ lowered by 29H) or over a module of the same name found by request BCH, and the first device's driver address is pointed at it: the module calls the first device's old driver and then gives the result to the second device with @PUT; for input it asks the second device with @GET when the first has no character. For the keyboard during a JCL job the driver word changed is KIJCL$ (43BEH), where SYS11/SYS keeps the keyboard driver. (disassembly) |
| 5200H ↳20992 ↳RESET | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 12 (RESET): Read What to Reset. The RESET command (library member 63H), loaded at 5200H-54D5H. With no specification it resets the whole system (5290H); with a device (an asterisk and two letters) that device (5240H); with a file, its record length (LRL) or its date (DATE) in the directory (5374H). The drivers the system started with (KISV$, DOSV$, PRSV$, saved by the boot) are first put into the templates of KI, DO and PR at 542DH. (disassembly) |
| 5200H ↳20992 ↳ROUTE | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 13 (ROUTE): Read the Two Specifications. The ROUTE command (library member 64H), loaded at 5200H-53F3H: ROUTE *d1 [TO] *d2 or a file, or ROUTE *d1 (NIL). The first device's control block is found, or a free block (named 0000H) is taken for a new device (none free: error 21H, no device space available); a file it was routed to is closed. Routed to a device, its type becomes 10H and its +01H-+02H the other device's block. Routed to a file, a module named $R and the device's letters is made in high memory (a 9 byte header and the file's control block, below a buffer of 256 bytes), or one of that name is used again; the file is opened with @INIT and positioned at its end unless REWIND is given, and the device points at the control block in the module. NIL makes its type 08H. The parameters (NIL, REWIND) may follow either specification. (disassembly) |
| 5200H ↳20992 ↳RUN | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 15 (RUN, LOAD): Load a Program from Another Diskette. One member, loaded at 5200H-536FH, serves RUN (member 82H, entry 5200H) and LOAD (member 81H, entry 5203H): [RUN or LOAD] (X) filespec. The parameter X comes before the file; the file goes to CFCB$ (4480H) with the extension CMD when it has none, and SYS2/SYS is loaded first (request 84H). Without X, RUN hands the file to @RUN and LOAD to @LOAD (which returns through 4408H, the RET Z of @CMNDI, so that an error falls into @ERROR). With X the source diskette is asked for, the program is loaded with @LOAD, the system diskette is asked for again, and RUN then jumps to the program's transfer address with Register Pair HL at the rest of the command line. (disassembly) |
| 5200H ↳20992 ↳AUTO | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 1 (AUTO): Entry and AUTO ?. The AUTO command (library member 11H), loaded at 5200H-5351H. SYS1/SYS's command loop issues request 89H (Library B) with Register B = 11H; the overlay loader of SYS0/SYS (4BF5H) loads this member and the supervisor dispatcher calls 5200H with Register Pair HL at the text after AUTO. The AUTO command of a diskette is kept in its granule allocation table, bytes E0H-FFH of the sector (42E0H-42FFH once the sector is read into 4200H); SYS0/SYS's reset runs it after the boot. AUTO ? displays it, AUTO = runs it now (5232H), and AUTO followed by a command stores that command (5261H); AUTO alone stores an empty one (0DH). Each form may name the drive with :d first; drive 0 when not. (disassembly) |
| 5200H ↳20992 ↳TIME | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 2 (TIME, DATE): Entries and Name Tables. The DATE command (library member 15H, entry 5203H) and the TIME command (member 16H, entry 5200H), loaded at 5200H-548DH. The supervisor dispatcher calls the entry with Register Pair HL at the text after the command word. DATE shows the system date as, for example, Tue, Jan 1, 1980, or sets it from MM/DD/YY; TIME shows the time as HH:MM:SS, sets it from HH:MM or HH:MM:SS, and with (CLOCK) or (CLOCK=N) starts or stops the clock display at the top right of the screen. The date is kept in DATE$ (4044H-4048H), SVDAT1$ and SVDAT2$ (4306H, 4307H) and the year offset at 4466H; the time in TIME$ (4041H-4043H). (disassembly) |
| 5200H ↳20992 ↳CREATE | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 3 (CREATE): Entry and the Parameters. The CREATE command (library member 13H), loaded at 5200H-53D2H. It makes a file of a given size ahead of time: SIZE=K (kilobytes, four 256 byte sectors each) or REC=n (records, with LRL=l, 1-256, the record length). The file is opened or created with @INIT, its last record written so that all its space is allocated, and its directory record marked with bit 7 of +01H, which keeps @CLOSE from giving the space back. Without FILL the end of file is put back to what it was, so a new file stays empty; FILL=c writes every record full of the byte c. SHRINK clears the mark again. The file's control block is at 53E2H and its name for the message at 53D3H, above the member; the buffer is 5500H. (disassembly) |
| 5200H ↳20992 ↳VERIFY | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 4 (VERIFY, DEBUG): Entries and DEBUG. The VERIFY command (library member 1BH, entry 5200H) and the DEBUG command (member 14H, entry 5203H), loaded at 5200H-5349H. DEBUG turns DEBUG on (bit 7 of SFLAG$, so that @RUN enters DEBUG at a program's first instruction, and the BREAK trap at 4315H-4317H set to JP 400FH, so that BREAK enters it) or off with (OFF) or (N). DEBUG (EXT) also loads the extended DEBUG commands (request 8BH, SYS9/SYS) and DEBUG (OFF,EXT) gives their memory back when they are the lowest module above HIGH$. VERIFY (ON) or VERIFY (OFF) points the @WRITE vector at the write with or without the verify of every sector. Both read their parameters through 5292H or 5297H, which return the Z FLAG when OFF (or N) was given. (disassembly) |
| 5200H ↳20992 ↳SYSGEN | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 5 (SYSGEN): Entry, the JCL Pause and the Checks. The SYSGEN member (library member 1CH), loaded at 5200H-552FH. No command word leads here: SYSTEM (SYSGEN) (member 7, its 5A4AH-5A4EH) issues request 89H with Register B = 1CH, Register H = the drive and Register L = FFH to build or 00H to delete. Building writes CONFIG/SYS.CCC:d, a load module that holds the memory above HIGH$ and the resident cells that SYSTEM, SET, ROUTE, LINK and the drivers change, and sets byte 01H of the drive's system information sector to 00H so that SYS0/SYS's reset loads it; deleting sets that byte to C9H and kills the file. A running JCL job is paused first (53A2H) and resumed at the end (53D6H). Only at LDOS command level. (disassembly) |
| 5200H ↳20992 ↳FREE | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 6 (FREE): Entry and the Text. The FREE command (library member 22H), loaded at 5200H-55A3H. FREE alone shows one line for each drive that is ready: Drive :d, the diskette's name and date, the cylinders, density and heads, the free and the total space in kilobytes and the free and the total directory records (template at 5512H). FREE :d clears the screen and shows that drive's line followed by a map of its granules, six cylinders to a line: x a granule in use, a period a free one, an asterisk one locked out, D the directory cylinder. (P) sends every line to the printer as well, with no pause at the end of a page. The line is built in the 64 byte buffer at 555AH-5599H (not in the file), which the 03H at 559AH ends. (disassembly) |
| 5200H ↳20992 ↳SYSTEM | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): Entry, the Parameters, SLOW and FAST. The SYSTEM command (library member A1H), loaded at 5200H-5EE6H, the largest member. One call of @PARAM reads every parameter in the brackets against the table at 5DF6H (30 keywords), and each value goes straight into the operand of the LD BC (or LD HL, LD DE) that tests it. The options are then taken one after the other in a fixed order, each skipped when its keyword was not given: SLOW, FAST, BASIC2, PRTIME, BREAK, UPDATE, DATE, TIME, TRACE, BSTEP, BLINK (LARGE, SMALL), TYPE, SMOOTH, GRAPHIC, ALIVE, SVC, SYSRES, the drive options (DRIVE, WP, CYL, DISABLE, ENABLE, STEP, DELAY), DRIVER, SYSTEM, SWAP and SYSGEN. A keyword alone stores FFFFH, KEY=N 0000H, KEY=value the value; the value in the file (0000H, 0001H or FFFFH) means not given. (disassembly) |
| 5200H ↳20992 ↳BUILD | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 8 (BUILD): Entry, the File and the Mode. The BUILD command (library member 33H), loaded at 5200H-5402H. It makes a file from lines typed at the keyboard: the default extension is /JCL. The file is opened with @INIT (control block at 5403H, buffer 5500H, both above the member); a new file shows Building: and its name, an existing one is refused with File already exists unless APPEND is given, which goes to its end and shows Appending:, the keyboard's device name, to and the name. A file with the extension KSM (a keystroke file) prompts A=> to Z=> for 26 lines; a /JCL file takes lines of up to 63 characters (255 otherwise); with HEX each line is taken as pairs of hexadecimal digits. The lines are kept from 5600H on and written to the file when BREAK is pressed on an empty line. (disassembly) |
| 5200H ↳20992 ↳ATTRIB | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 9 (ATTRIB): Entry and a File's Attributes. The ATTRIB command (library member 51H), loaded at 5200H-56D5H. With a file specification it changes the file's directory record: I (invisible), V (visible), PROT=level, ACC=password and OWNER (or UPDATE)=password; the file is opened first (control block 56D6H, buffer 4200H) and must allow full access (level 0). Without a file specification it works on a diskette (53C5H): NAME, PW (the master password), LOCK and UNLOCK. The options of a file are read here by the member itself, by their first letter; a bad one gives Attribute specification error!. (disassembly) |
| 5200H ↳20992 ↳DUMP | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 10 (DUMP): Entry, the Range and the File. The DUMP command (library member 71H), loaded at 5200H-5405H. It writes the memory from START (5500H when not given) to END (54FFH when not given) to a file: as a load module (default extension /CIM: a name record with up to six letters of the file's name, load blocks of at most 254 bytes, and a transfer record for TRA, 402DH when not given), or with ASCII as the bytes alone (default /TXT) followed by the ETX byte (03H when not given). LRL (1-256) sets the record length. The file's control block is at 542CH and its six letter name at 5426H, above the member; its buffer is 5500H. (disassembly) |
| 5200H ↳20992 ↳PURGE | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 11 (PURGE): Entry, the Partspec and the Drive. The PURGE command (library member 72H), loaded at 5200H-577CH (5711H-5733H, a work area, are not in the file). PURGE partspec:d deletes the files of drive d whose name and extension match the partspec ($ matches any character; a space, which fills the masks, matches anything); a leading dash deletes the files that do not match. System files need SYS, invisible files INV; DATE="M/D/Y-M/D/Y" limits the files to a range of dates. Unless QUERY=N each file is asked about (Y deletes it); MPW gives the master password when the diskette has one other than PASSWORD. The drive is required. (disassembly) |
| 5200H ↳20992 ↳FORMS | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 12 (FORMS): Entry and the Exit. The FORMS command (library member B1H), loaded at 5200H-5525H. It shows and changes the settings of the printer filter PR/FLT, which must be in memory as the module $FF (else Forms Filter not Resident). Ten bytes are worked on in a copy at 552BH (above the member, Index Register IY): three from the printer's device control block (+03H the page length, +04H the line count, +05H the lines to print) and seven from the filter's own block (the column, XLATE from and to, INDENT, the flags of ADDLF, FFHARD, TAB and SLINE, CHARS, MARGIN). FORMS alone shows them; FORMS (parameters) changes them, writes them back and shows them. (disassembly) |
| 5200H ↳20992 ↳SETCOM | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 13 (SETCOM): Entry and the Exit. The SETCOM command (library member B2H), loaded at 5200H-569CH. It shows and changes the settings of the RS-232 driver RS232/DVR, which must be in memory as the module $CL (else RS232/DVR not installed). Index Register IX points at the driver's four setting bytes (the module +08H): +00H the input signals (two bits each for RI 11H, CD 22H, DSR 44H and CTS 88H: 00 IGNORE, the low bit ON, both bits OFF), +01H the line (bit 0 RTS and bit 1 DTR, each clear for ON; bit 2 always set; bit 3 parity off; bit 4 two stop bits; bits 6-5 the word length; bit 7 even parity), +02H the baud rate's index in both halves, +03H the break character; +04H-+05H is the address of the driver's routine that sets the serial port from them. SETCOM alone shows the settings; SETCOM (parameters) changes them, runs that routine and shows them. (disassembly) |
| 5203H ↳20995 ↳CLS | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 4 (LIB, CLS, TOF): CLS enters here: a JP to the routine that clears the screen. (disassembly) |
| 5203H ↳20995 ↳APPEND | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 7 (COPY, APPEND): APPEND enters here: it saves the Stack Pointer and turns CLONE off. (disassembly) |
| 5203H ↳20995 ↳LOAD | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 15 (RUN, LOAD): LOAD enters here: it reads X and the file into CFCB$ (4480H) and loads the program with @LOAD. (disassembly) |
| 5203H ↳20995 ↳DATE | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 2 (TIME, DATE): DATE enters here: a JP to 524CH, which sets the date from MM/DD/YY or, without text, shows it. (disassembly) |
| 5203H ↳20995 ↳DEBUG | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 4 (VERIFY, DEBUG): DEBUG enters here: the parameters are read with the DEBUG table (EXT, E, ON, OFF, Y, N), then DEBUG is turned on or off, and with EXT the extended DEBUG commands are loaded or taken out. (disassembly) |
| 5206H ↳20998 ↳TOF | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 4 (LIB, CLS, TOF): TOF enters here: the printer is asked for its status through the ROM (0023H), then sent a form feed (0CH), which moves it to the top of the next form. (disassembly) |
| 5222H ↳21026 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 4 (LIB, CLS, TOF): LIB: List the Library Commands. Reads the command table of SYS1/SYS at 4EBDH, which stays in memory while a library command runs: eight bytes an entry (a six character name, the member and the flags), 00H after the last. The first pass shows the entries whose flags have bit 6 clear (Library A, SYS6/SYS), the second those with bit 6 set (Library B, SYS7/SYS; BOOT is listed there, its flags byte 4EH having bit 6 set). Each name shows its first letter as stored and the others XOR 20H (small letters), four names to a line. (disassembly) |
| 5222H ↳21026 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 15 (RUN, LOAD): Flash a Prompt until ENTER. Waits until BREAK and ENTER are let go, then shows the prompt at Register Pair HL (it ends with 1DH, the cursor back to the start of the line) and erases it with 1EH, again and again, while KFLAG$ is watched: BREAK ends the command with Command aborted! through @ABORT, after asking for the system diskette; ENTER clears the keys and returns to the caller of 5225H. (disassembly) |
| 5224H ↳21028 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 1 (MEMORY): The CLEAR Routine, Copied to 4200H and Run There. These 23 bytes are copied to 4200H-4216H by 5221H and run there: the addresses in the comments are those of the copy. It fills every byte from 5200H up to HIGH$ (4049H-404AH) with 00H, this member included, and leaves through @EXIT (402DH). The routine has no relative jump, so it runs the same at either address. (disassembly) |
| 5228H ↳21032 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 6 (FREE): FREE: One Line for Each Drive. Drives 0 to 7 are checked with @CKDRV in turn and the line of each one that is ready is shown (52C7H). With P a space and ENTER go to the printer first. (disassembly) |
| 5229H ↳21033 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 5 (SYSGEN): Build: The Name Record and the Banner. CONFIG/SYS is created with @INIT (records of 256 bytes, buffer 5600H) and written byte by byte through the ROM's @PUT (538BH) as a load module: a name record (05H) with CONFIG, a load block that writes the banner CONFIGURING (with three asterisks each side) on the screen at 3F96H while the file loads, and a load block of one C9H (RET) for 4012H, the interrupt vector, so that no interrupt is served while the file loads (the reset puts the C3H back afterwards). (disassembly) |
| 522BH ↳21035 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 4 (VERIFY, DEBUG): DEBUG (OFF): Turn DEBUG Off. Bit 7 of SFLAG$ is cleared and the BREAK trap switch gets C9H. With EXT as well, the extended DEBUG commands are taken out: when 4310H-4311H no longer holds 4876H (the default, a plain return) and points at HIGH$ + 1 (the module is the lowest in high memory), HIGH$ is put back from the module's link word (its +02H-+03H) and 4310H-4311H gets 4876H again. (disassembly) |
| 522DH ↳21037 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 12 (FORMS): Find the Filter and Copy Its Settings. Request BCH finds the module $FF and returns Register Pair DE at its +08H, right after its name (the filter's own device control block). The word at +10H-+11H is the address of the printer's device control block: its +03H-+05H are copied to 552BH-552DH, the module's +12H-+18H to 552EH-5534H. The two addresses are noted in the operands at 52E7H and 52EFH for the write back. (disassembly) |
| 522DH ↳21037 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 13 (SETCOM): Find the Driver; the Parameters. Request BCH finds the module $CL; Index Register IX gets the module +08H. Without an opening bracket the settings are only shown (54E1H). With one, @PARAM reads the parameters, DEFAULT puts the factory settings in first, 5394H changes the setting bytes, and the driver's routine at +04H-+05H is jumped to; its RET goes to 54E1H, which shows the settings. (disassembly) |
| 522EH ↳21038 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 3 (KILL): One File Specification: Open the File, Check the Access, Delete It. The specification is read into the control block at 5380H (above the member, not in the file) and copied without its password into 5371H for the message. A device name (*) goes to 5286H. A file must open and its access must be KILL or better (level 0 or 1, else error 25H); the drive is added to the message when the specification has none. (disassembly) |
| 522EH ↳21038 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 1 (AUTO): AUTO =: Run the AUTO Command Now. With an equals sign the AUTO command of the diskette is read from its granule allocation table and run at once through 4451H, as the reset runs it after a boot. A leading asterisk (2AH) is passed over and turns BREAK off (bit 4 of SFLAG$), as the reset does for such a command. The command is copied out of the buffer at 4200H first, since loading SYS1/SYS uses that buffer. (disassembly) |
| 5236H ↳21046 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): BASIC2: Leave LDOS for the ROM's BASIC. BASIC2 starts the Level II BASIC of the ROM without the disk system: the ROM's table of 54 bytes at 06D2H is copied to 4000H-4035H (the restart vectors and the device control blocks as at power up), 39 bytes from 4036H are cleared, and the ROM's own start continues at 0075H. It does not return. (disassembly) |
| 523BH ↳21051 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 1 (MEMORY): ADD, WORD and BYTE: Show and Change Memory. With ADD=address the member shows the address in hexadecimal and decimal and the two bytes there in the order they lie in memory; WORD= stores a word at the address (low byte first) and BYTE= one byte, and the bytes are then shown again after =>. The line is built in the template at 556BH: X'aaaa' = ddddd ('bbbb' => X'bbbb'). WORD=0 and BYTE=X'FF' cannot be given: those are the values that mean not given. (disassembly) |
| 523FH ↳21055 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 6 (SPOOL): Check for LDOS Command Level. A spooler may only be installed at LDOS command level: @EXIT (402DH) must not be taken over by a running program (a JP there), and the command must not come from a program through 4451H (bit 1 of 4758H). While a JCL job runs, SYS11/SYS keeps the original bytes of 402DH at 4065H, so those are tested instead. Otherwise the message Can't -- Valid only at LDOS Command level! ends the command. (disassembly) |
| 5240H ↳21056 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 12 (RESET): Reset One Device. The device's control block is looked for; a file it is routed to (at the end of its routes) is closed. The block's type becomes 08H (nothing assigned). For KI, DO and PR (blocks at 40xxH) the template from 542DH is copied over the block: the driver the boot found. PR also clears DFLAG$ bit 3 (PR/FLT), KI clears DFLAG$ bits 1, 2, 4, 5, 6 and empties task slot 10, and DO clears the screen. (disassembly) |
| 524BH ↳21067 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 6 (FREE): FREE :d: The Granule Map. The drive must be 0-7 and ready, else error 20H. 53DBH clears the screen and shows the drive's line and a line of dashes; then each line of the map gets its cylinders' label (the first from the template " 0- 5" at 5553H) and, for each of six cylinders, one character per granule in a column of nine (D for every granule of the directory cylinder). (disassembly) |
| 524CH ↳21068 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 2 (TIME, DATE): DATE: Set the Date from MM/DD/YY. Without text DATE goes straight to 528DH to show the date. With text the three fields are read by 53FAH into 52CDH (the month), 52CCH (the day) and 52CBH (the year); the year must be 80-99 (1980-1999) or 00-11 (2000-2011), the month 1-12 and the day within the month (29 days in February of a leap year). The three bytes are then copied into DATE$ at 4044H-4046H (year, day, month). (disassembly) |
| 5252H ↳21074 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): Set Up: SORT, the Sort Buffer, P and DATE. A DIR issued by a program (bit 1 of 4758H) is never sorted, since the sort buffer at 5E00H-HIGH$ is memory that program can be using. The highest address a sorted record may end at is HIGH$ - 33 (5BE3H). P implies N. DATE="M1/D1/Y1-M2/D2/Y2" gives a start date (5BE5H, bit 7 of the mode byte 5BE0H) and an end date (5BE7H, bit 0); "M1/D1/Y1" gives the same date for both, "-M2/D2/Y2" only the end and "M1/D1/Y1-" only the start. (disassembly) |
| 5255H ↳21077 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 13 (ROUTE): Point the Device at Its Destination. Register Pair HL (on the stack) is the destination: another device's control block, or the file's control block in the module. 5303H finds or makes the device's block. Its type becomes 10H (routed), its +01H-+02H the destination, and its +06H-+07H the device's letters. The keyboard test, which would put the destination into KIJCL$ (43BEH) during a JCL job, is never reached because of the INC L at 5261H. (disassembly) |
| 5256H ↳21078 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): PRTIME: The Printer Time Out of PR/FLT. The printer filter PR/FLT keeps its module address at 4DF6H-4DF7H (0000H when it is not installed: Printer filter not resident!). Byte +19H of the module is the offset of the filter's time out byte in the module; PRTIME=ON stores 1BH there, PRTIME=OFF 00H. (disassembly) |
| 5259H ↳21081 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 6 (SPOOL): Read the Device and the Spool File. The first specification is the device (an asterisk and two letters; PR when none is given) and goes to the control block at 57B8H. A file specification after it, or one given without a device, names the spool file; it is put together in the queue block at 59AFH, whose first 32 bytes are the spool file's control block. With no file name the name is the two letters of the device; the extension is SPL unless one is given, and a drive alone (:d) is added to that name. (disassembly) |
| 525EH ↳21086 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 4 (VERIFY, DEBUG): DEBUG (EXT): Load the Extended DEBUG Commands. Only at LDOS command level: when @EXIT (402DH) holds a JP (a program has taken it over) or bit 1 of 4758H is set (a command line from a program), the command is refused with Can't -- Only valid at LDOS command level!. Request 8BH loads SYS9/SYS, which installs the extended commands in high memory; its RET comes back to the caller of 525EH. (disassembly) |
| 5260H ↳21088 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): The Command Tail: Parameters and the Keyin Prompt. The text after the source file is scanned: spaces and commas are passed over, an opening bracket starts the parameter list (533CH), a semicolon prompts with a question mark for more text through @KEYIN, and ENTER ends the command line, so that the compile and the run follow (5384H). Any other character is a parameter error. (disassembly) |
| 5261H ↳21089 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 1 (AUTO): AUTO command: Store a New AUTO Command. Any other text after AUTO (after an optional :d) is stored as the new AUTO command in bytes E0H-FFH of the drive's granule allocation table, up to and with its 0DH; nothing but ENTER stores an empty command. The sector is then written back (52E3H). A command of 32 bytes or more is refused with Command line too long!, a write protected drive with Destination disk is write protected!. (disassembly) |
| 5262H ↳21090 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 5 (SYSGEN): Build: The Memory above HIGH$. The top of memory is found by changing a byte and reading it back, from FFFFH down in steps of 4000H (16K). Everything from HIGH$ + 1 to the top is written as load blocks (52EBH): the modules that have installed themselves in high memory. Then 4018H is cleared and the table at 54CEH names the resident cells that are written next, each as load blocks of its current contents. (disassembly) |
| 5262H ↳21090 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 12 (FORMS): The Parameters. @PARAM stores each value at the cell the table names (545CH-546DH). DEFAULT copies the factory values (LINES not given, PAGE 66, the others 0) over the cells first. The cells then go into the work copy: CHARS, MARGIN, INDENT, the flags (TAB, FFHARD, ADDLF from the cells; SLINE, bit 3, kept), XLATE (from in the high byte, to in the low byte), PAGE + 1 at +00H, 1 at +01H, 0 for the column, LINES + 1 (or PAGE + 1 when LINES was not given) at +02H; without SLINE the three page values lose the 1 again. (disassembly) |
| 5263H ↳21091 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 11 (PURGE): DATE: The Range of Dates. DATE="M/D/Y" keeps the files of that date, "M/D/Y-" those from it on, "-M/D/Y" those up to it and "M/D/Y-M/D/Y" those between. Each date is packed by 55F4H as year (less 1980) x 800H + month x 80H + day x 4, the form 5577H gives a directory record's date. Bit 7 of 5710H says a lowest date is kept at 5711H-5712H, bit 0 a highest date at 5713H-5714H. (disassembly) |
| 5263H ↳21091 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 13 (SETCOM): The Display: One Routine for Each Part. The list at 553CH names these routines in the order of the display (5364H calls them): RS232:, Baud=, Word=, Stop=, Parity=, Break=, Output control: DTR= and RTS=, Input control: RI=, DSR=, CD= and CTS=, a comma and a space between items, and ENTER at the end. Each ends with @DSPLY of its text (ended by 03H, so the line goes on) or the ROM's character display. (disassembly) |
| 5271H ↳21105 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 4 (VERIFY, DEBUG): VERIFY: Point the @WRITE Vector. VERIFY reads its parameters with the table at 5329H (ON, OFF, Y, N). With OFF or N the @WRITE vector (the JP at 4439H, operand 443AH-443BH) goes to 48CBH, the plain write; otherwise to 48E6H, the write that verifies each sector after writing it. Then the common exit. (disassembly) |
| 5274H ↳21108 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 3 (CREATE): Show the Name and Extend the File. The name is shown after Creating:. A file that already has as many records as asked for, or more, is refused with File exists larger! (it stays as it is). Otherwise the last record wanted is written with E5H bytes, which allocates the whole size, and the directory record gets bit 7 of +01H and the record length. (disassembly) |
| 5276H ↳21110 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): BREAK: Allow or Disable the BREAK Key. BREAK=ON clears bit 4 of SFLAG$ and stores 00H (NOP) at 4BF0H; BREAK=OFF sets bit 4 (the interrupt's keyboard scan then ignores BREAK) and stores C8H (RET Z) at 4BF0H, so that request code 01H returns at once with Register A = 00H. (disassembly) |
| 527BH ↳21115 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 9 (ATTRIB): PROT=level. The value's first two letters are looked up in the table of eight two letter words at 55FAH: NO, EX, RE, WR, ~~ (never matched), NA, KI, FU; the level is 7 less the word's place (NO 7, EX 6, RE 5, WR 4, NA 2, KI 1, FU 0), and RE followed by N (RENAME) is 2. The level goes into the operand at 5389H and bit 0 of the mask is set. (disassembly) |
| 527CH ↳21116 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 15 (RUN, LOAD): RUN. Without X the file in CFCB$ is handed to @RUN, which loads and runs it. With X the program is loaded (52CCH), the system diskette is asked for, and the RET at 5221H goes to its transfer address with Register Pair HL at the rest of the command line. (disassembly) |
| 527DH ↳21117 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 3 (KILL): Helper: Display the Deleting Line. Displays Deleting: followed by the name built at 5371H. Register Pair DE (the control block) is kept. (disassembly) |
| 527EH ↳21118 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 8 (LIST): Record Length, TAB, Device and Mode. The record length comes from LRL; the test that would take the file's own from its directory record gives the Z FLAG only for an LRL of FFFEH, so with LRL not given (FF00H) it is 00H, 256. TAB (8 when given alone) must be 1-32. P lists on the printer (PRDCB$) without stopping, else on the screen (DODCB$). HEX goes to 5399H. For text the page is 15 lines and the screen is not cleared between pages; LINE skips to its line first. (disassembly) |
| 5286H ↳21126 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 3 (KILL): Remove a Device. The two letters after the asterisk name the device. Its device control block is looked for among KI, DO and PR (4015H-402CH), then JL, SI, SO and the five spare blocks (43C0H-43FFH); not found is error 08H. KI, DO, PR and JL cannot be removed (error 28H), nor a device that is assigned (bit 3 of its type clear: error 27H). The block is cleared to 00H, every device routed to it (type bit 4) becomes unassigned (08H), the first eight bytes of the control block at 5380H are cleared, and Deleting: with the device's name is shown. (disassembly) |
| 528BH ↳21131 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): Pop an Included File off the Include Stack. When the end of an included file is reached, its saved control block is taken back from the include stack: 5906H holds the address above the top entry, each entry 32 bytes. The entry is copied back to the working source control block at 57BCH and the stack pointer lowered. (disassembly) |
| 528CH ↳21132 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 13 (ROUTE): Route a Device to a File. A module of the name $Rxx found by request BCH is used again in its place (HIGH$ is not lowered, 52E5H). Otherwise, only at LDOS command level, the module goes below HIGH$: the page below HIGH$ + 1 is the file's buffer, the module's 41 bytes below it, and HIGH$ just below the module. The file is opened with @INIT (made when it is not there) and, without REWIND, positioned at its end (@PEOF; error 1CH there is the normal end). (disassembly) |
| 528DH ↳21133 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 2 (TIME, DATE): DATE: Note the Date for the Reset, Then Show It. Reached with Register Pair DE = 4044H both after a new date and when DATE has no text. The year less 1980 goes to 4466H, bit 7 of 4048H is set for a leap year (it is not cleared otherwise), the day to SVDAT2$ (4307H) and the month OR 50H to SVDAT1$ (4306H), which SYS0/SYS's reset uses to keep the date over a reset. A month of 0 means no date was ever set: Date not in system. (disassembly) |
| 528FH ↳21135 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): UPDATE: The Midnight Date Change. UPDATE=ON puts the module $UP (52FCH-536EH, 115 bytes) below HIGH$ (or uses the one already there, found through request BCH, 5AE7H) and a JP to it at 45DAH, where SYS0/SYS's clock task arrives after the hours wrap at midnight: the module then moves the date on by one day. UPDATE=OFF puts the RET (C9H) back at 45DAH and gives the module's memory back when it is the lowest in high memory. (disassembly) |
| 5290H ↳21136 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 12 (RESET): Reset the Whole System. Only at LDOS command level. PR/FLT and the keyboard options are taken out of DFLAG$, and every file a device is routed to is closed. When a task slot (4500H, twelve entries) holds a block above HIGH$, a task in high memory still runs: the message says so, the memory is not given back and only the devices are reset. Otherwise the hooks are put back as the boot left them (45DAH RET, the DEBUG hook 4310H = 4876H, no system files kept in memory, 4DF0H-4DFDH cleared, SFLAG$ bit 0 cleared, the requests below 80H to 4BEFH, the job log and @ICNFG RET), the drive code tables are read again from the system information sector of drive 0 (cylinder 0, sector 2) and HIGH$ is set to the top of memory. Then KI, DO and PR, and JL, SI and SO, get their templates, the five spare blocks are cleared, and the screen is cleared. (disassembly) |
| 5292H ↳21138 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 4 (VERIFY, DEBUG): Read the Parameters, Test OFF. 5292H uses the DEBUG table (5319H), 5297H the VERIFY table (5329H). The Stack Pointer is saved for the exit (the return address of this CALL is on top, 5285H takes it off). A bad parameter reports error 2CH and ends the command. Returns the Z FLAG when OFF or N was given (FFFFH at 52A6H), the NZ FLAG otherwise: ON and Y are stored at 52ADH, which no code reads. (disassembly) |
| 5293H ↳21139 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 15 (RUN, LOAD): Read X and the File. The parameters come first (table 5364H: X). A space is passed over, the file's specification goes to CFCB$ (4480H) and must not be a device; CMD is added when it has no extension. SYS2/SYS is loaded (request 84H) while the system diskette is in. With X the source diskette is asked for. The error exits put the Stack Pointer back to the depth of 5293H's own return address, so after a message they RETurn to the instruction after the CALL 5293H with Register Pair HL = FFFFH, or end a JCL job. (disassembly) |
| 5294H ↳21140 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 1 (MEMORY): HIGH: Reserve Memory below HIGH$. HIGH=address makes the memory from address + 1 up to the current HIGH$ a reserved block: a ten byte module header (the template at 54A9H) is written at address - 9 to address, HIGH$ becomes address - 10, and the header names the block &aaaa after its first address. The address must be below the current HIGH$ (or equal to it) and above the word 5200H holds at this point (73EDH, the first two bytes of this member), else Range error. (disassembly) |
| 5299H ↳21145 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 8 (BUILD): The Lines. Each line is read with @KEYIN (0040H) into the memory at Register Pair HL, from 5600H on: the line and the 0DH after it stay there (or, with HEX, the bytes its digit pairs give). A KSM file gets the prompt letter=> before each line, A to Z, and ends after Z. BREAK with characters typed takes the line as it is; BREAK on an empty line ends the input. (disassembly) |
| 529AH ↳21146 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 5 (SYSGEN): Build: The Drive Code Tables, the End and the Flag. The 80 bytes of the drive code tables (DCT$, 4700H-474FH) are written as a load block for 4152H: SYS0/SYS's reset copies them from 4152H to 4700H after loading the file. Two loads of Register Pair HL stand where a load block for 4012H would be written; no block is written there. A load block of 19 spaces then clears the banner, the transfer record (02H 02H, address 0000H) ends the module, and the file is closed. Byte 01H of the drive's system information sector (cylinder 0, sector 2) is set to 00H: the reset loads CONFIG/SYS. Finally the file is made invisible and protected through @CMNDI. (disassembly) |
| 52A1H ↳21153 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 1 (AUTO): Check the Drive and Read Its Granule Allocation Table. Register C gets the drive from the operand at 52A2H. @CKDRV (44B8H) checks that the drive is there and ready and sets the CARRY FLAG when its diskette is write protected; that is kept at 5268H for 5267H. A drive that is not ready gives error 20H, a table that cannot be read error 14H; either is reported at 5296H, which ends the command, so a return from here means success. (disassembly) |
| 52A5H ↳21157 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): Read the Next Source Line. While the include stack is not empty (5906H above 5908H, its base), the end of an included file pops it (528BH) and reading goes on in the file that included it. 53BAH reads one line into 59D8H; 5384H and 53B7H come back here for the next line. (disassembly) |
| 52AFH ↳21167 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 4 (VERIFY, DEBUG): Messages and Errors. 52AFH (DEBUG during a JCL job) and 52B4H (EXT not at LDOS command level) display a message; 52BFH reports an error number through @ERROR. All three end the command with Register Pair HL = FFFFH. (disassembly) |
| 52B1H ↳21169 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 7 (COPY, APPEND): COPY: Read the Specifications and Parameters. Both specifications are read; a part of a destination (:1, /EXT) is kept as typed. A device at either end copies byte by byte (54F4H). X, the copy on one drive between two diskettes, may not run during a JCL job or with a device: the drive is taken from the source's specification and put into the two prompts, the destination becomes the source's specification, SYS2/SYS is loaded while the system diskette is still in, and the source diskette's name, date and password hash (GAT +CEH-+DFH) are kept to recognise it. (disassembly) |
| 52B4H ↳21172 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): One Drive: Check It, Read the Allocation Table, Count the Free Granules. The loop over the drives starts here with Register C = the drive. A drive that is not ready is passed over (541BH). The allocation table (sector 0 of the directory cylinder) is read into 4200H and its free granules counted: each cylinder's byte has a bit set for every granule in use, and the granules the cylinder lacks are set too. (disassembly) |
| 52B4H ↳21172 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 1 (AUTO): Take an Optional Drive Specification. When the text at Register Pair HL starts with a colon, the character after it is the drive number: it is stored at 52A2H (the operand of LD C at 52A1H), and the spaces after it are passed over. A digit that is not 0-7 gives error 20H. Without a colon nothing is taken, so the drive stays 0. (disassembly) |
| 52BEH ↳21182 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 11 (PURGE): The Walk through the Hash Index Table. The slots are taken a column at a time: 00H, 20H ... E0H are the eight records of directory sector 0, then 01H, 21H ... and so on (slot n is record n). Slots 00H and 01H (the system's own records) and free slots are passed over. BREAK ends the command with Purge aborted between two files. (disassembly) |
| 52BFH ↳21183 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 4 (LIB, CLS, TOF): Helper: Display Spaces. Displays Register B spaces through the ROM at 0033H. (disassembly) |
| 52C5H ↳21189 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 6 (FREE): Build and Show the Line of a Drive. 52C5H takes the drive from its operand (the drive of FREE :d), 52C7H from Register C. The granule allocation table is read into 4200H and the template at 5512H filled: the drive's digit, the free granules as kilobytes (5409H), the cylinders, the density (S, D, or H for a rigid drive) and the heads, the total size, the free and the total directory records (from the hash index table, read into 5600H), and the diskette's name and date from the table (42D0H-42DFH). Index Register IY is left at the drive's code table. (disassembly) |
| 52C6H ↳21190 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 6 (SPOOL): Read the Parameters. @PARAM reads the parameters into the operands that use them (table 57E3H: MEM, DISK, OFF, PAUSE, RESUME, CLEAR; or from 5803H for a spooler in memory). OFF, RESUME, PAUSE and CLEAR are tested in that order; each one given goes to its own routine. With none, the spooler is installed. (disassembly) |
| 52C6H ↳21190 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 4 (VERIFY, DEBUG): DEBUG and VERIFY Data: Messages and Parameter Tables. The two messages, then the parameter table of DEBUG; its last four entries (from 5329H) are the parameter table of VERIFY. Each entry is a keyword of six characters and the address where @PARAM stores the value. (disassembly) |
| 52C7H ↳21191 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 4 (LIB, CLS, TOF): LIB Data: the Heading. The heading of each pass; 5271H changes its letter for Library B. (disassembly) |
| 52C7H ↳21191 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 11 (LINK): The Link Module. 52C7H-52EFH (41 bytes) is copied to high memory by 52AEH and runs there as the first device's driver; its CALL and LD operands are absolute addresses outside the module (the old driver, the second device's block), stored by 5266H-5285H, so nothing in it needs moving. It starts with a module header: a JR over the header, the link word, the length 6 and the name LK with the two devices' letters. An input request (the CARRY FLAG) goes to the old driver and, when it gives 00H, to the second device with @GET. Any other request goes to the old driver, and Register A as that driver returned it is then given to the second device with @PUT; the old driver's result is returned. (disassembly) |
| 52CCH ↳21196 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 15 (RUN, LOAD): Load the Program. Sets SFLAG$ bit 2 (a program load: @OPEN lets an execute only file be opened) and loads CFCB$ with @LOAD; Register Pair HL returns the transfer address. A failure asks for the system diskette and reports the error. Then the exits. (disassembly) |
| 52CEH ↳21198 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 2 (TIME, DATE): TIME: Parameters, Set the Time. The text is searched for an opening bracket: when there is one, @PARAM (4476H) reads (CLOCK) or (CLOCK=N) into the operand at 5321H. Then the text is looked at from its start again: nothing shows the time (53E2H); a bracket alone goes to the clock (5320H); otherwise HH:MM or HH:MM:SS is read (hours 0-23, minutes and seconds 0-59) and stored in TIME$ (4041H-4043H: seconds, minutes, hours). (disassembly) |
| 52CFH ↳21199 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 1 (MEMORY): No HIGH: Show HIGH$, or Start the Directory. When HIGH$ is the top of memory (nothing is above it) the line High = X'nnnn' is all MEMORY shows. Otherwise the High Memory Directory follows: a blank line, the summary line with HIGH$ and the bytes above it, the column headings, and one line for each module or block above HIGH$. (disassembly) |
| 52D0H ↳21200 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 1 (AUTO): Read and Write the Granule Allocation Table. 52D0H reads sector 0 of the directory cylinder of drive Register C (the granule allocation table) into 4200H; 52E3H writes it back from 4200H with the deleted data mark that every directory sector carries and verifies it. Both return the Z FLAG on success; on failure 52D0H returns Register A = 14H (GAT read error) and 52E3H Register A = 15H (GAT write error), with the NZ FLAG. Register Pairs DE and HL are kept. (disassembly) |
| 52D1H ↳21201 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 3 (CREATE): FILL: Write Every Record. The FILL parameter is the operand at 52D2H-52D3H: 0100H in the file (not given). FILL=c stores the byte c in the low byte and 00H in the high byte; FILL alone stores FFFFH (records of FFH). Both 5500H-55FFH (the buffer) and 5600H-56FFH (the record @WRITE takes when the record length is below 256) are filled with the byte, and every record of the file is written. Without FILL the end of file is put back to what it was before (5301H), so the file keeps its space but not its records. (disassembly) |
| 52D2H ↳21202 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 10 (DUMP): Write the Memory. From START to END in blocks of at most 254 bytes: a load module puts a load block header (01H, the length plus 2, the address) in front of each block; ASCII writes the bytes alone. Then a load module ends with the transfer record (02H, 02H, TRA), an ASCII file with the ETX byte, and the file is closed. (disassembly) |
| 52D3H ↳21203 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 9 (RENAME): Keep the New Name as It Was Typed. When @FSPEC refuses the new name (such as /EXT or .PW), its text is copied into 53A4H: from the character @FSPEC stopped at, spaces skipped, small letters made capitals (any character from 61H up has 20H taken off), up to 32 characters, ending at 0DH or a bracket. (disassembly) |
| 52D5H ↳21205 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 9 (ATTRIB): I, V, ACC and OWNER. I and V take no value: they set or clear bit 3 (08H) in the operand at 5391H, the invisible bit to OR into the attribute byte, and bit 3 of the mask. ACC=password (refused on a drive that keeps the time in the record: File has no access password!) and OWNER=password (or UPDATE=password) are hashed through request E4H into 51F7H or 51F5H; they set bit 1 or bit 2 of the mask. (disassembly) |
| 52EBH ↳21227 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 6 (SPOOL): Install: Find the Device. An installed and running spooler (DFLAG$ bit 0) is not installed twice, and KI/DVR must be installed (DFLAG$ bit 4), since the queue is moved between memory and disk from the keyboard task. The device's control block is looked for by its two letters; a routed device (type bit 4) is followed to the control block it is routed to. When PR/FLT is installed (DFLAG$ bit 3) and its saved control block address equals the one found, the spooler is put behind the filter: it takes the filter's own control block copy. (disassembly) |
| 52EBH ↳21227 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 5 (SYSGEN): Write a Block of Memory as Load Blocks. Register Pair DE = the first byte, Register Pair BC = the number of bytes (not 0). The bytes are written to CONFIG/SYS as load blocks (type 01H, length = count + 2, address low, address high, the bytes) of at most 254 bytes each. (disassembly) |
| 52ECH ↳21228 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 8 (BUILD): Write the File. The bytes from 5600H up to Register Pair HL are written to the file one at a time through the ROM's @PUT (001BH), then the file is closed. A failure is reported through @ERROR. (disassembly) |
| 52F0H ↳21232 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 9 (RENAME): Complete the New Name from the Old. A new name that starts with something other than a letter gets the old name put in front; then a missing extension (after /) and a missing password (after .) are taken from the old name when it has them. The old name's characters are put in at the place in the new name text, the rest of it moved up. (disassembly) |
| 52F0H ↳21232 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 11 (LINK): Find a Device Control Block by Name. Register Pair DE holds the two letters (Register E the first). The blocks of 8 bytes are searched, their names at +06H-+07H: KI, DO and PR at 4015H-402CH, then 43C0H-43FFH. Returns the Z FLAG and Register Pair HL at the block, or the NZ FLAG and Register A = 08H (device not available). 5316H looks for a module by name through request BCH and returns its link word in Register Pair DE. (disassembly) |
| 52F8H ↳21240 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 12 (FORMS): Show the Settings. The template at 54A4H is filled from the work copy: ON over OFF for ADDLF, FFHARD and TAB; CHARS (or OFF), INDENT, LINES, MARGIN and PAGE as numbers (without the plus one when SLINE is on); and, when a translation is set (XLATE from and to differ), the two characters in hexadecimal on an extra line (the 0DH at 550CH becomes a line feed). The template is displayed as one text, its lines separated by line feeds. (disassembly) |
| 52FBH ↳21243 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 1 (AUTO): AUTO Data: Messages. The three messages, each ended by 0DH. The LD IX instructions at 5280H and 5284H hold the addresses of the first and the last. (disassembly) |
| 52FCH ↳21244 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): The $UP Module: Move the Date On at Midnight. Copied to high memory by 52E9H; the addresses in the comments are those of this member (the copy runs at HIGH$ + 1 and up). SYS0/SYS's clock task jumps to its first byte at midnight, with Register Pair HL = 4044H (the field after the hours): the day is counted up, the day of the week, the day of the year and the SVDAT cells follow, and at the end of a month (or a year) the month (and the year) move on. The day of the year is not set back at a new year, and February's 29 days are decided when the module is installed. (disassembly) |
| 5302H ↳21250 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 3 (KILL): Helpers: Clear Eight Bytes, Copy a Specification without Its Password. 5302H stores 00H in the eight bytes at Register Pair HL. 530AH copies the text at Register Pair HL to Register Pair DE up to a control character, leaving out a password (from a full stop up to the colon of the drive). (disassembly) |
| 5302H ↳21250 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 15 (RUN, LOAD): RUN and LOAD Data. The message, the two prompts (they start with 1DH 1EH, the cursor to the start of the line and the line erased, and end with 1DH 03H, so that 1EH can erase them again), the abort message, the parameter table (one entry of eight bytes and 00H) and the default extension. (disassembly) |
| 5303H ↳21251 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 13 (ROUTE): The Device's Control Block. 5303H finds the block named by the device's letters, or else a free block (whose name is 0000H): none is error 21H. A file the device is routed to is closed (5334H). Returns Register Pair HL = the block and Register Pair DE = the letters. 531CH routes the device to nothing (NIL). (disassembly) |
| 5308H ↳21256 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 1 (MEMORY): The Module Loop: One Line for Each Module above HIGH$. Register Pair HL = the address where the next module should start. A module in high memory begins with a header: 18H (a JR over the header), the jump's offset, the link word (the last address of the module), the length of the name and the name. For each module the line shows the name, its first and last address and its length in decimal; bytes that do not begin with a header are shown as <unknown> up to the next header (53A4H). The loop ends after the top of memory. (disassembly) |
| 5308H ↳21256 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): The Drive Line: Cylinders, Density, Sides, Total Space and Directory Size. Fills the drive line at 5AFBH: Drive :d, the diskette's name and date from the allocation table (42D0H, 42D8H), the cylinders and the density letter (S single, D double, H a rigid drive) with the sides or heads, Free=free/total in kilobytes and Fi=free/total directory records, and displays it. (disassembly) |
| 5309H ↳21257 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 8 (LIST): List the Text. Each character is taken with @GET and sent through 54C9H. NUM puts the line number (5 places, from LINE) in front of each line. Without ASCII8 bit 7 of each character is cleared. A tab goes to the next multiple of the TAB width. At the start of each line (and after a character with bit 7 set) BREAK and the pause are looked at. The end of the file (error 1CH or 1DH) ends the listing with ENTER; any other error is reported. (disassembly) |
| 5314H ↳21268 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): DO = : Run a Named File without Compiling. The equals control character runs a file as the compiled SYSTEM/JCL without a compile: the file specification after it is taken into JFCB$ at 4358H and the member jumps to the reopen and run (52C4H). (disassembly) |
| 5318H ↳21272 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 3 (CREATE): SHRINK and the Exit. The SHRINK parameter is the operand at 5319H-531AH: 0000H in the file, FFFFH when SHRINK is given. With SHRINK, 5333H turns the SET at 533EH into a RES, so that bit 7 of +01H of the directory record is cleared again: the next close of the file gives back the space beyond its end of file. (disassembly) |
| 531DH ↳21277 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 8 (BUILD): The Name of the File or Device. Register A = byte +00H of the control block: with bit 7 set (a file) @FNAME writes NAME/EXT:d at Register Pair DE from Register C (the drive) and Register B (the directory record); for a device the name is an asterisk and the two letters in Register C and Register B. The name ends with 03H. (disassembly) |
| 531FH ↳21279 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 3 (KILL): Helper: BREAK. Returns the Z FLAG when BREAK was not pressed (bit 0 of KFLAG$, 4423H, clear). When it was, the bit is cleared again and again until the key has been let go for a moment, the keyboard is read until no key is down, and the NZ FLAG returns. Every register is kept. (disassembly) |
| 5320H ↳21280 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 2 (TIME, DATE): TIME (CLOCK): Start or Stop the Clock Display. The CLOCK parameter is the operand at 5321H: 0001H when it was not given, FFFFH for CLOCK, 0000H for CLOCK=N. CLOCK puts SYS0/SYS's clock display task block (4D3AH) into task slot 6 through @ADTSK, so the time is written at the top right of the screen five times a second; CLOCK=N takes slot 6 out again through @RMTSK. (disassembly) |
| 5324H ↳21284 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 5 (SYSGEN): Write One Load Block from a Buffer. Register Pair HL = the bytes, Register Pair DE = the address they are to be loaded at, Register B = the count (1-254). Writes the type 01H, the length (count + 2), the address and the bytes to CONFIG/SYS. Register Pair DE comes back as 53EDH, the file control block. (disassembly) |
| 5326H ↳21286 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 11 (LINK): Errors and the Messages. 5326H reports the error in Register A through @ERROR. 532DH and the two entries below it are a chain of LD IX instructions whose DD prefixes make each entry but the one jumped to a dead load, so entering at 532DH, 5331H or 5335H loads Register Pair HL with one message. Each ends the command with Register Pair HL = FFFFH. (disassembly) |
| 5329H ↳21289 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 9 (ATTRIB): Passwords and Values. 5329H takes a password (54FBH: from a quoted value at Register Pair DE or typed after the prompt at Register Pair HL) and goes on into 532CH, which hashes the eight bytes at Register Pair DE through request E4H (SYS2/SYS): the hash comes back in Register Pair HL. 532FH copies a name (a letter, then letters or digits, at most eight) from Register Pair HL to Register Pair DE. 5349H passes over the rest of a keyword: at the end of the option it returns the Z FLAG; at an equals sign it reads the value (an optional quote) into 51E2H-51E9H, padded with spaces, and returns the NZ FLAG. (disassembly) |
| 532BH ↳21291 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): DO * : Run the Current SYSTEM/JCL File. The asterisk control character runs the SYSTEM/JCL file that a previous compile left: its file specification is copied to JFCB$ at 4358H and the member jumps to the reopen and run (52C4H). (disassembly) |
| 532EH ↳21294 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 11 (PURGE): The Name, the Date, the Line. The eleven characters of the record's name and extension (+05H-+0FH) are compared with the masks; then the record's date (5577H) with the range. The line name/ext:d is built at 5719H; with questions the MOD mark (+), an opening brace and the date as dd-Mmm-yy follow, and the answer is asked for after the closing brace and a question mark. (disassembly) |
| 5330H ↳21296 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): Helper: Copy the SYSTEM/JCL Specification. Copies the 32 bytes of the template at 5818H (SYSTEM/JCL, with the drive digit patched in at 5823H) to JFCB$ at 4358H. (disassembly) |
| 5330H ↳21296 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 8 (BUILD): One Hexadecimal Digit. Takes the character at Register Pair DE (and moves on): 0-9, A-F or a-f return its value in Register A. Any other character drops the return address and displays Bad hex digit encountered!, ending the command. (disassembly) |
| 5333H ↳21299 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 3 (CREATE): Mark the Directory Record. 5333H (SHRINK) changes the second byte of the bit instruction at 533EH from FEH (SET 7,(HL)) to BEH (RES 7,(HL)) and goes on into 5338H. 5338H reads directory record Register B of drive Register C, sets (or clears) bit 7 of its +01H, stores the record length (the operand at 5344H) in its +04H and writes the sector back. An error ends the command at 52F7H. (disassembly) |
| 533AH ↳21306 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 6 (SPOOL): Install: Make the Spool File. DISK (in K, 4 in the file) is the size of the spool file; DISK= with no value gives 0 and no file. The file is opened or made with records of 256 bytes, its last sector (DISK x 4 - 1) is written so that its space is taken, it is rewound and its end of file is set to its start, and bit 7 of byte +01H of its directory record is set so that the space is kept when the file is closed. (disassembly) |
| 533BH ↳21307 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 2 (TIME, DATE): DATE: The Day of the Year, the Day of the Week and the Display. Register A = the month (1-12) from 4046H. The day of the year is the day plus the days of the months before (523FH on, February 29 days in a leap year); it goes to 4047H and bit 0 of 4048H. The day of the week is (day of the year + y + (y + 3) / 4 + 1) mod 7 + 1, y the year less 1980 (1 for Sunday, 1 January 1980 a Tuesday); it goes to bits 3-1 of 4048H. Then the template at 545EH gets the day name, the month name, the day and the year, and the line is displayed. (disassembly) |
| 533CH ↳21308 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): The Parameter List: Tokens and Their Values. Each item in the brackets is a token of up to eight characters: a plain token is given the logical value true, token=value gives it a character string, and @label names the start the compile is to scan for. 5620H reads the token into 57DCH; a token that begins with @ sets 5343H, so it is kept as the label at 5805H; otherwise 56EAH checks it is not already defined (error Multiply defined parameter) and 56CDH stores it true. 562BH reads a value after =, and 56DFH stores it. (disassembly) |
| 533DH ↳21309 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 7 (COPY, APPEND): COPY: Open the Source and the Destination. The source is opened and its directory bytes +00H-+02H and +10H-+13H are kept (56CCH). The record length for the destination's directory record is the LRL parameter, or the source's own. 5466H records the date formats of the two drives (bit set in 475DH: the time and date layout with the time in +12H-+13H). For X the destination diskette is asked for, recognised by its GAT bytes, and refused when it is the source diskette. The destination is opened or made with @INIT; without X a destination that is the source's own directory record on the same drive is refused. (disassembly) |
| 5341H ↳21313 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 3 (KILL): Errors. 5341H reports the error number in Register A through @ERROR, which returns; 534CH displays File spec required. Both end the command with Register Pair HL = FFFFH. (disassembly) |
| 5341H ↳21313 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 11 (LINK): LINK Data. The three messages, each ended by 0DH, the name looked for, and the two control blocks. (disassembly) |
| 5342H ↳21314 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 10 (DUMP): Write One Byte; Errors. 5342H writes 02H, 5344H the byte in Register A, to the file at Register Pair DE through the ROM's @PUT (001BH). A failure is reported through @ERROR; 5352H displays File spec required! and 5355H any message at Register Pair HL. All end the command with Register Pair HL = FFFFH. (disassembly) |
| 5346H ↳21318 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 5 (SYSGEN): Delete: SYSGEN=OFF. Byte 01H of the drive's system information sector is set to C9H (no configuration file), the sector written back, and CONFIG/SYS.CCC:d killed. When the file is not there, No user configuration found is displayed (the sector has been changed all the same). (disassembly) |
| 534BH ↳21323 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 9 (RENAME): Errors and the Messages. 534BH reports error 20H (illegal drive number), 534DH the error in Register A, through @ERROR. 5354H and the two entries below it are a chain of LD IX instructions whose DD prefixes make each entry but the one jumped to a dead load, so entering at 5354H, 5358H or 535CH loads Register Pair HL with one message. Each ends the command with Register Pair HL = FFFFH. (disassembly) |
| 5354H ↳21332 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 3 (KILL): KILL Data: Messages. The two texts of the member. Deleting: runs on into the name that 523DH copies to 5371H (above the file), ended there by 0DH. (disassembly) |
| 5357H ↳21335 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 1 (MEMORY): Build the Summary Line and the Column Headings. Fills the line buffer at 5200H with High Memory Directory, HIGH$ = X'nnnn' and Length = ddddd (the bytes above HIGH$ up to the top of memory) and sends it; then copies the column headings line (55BAH) into the buffer for the caller to send. (disassembly) |
| 5358H ↳21336 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 3 (CREATE): CREATE Data: Parameter Table and Messages. Each entry of the parameter table is a keyword of six characters (padded with spaces) and the address where @PARAM stores its value: the operand of the instruction that uses it. The table ends with 00H. Then the three texts. (disassembly) |
| 535DH ↳21341 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 10 (DUMP): DUMP Data: Messages, Extensions and the Parameter Table. The three messages, the two default extensions, the parameter table (each keyword of six characters with the address of the operand that holds its value) and the text Dumping:, which the name at 5406H follows. (disassembly) |
| 5364H ↳21348 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 13 (SETCOM): The List Walker; the Factory Settings. 5364H calls each routine named in the list at 553CH (Index Register IY walks it) until the word 0000H, by pushing the return address 537AH and jumping. 5383H puts the factory settings into the four bytes: 00H (every input signal ignored), A5H (RTS off, DTR on, 7 bits, one stop bit, even parity), 55H (300 baud) and 00H (no break character). (disassembly) |
| 5365H ↳21349 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 10 (DEVICE): DEVICE: the Device Control Blocks. Each block of 8 bytes that is in use (type not 00H) gets a line: an asterisk and its name, the direction (less than sign for input, bit 0; greater than sign for output, bit 1), then what it points at: the driver address as X'nnnn', Nil for a block with nothing assigned (bit 3), or for a routed block (bit 4) the block it is routed to, followed as far as it goes, or the file it is routed to (an open file's control block, bit 7 of +00H) as <=> and its name. The blocks are KI, DO, PR (4015H-402CH), then 43C0H-43FFH. (disassembly) |
| 5366H ↳21350 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 5 (SYSGEN): The Exit. 5366H loads Register Pair HL with the Stack Pointer that 5200H stored in its operand, and 5369H loads the Stack Pointer with 0000H, the operand that nothing changes: the CALL at 536CH and the RETs below use the stack at 0000H, so their return address is read from 0000H-0001H, the first bytes of the ROM (F3H AFH). The error paths (538FH, 5396H, 539AH) come to 5369H with Register Pair HL = their own value. (disassembly) |
| 5368H ↳21352 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 9 (RENAME): RENAME Data. The three messages, each ended by 0DH, and the two control blocks. (disassembly) |
| 536AH ↳21354 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 8 (BUILD): BUILD Data: Messages, the Default Extension and the Parameter Table. The messages, the texts Building: and Appending: with the keyboard's device name (ended by 03H so that the name follows on the line), the extension JCL and the parameter table. (disassembly) |
| 536FH ↳21359 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): DATE and TIME: The Prompts at Boot. DATE=OFF and TIME=OFF store FFH in byte C2H or C3H of drive 0's system information sector, so that the boot does not ask for the date or the time; DATE=ON and TIME=ON store 00H, so that it asks. The sector is read and written through 5A61H and 5A6EH. (disassembly) |
| 5374H ↳21364 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 12 (RESET): Change a File's Directory Record. The file is opened; it must allow writing (access level 0-4, else error 25H). Its directory record is read: LRL= gives +04H a new record length, any DATE= gives +12H-+13H the value 4296H (the hash of a blank password, the older layout with no time). DATE=ON also sets bit 2 of the control block and closes the file, which stamps it with the date and time; the close reads the directory sector again, so the record is then written as the close left it. Then the sector at 4200H is written. (disassembly) |
| 5375H ↳21365 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 9 (ATTRIB): Change the Directory Record. The record of the file (byte +07H of the control block, drive +06H) is read with DIRRD. The mask at 5381H says what changes: bit 0 the protection level (bits 2-0 of +00H), bit 3 the invisible bit (bit 3 of +00H), bit 2 the owner password hash (+10H-+11H, from 51F5H), bit 1 the access password hash (+12H-+13H, from 51F7H). The sector is written back with DIRWR. (disassembly) |
| 537BH ↳21371 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 5 (SYSGEN): Read the System Information Sector; Write One Byte. 537BH reads cylinder 0, sector 2 of the drive (the operand at 5382H) into 4200H. 5389H writes 02H and 538BH the byte in Register A to the file at Register Pair DE through the ROM's @PUT (001BH). An error is reported through @ERROR (538FH) and ends the command at 5369H. (disassembly) |
| 537BH ↳21371 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 12 (FORMS): Helpers: ON, Numbers, the Lookup. 537BH copies ON (5484H) and 537EH the three bytes at Register Pair HL to Register Pair DE. 5384H writes Register A as three right justified decimal places at Register Pair DE (through the five places at 5526H, 539FH), keeping Register Pairs AF, BC and HL. 53B8H looks a module up by its name at Register Pair DE through request BCH. (disassembly) |
| 5384H ↳21380 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): Read Lines, Finding the Named Label. When a label was given (568EH), the source lines are read without being compiled until a line @label matches the wanted label (5805H): 549DH reads a line into 59D8H, and the lines are passed over until the match, the end of the included files popped on the way (Procedure not found when none match). Without a label, the compile starts at once (53BAH). (disassembly) |
| 538DH ↳21389 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 6 (SPOOL): Install: Lay Out the Spooler's Memory. MEM (in K, 1 in the file) is the memory buffer. HIGH$ less 8100H, divided by 4 and counted in K from its high byte only, must leave room for it. Below the top of the spooler's memory (HIGH$, or the top recorded at an earlier install) come, from the top down: MEM x 4 pages of 256 bytes ending at the page boundary at or below the top, a table of (MEM + DISK) x 4 + 1 slots of 4 bytes, the queue block of 44 bytes and the module of 016BH bytes. A memory slot is 00H 00H, the page, 00H; a disk slot is 00H 00H, the sector number low, the sector number high OR 80H; the last slot is 00H 00H FFH FFH. The first two bytes of a slot are 0000H for a free slot, else the address of the next slot of the queue, the last one pointing at itself. (disassembly) |
| 5390H ↳21392 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 13 (ROUTE): ROUTE Data. The two messages, each ended by 0DH, the parameter table @PARAM reads (5211H, 5234H: three entries of eight bytes, a keyword padded with spaces and the address of its value, then 00H), the module's header and the two control blocks. (disassembly) |
| 5394H ↳21396 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 13 (SETCOM): Change the Settings. 5219H is pushed first, so that every RET NZ, RET C or RET NC of a check ends the command with a parameter error; the last instruction takes it off again. BAUD must be one of the sixteen rates of the table at 551CH; WORD 5-8; STOP 1-2; PARITY (or PARITY=ON), PARITY=OFF, PARITY="ODD" or "EVEN", EVEN and ODD; BREAK (03H), BREAK=OFF (01H) or a character; DTR and RTS ON or OFF; RI, DSR, CD and CTS ON, OFF or not given (IGNORE is kept). The line byte is built in Register C and stored at +01H. (disassembly) |
| 5399H ↳21401 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 8 (LIST): List in Hexadecimal. From record REC on, each record of the record length (256 when it is 00H) is shown as lines of 16 bytes: the record number and the offset in hexadecimal (rrrr:oo = ), the bytes in hexadecimal, then the characters (a full stop for one below 20H or above 7EH). With C (on when any parameter is given) the bytes follow each other in groups of four and the characters are on the same line; with C off each byte is followed by a space, the groups are of eight and the characters are on a second line under the bytes. On the printer the characters follow on the same line. N or P puts a blank line after each record. (disassembly) |
| 539DH ↳21405 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): TRACE and BSTEP. TRACE=ON puts SYS0/SYS's task block 4D6AH into task slot 11, which shows the address the program is at in the top right of the screen on every tick; TRACE=OFF empties slot 11. BSTEP=n (0-3) stores the step rate the boot uses in bits 1-0 of byte +03H of drive 0's table in the system information sector (the block at 4220H after a boot through a driver, else 4270H); a larger value shows Boot step out of range. (disassembly) |
| 53A2H ↳21410 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 5 (SYSGEN): Pause and Resume a JCL Job. 53A2H keeps SFLAG$ (430FH) in the operand at 53D7H. When bit 5 is set (a JCL job runs) it clears it, copies the six bytes saved at 4065H-406AH (the @EXIT and @ABORT that were in force before the job) back to 402DH-4032H, puts the keyboard driver saved at 43BEH-43BFH (KIJCL$) back into the keyboard's device control block (keeping the job's driver at 53E6H) and sends the keyboard driver a control request. 53D6H undoes this when the kept SFLAG$ had bit 5 set: SFLAG$ back, the six bytes at 406BH-4070H (the job's own stubs, which SYS11/SYS copies from there too, its 4E33H) to 402DH-4032H, and the job's keyboard driver back to 4016H-4017H. (disassembly) |
| 53A4H ↳21412 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 1 (MEMORY): Bytes without a Header: Find the Next Module. Register Pair HL = the first byte above the last module, where no 18H header begins. The bytes from here are searched for an 18H that starts a believable header: its link word not below the byte before it, a name length below 16 and a name of printable characters 21H-7AH. The bytes up to that header (or up to the top of memory when none is found) get a line of their own named <unknown>. (disassembly) |
| 53B7H ↳21431 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): The Compile Loop: Read a Line and Compile It. 549DH reads the next source line into 59D8H; at the end of a file 52A5H pops an included file or finishes. A line is compiled (53C0H) into the buffer at 5200H and written (54CEH): each character is copied, # starts a parameter substitution, % a hexadecimal byte, // a directive, and a line that begins with @ ends the procedure. (disassembly) |
| 53BBH ↳21435 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 12 (FORMS): FORMS Data: The Parameter Table, the Cells, the Factory Values and the Texts. The parameter table (each keyword of six characters and the address of its cell), the cells @PARAM fills, the factory values that DEFAULT copies over them, the module name $FF, ON and OFF, the message, and the template of the display, whose lines end with line feeds. (disassembly) |
| 53C1H ↳21441 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 12 (RESET): Close a Routed File. Register Pair HL = a device control block. Its routes (type bit 4: +01H-+02H the next block) are followed; when the last is an open file's control block (bit 7 of +00H), it is copied to 54D6H and that copy is closed. Then the error exit, the refusal and the search for a block by name (as in 55F1H of SPOOL). (disassembly) |
| 53C5H ↳21445 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 9 (ATTRIB): A Diskette: NAME, PW, LOCK and UNLOCK. Without a file specification the drive comes from :d (drive 0 when not given) and the parameters are read by @PARAM (table 568DH). Without NAME, PW, LOCK or UNLOCK ATTRIB shows -Nothing done-. The diskette's granule allocation table is read into 5800H and its master password checked (54CBH). NAME=name or NAME (asked) puts a new name at 58D0H; PW=password or PW (asked) a new master password hash at 58CEH; the table is written back. LOCK gives every visible file without a password the master password; UNLOCK takes it off every file that has it. (disassembly) |
| 53C6H ↳21446 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 6 (FREE): The Page: Count the Lines, Pause and Start Again. 53C6H is reached after a line has been shown on the screen without P. The operand at 53C7H counts the lines left on a page (15). When it runs out it is set to 15 again and, unless a JCL job runs, the program waits for a key (0049H), clears the screen and shows the drive's line and a line of dashes again (53DBH) before the next line of the map. (disassembly) |
| 53DCH ↳21468 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 7 (COPY, APPEND): Copy Whole Sectors through Memory. The source is read sector by sector into 5B00H and the pages above it, up to the highest page 54B8H set, then the pages are written to the destination; this goes on until the source reports the end of the file (error 1CH or 1DH). Then the pages read last are written, the destination's control block takes the source's end of file byte, and it is closed. For X each batch asks for the source and then the destination diskette. (disassembly) |
| 53DDH ↳21469 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): BLINK: The Blinking Cursor Module. BLINK=OFF takes task slot 5 out and gives the memory of the module $BL back when it is the lowest in high memory. BLINK (or BLINK=ON, or BLINK=c) is allowed only at LDOS command level (5AF7H): the cursor character is c, or 88H with SMALL, 8FH with LARGE, B0H otherwise; it is stored into three places of the module (5469H-54B3H, 75 bytes), which is copied below HIGH$ (or over the one already there) and put into task slot 5. (disassembly) |
| 53DEH ↳21470 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): The Next Directory Record and the End of the Drive. The slots of the hash index table are taken in the order 00H, 20H, 40H ... E0H, 01H, 21H ...: slot n is record (n AND E0H)/32 of directory sector (n AND 1FH) + 2, so the eight records of one sector are done before the next sector is read. After the last slot the sorted records are shown, the line is ended, and the next drive follows unless a drive was given. (disassembly) |
| 53E2H ↳21474 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 2 (TIME, DATE): TIME: Show the Time. @TIME writes the time as HH:MM:SS in the eight bytes 5467H-546EH of the template, which the 0DH at 546FH ends; 53DBH then displays it. (disassembly) |
| 53EBH ↳21483 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 2 (TIME, DATE): Copy Name Number B from a Table of Three Letter Names. Register Pair HL = the table, Register B = the name number (1 for the first), Register Pair DE = the destination. The three letters of the name at HL + 3 x (B - 1) are copied to DE, which comes back after them. The tables do not cross a page, so only Register L is added to. (disassembly) |
| 53EDH ↳21485 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 5 (SYSGEN): SYSGEN Data: The File Control Block, Messages and the Table of Cells. The file control block of CONFIG/SYS (32 bytes, only its first 17 in the file), the messages, the Attrib command, the banner and its blank, and the table of resident cells that 5284H saves into the file. (disassembly) |
| 53F5H ↳21493 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 6 (FREE): Show a Line, Then Print It or Count It. 53F5H shows the line buffer, 53F8H the text at Register Pair HL (ended by 03H) on the video through @DSPLY. With P (FFFFH at 53FCH) the same text and an ENTER go to the printer; without P the line is counted on the page (53C6H). (disassembly) |
| 53FAH ↳21498 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 2 (TIME, DATE): Read Three Fields of Two Digits. Reads up to three fields from the text at Register Pair HL, each of exactly two digits, into 52CDH, 52CCH and 52CBH (the first typed at 52CDH). Between two fields one character is taken: a colon, or any character below the value of Register C (30H: a slash, a space, a dash or a period). ENTER after the second field is accepted only when the operand at 5417H is 00H (TIME, 52F9H); then the third field keeps its value. Returns the Z FLAG with Register B = 00H and Register Pair DE = 52CBH when the fields were read, else the NZ FLAG. (disassembly) |
| 53FFH ↳21503 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 1 (MEMORY): Helper: Write X'nnnn' into the Line. Register Pair HL = the value, Register Pair DE = where in the line buffer. The four hexadecimal digits go into the template X' ' at 55FDH-5603H and the seven characters are copied to Register Pair DE. (disassembly) |
| 5409H ↳21513 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 6 (FREE): Granules to Kilobytes. Register Pair DE = a number of granules, Register Pair HL = where to write. The granules times the sectors in a granule (the operand at 540EH) give the sectors; a quarter of them are the kilobytes, written in five places; the two bits left over give the digit of the tenths in Register A: 0, 2, 5 or 8. (disassembly) |
| 540AH ↳21514 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): Helper: A Hexadecimal Digit to Its Value. Register Pair HL = the digit character. Returns Register A = the value 0-15, or jumps to 545AH (Invalid JCL format) for a character that is not a hexadecimal digit. Small letters are folded to capitals. (disassembly) |
| 5411H ↳21521 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 1 (MEMORY): Helper: Write a Number in Decimal. Register Pair HL = the number (0-65535), Register Pair DE = the first of five places. The places are filled with spaces, then the digits are written from the right, dividing by ten (@DIV) until the number is 0. Returns Register Pair DE after the five places. (disassembly) |
| 5416H ↳21526 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 12 (RESET): DFLAG$ and the Templates. 5416H clears DFLAG$ bit 3 (PR/FLT). 541CH keeps only bits 7, 3 and 0 of DFLAG$ (the keyboard options off) and empties task slot 10. Then the screen codes and the device control blocks as the boot makes them. (disassembly) |
| 541BH ↳21531 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): A Drive That Is Not Ready. @CKDRV found no diskette. When the drive was asked for, error 20H (illegal drive number) is reported; when every drive is being shown it is passed over. When the last drive (7) is not ready, the RET at 542CH ends the command at once: the stack is back at its entry depth, and Register Pair HL is what @CKDRV left, not 0000H. (disassembly) |
| 541BH ↳21531 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): Substitute a Parameter Value. A #name# field: 5620H reads the name, which must be followed by a hash. The token is looked up (56EAH) and, when it has a value string (its length byte at +08H not 00H), the string is copied into the compiled line. A token that is not defined or has no value string is left as the literal #name# in the line; a name not followed by a hash is Invalid JCL format. (disassembly) |
| 541BH ↳21531 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 10 (DEVICE): Numbers and Names for the Lines. 541BH writes Register Pair HL (below 1000) at Register Pair DE as three places, leading zeros as spaces; 542FH writes one place for the power of ten in Register Pair BC, Register A being the character for a zero (a space until a digit has been written, then 0). 544AH puts an asterisk and the two letter name of the block at Register Pair HL at Register Pair DE. (disassembly) |
| 541FH ↳21535 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 2 (TIME, DATE): Read Two Decimal Digits. Reads two characters at Register Pair HL; both must be digits. Returns Register A = their value (0-99) with the Z FLAG, or the NZ FLAG when either is not a digit. Register Pair HL comes back after the characters read; Register E is changed. (disassembly) |
| 542AH ↳21546 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 1 (MEMORY): Helper: Send the Line, Blank It and Count It against the Page. Sends the line buffer at 5200H to the printer when PRINT was given and to the video, fills its first 57 bytes with spaces again (5239H keeps the 0DH) and counts the line. After 15 lines it waits for a key: BREAK ends the command, any other key clears the screen and starts a new page with the column headings. (disassembly) |
| 542DH ↳21549 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): Read a Directory Record and Decide Whether It Is Shown. Register Pair HL = the slot's hash byte at 5C00H-5CFFH. A slot with a hash is read with DIRRD (the sector is read only when it is not the one already at 4200H, 5439H). A record is passed over when it is not in use or is an extension record; a system file needs S, an invisible file I; MOD shows only files whose mod flag is set; the name must match the partspec (or must not, after a minus sign); DATE keeps the files whose date lies in the range. A file that passes is shown at once (5509H) or, with SORT, copied to the sort buffer with its size. (disassembly) |
| 5435H ↳21557 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 6 (FREE): Write a Number in Decimal. Register Pair HL = the number, Register Pair DE = where to write. 543DH writes five places, 5439H three (hundreds, tens, units) and 5435H two; leading zeros become spaces, the units are always a digit. Register A carries the character for a zero place from one call of 545DH to the next: a space until the first digit that is not 0, then 30H. No code of the member calls 5435H. (disassembly) |
| 543CH ↳21564 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 2 (TIME, DATE): Write a Number in Decimal, Right Justified. Register Pair HL = the number, Register Pair DE = the first of five places. The five places are filled with spaces, then the digits are written from the last place backwards until the number is 0. Register Pair DE comes back after the five places; Register Pair HL is 0000H. (disassembly) |
| 544EH ↳21582 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): Directives: the Nesting Check and the Error Line. 544EH returns when the condition stack at 59A8H holds at least one //IF (its top below the base 59AAH), so that //ELSE and //END have an open block; otherwise it falls into 545AH. 545AH builds the error line Line nnnnn --> Invalid JCL format, processing aborted! from the line number (545EH) and ends the command. (disassembly) |
| 5455H ↳21589 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 2 (TIME, DATE): DATE and TIME Data: Parameter Table, Template and Messages. The parameter table of TIME (one keyword), the line that DATE and TIME fill and display, and the two messages. (disassembly) |
| 545AH ↳21594 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 10 (DEVICE): DEVICE: the Options and the System Modules. Options: is followed by the options that are on, separated by commas: Smooth (46FDH not 00H, the patch point of the disk driver), the name of each set bit of DFLAG$ (bit 0 Spool, 1 Type, 2 JKL, 3 PR, 4 KI, 5 MiniDOS, 6 KSM, 7 Graphic), Fast or Slow (SFLAG$ bit 3), and , Verify when the @WRITE vector (4439H) goes to 48E6H, the write with verify. Then, when the word at 4BDFH (the operand of the overlay loader's CALL in the supervisor dispatcher) is not 4BF5H, System modules resident: and the number of each system file whose entry in the table 1FH below that address is not 00H. (disassembly) |
| 545CH ↳21596 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 9 (ATTRIB): LOCK and UNLOCK: Every File. The hash index table at 5900H is walked a column at a time: the slots 00H, 20H ... E0H of a column are the eight records of one directory sector (slot n is record n). Each slot in use (not 00H, and not one of the system files' slots 00H-07H and 20H-27H) has its record read with DIRRD (once per sector, the sector number kept at 546DH). A record whose attributes are those of a visible file in use (bits 7-3 = 00010) and whose password hash (+10H-+11H) is the one looked for gets the new hash. After each column the sector is written back with DIRWR. (disassembly) |
| 545DH ↳21597 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 12 (RESET): RESET Data: the Parameter Table, Messages and Control Blocks. The table @PARAM reads (5225H): four entries of eight bytes, a keyword of six characters padded with spaces and the address where its value is stored, then 00H; the two messages; the two control blocks above the member. (disassembly) |
| 545FH ↳21599 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 1 (MEMORY): GO and the Exit. GO=address is carried out last of all: the member jumps to the address with the stack as the command was entered, so the code there can return to LDOS with a RET. Without GO the member ends with Register Pair HL = 0000H (done). The error paths come in at 546BH with Register Pair HL = FFFFH: the stack is put back, and when a JCL job runs (bit 5 of 430FH) the job is ended through @ABORT. (disassembly) |
| 5469H ↳21609 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): The $BL Module: The Blinking Cursor Task. Copied to high memory by 544DH; the addresses in the comments are those of this member. The module's task block is at its +08H; SYS0/SYS runs the task in slot 5 five times a second with Index Register IX at the block. The task works through @RPTSK (4416H): each call ends the run and the next run goes on after the call. One run puts the cursor character over the character at the cursor (DODCB$ +03H-+04H, 4020H-4021H) and keeps the place and the character in the block (+02H-+04H); the next run puts the character back, looking up the screen 64 bytes at a time when the screen has scrolled. Nothing is done while the cursor is off (4022H holds 00H). (disassembly) |
| 546EH ↳21614 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 11 (PURGE): Delete the File. Purging: and the file's name are shown and logged, then a control block is made at 577DH, above the member, as for an open file: +00H 80H (open), +01H 01H (access KILL), +06H the drive and +07H the directory record. @KILL deletes the file; the directory sector at 4200H is then read again (52FDH = FFH). BREAK pressed before the deletion ends the command with Purge aborted. (disassembly) |
| 546FH ↳21615 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): A Directive Line: // Dispatch. The name after the two slashes is read (5620H into 57DCH). The conditional directives IF, ELSE and END (table 54FAH) are tried first and run even inside a block being skipped; the other directives SET, RESET, ASSIGN, INCLUDE and QUIT (table 5510H) run only when the block is not being skipped. A // with no name, or an unknown directive, is copied to the compiled line as a comment. (disassembly) |
| 5478H ↳21624 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 6 (FREE): The Map: Characters for One Cylinder. 5478H writes Register A characters at Index Register IX, one for each granule of the cylinder whose allocation table byte is at Register Pair HL: x for a bit set (in use), a period for a bit clear. Then, on a floppy drive (bit 3 of +03H clear), an asterisk replaces the character of each granule whose bit is set in the lock out table (the byte at HL + 60H). The table bytes are rotated in place. 54A9H writes Register A characters D for the directory cylinder. Both leave Index Register IX after the characters; Register Pairs BC and HL are kept. (disassembly) |
| 547AH ↳21626 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 1 (MEMORY): Check for LDOS Command Level. Returns only when the command may change memory: @EXIT (402DH) is not taken over by a running program (a JP there) and the command did not come from a program through SYS1/SYS's function 20H (bit 1 of 4758H). Otherwise displays Can't -- Only valid at LDOS command level and ends the command. While a JCL job runs, SYS11/SYS keeps the original bytes of 402DH at 4065H, so those are tested instead. (disassembly) |
| 5488H ↳21640 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 6 (SPOOL): Install: Move the Module and Start It. The module's addresses are made to point at its place in high memory, the module is copied there, 4DF0H-4DF1H gets its parameter block, the device's control block gets the module as its driver, the despooler is put into task slot 9, @KITSK is made a jump into the module, and DFLAG$ bit 0 and KFLAG$ bit 4 are set. (disassembly) |
| 5498H ↳21656 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 7 (COPY, APPEND): Write the Last Pages. Register H is the page where the read of the source stopped. The pages 5B00H up to it are written to the destination; none when it is 5BH. (disassembly) |
| 5498H ↳21656 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 13 (SETCOM): Helpers: A Signal, a Bit Field, Capitals, the Baud Table, Numbers. 5498H sets the two bits of one input signal (Register C the low bit, the high bit four places up) from Register Pair HL: not given leaves them, OFF sets both, ON only the low bit. 54B3H puts the bits of Register A under the mask Register B into Register C. 54BCH makes a small letter in Register A a capital. 54C5H finds the rate in Register Pair DE in the baud table. 54E4H writes Register Pair HL in five decimal places at Register Pair DE. 54FDH looks a module up through request BCH. (disassembly) |
| 549DH ↳21661 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): Read One Source Line into 59D8H. Counts the line at 545EH and reads up to 64 characters from the source file (ROM 0013H, @GET) into 59D8H, ended by 0DH, returning the Z FLAG. The end of the file (error 1CH), and a byte of 00H, return the NZ FLAG with Register A = 1CH (54CAH); a line of 64 characters without 0DH ends the command with Line too long!. (disassembly) |
| 54A0H ↳21664 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 1 (MEMORY): Parameter Error. @PARAM rejected the parameters, or BYTE was given a value above 255: error 2CH (parameter error) is reported through @ERROR, which returns, and the command ends with Register Pair HL = FFFFH. (disassembly) |
| 54A8H ↳21672 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 8 (LIST): Send a Character and Count the Page. 54A8H sends a space, 54ACH a byte as a character (a full stop below 20H or from 7FH up), 54B8H a byte as two hexadecimal digits. 54C9H sends Register A to the device of the listing (@PUT) and keeps the column (563BH, 0-63); 03H, 0AH and 0DH put it back to 0. At column 0 on the screen the page is counted: in hexadecimal ENTER is sent first (5520H). When a page is full the listing waits for a key: BREAK ends it, C goes on without stopping, any other key clears the screen (hexadecimal) and lists the next page. 54C9H keeps Register Pair HL, and Register A except at the start of a line. (disassembly) |
| 54A9H ↳21673 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 1 (MEMORY): MEMORY Data: the Header of a Reserved Block. The ten bytes HIGH writes below the memory it reserves (52CBH): the module header that MEMORY's own directory, and the other programs that walk the module chain from HIGH$, read. The link word and the four characters of the name are filled in before the copy. (disassembly) |
| 54ACH ↳21676 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 11 (PURGE): The Master Password. The drive's allocation table is read into 5900H. When its master password (CEH-CFH) is the hash of PASSWORD (42E0H) nothing is asked. Otherwise the password (MPW=, or typed after Master password ?) must hash to the table's or to 113DH (the hash of the master override password RS0LT0FF); else Invalid master password ends the command. During a JCL job without MPW nothing is asked and nothing is checked (54C7H). (disassembly) |
| 54B3H ↳21683 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 1 (MEMORY): MEMORY Data: Messages. The two messages of the member, each ended by 0DH, displayed by 5498H. (disassembly) |
| 54B4H ↳21684 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): TYPE: Type Ahead. TYPE=OFF clears bit 1 of DFLAG$ (441FH). TYPE=ON needs KI/DVR (bit 4 of DFLAG$, else TYPE requires KI to be active) and its type ahead buffer (the word at 4DF2H not 0000H, else Type-ahead not resident); then bit 1 is set. The test meant to find type ahead already on reads bit 1 of the message text at 5C3DH, whose bit is clear, so it never finds it. (disassembly) |
| 54B5H ↳21685 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 6 (FREE): The Map: The Label of the Next Line. Register C = the last cylinder shown. The label of the next line is written at 555AH: the first cylinder (C + 1) in three places, then, unless it is the highest cylinder, a dash and the last cylinder of the line (up to five more, not past the highest). Register Pairs BC and DE are kept. (disassembly) |
| 54B8H ↳21688 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 7 (COPY, APPEND): Set the Highest Page and Clear the Keys. For a command typed at LDOS command level the buffer may reach the page below the one that holds HIGH$ + 1; for a command a program passed through 4451H (bit 1 of 4758H) it stays 5B00H-5FFFH, below 6000H, since the program's memory is above. The page goes into the three compares of the copy loops. Then the BREAK, pause and ENTER bits of KFLAG$ are cleared (57B0H). (disassembly) |
| 54CBH ↳21707 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 9 (ATTRIB): The Allocation Table and the Master Password. Reads the granule allocation table of the drive into 5800H. When its master password (CEH-CFH) is the hash of PASSWORD (42E0H) nothing is asked. Otherwise the password (MPW=, or typed after Master password ?) must hash to the table's, or to 113DH (the hash of the master override password RS0LT0FF); else Invalid master password! ends the command. (disassembly) |
| 54CEH ↳21710 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): Write the Compiled Line to SYSTEM/JCL. When the top of the condition stack (59A8H) holds a skip state, nothing is written. Otherwise the compiled line at 5200H is written to the SYSTEM/JCL file through the ROM (001BH, @PUT), up to its 0DH. A line that begins with two slashes and a full stop (//.) is displayed with @DSPLY instead of written. (disassembly) |
| 54D4H ↳21716 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 7 (COPY, APPEND): Give the Destination Its Space. Register Pair BC = the sectors the destination is to have. The destination is positioned to its sector BC - 1 and a sector of E5H bytes is written there, so that the space is allocated before the copy starts. (disassembly) |
| 54E1H ↳21729 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 6 (FREE): Read the Granule Allocation Table (Not Called). Reads sector 0 of the directory cylinder of drive Register C into 4200H; returns the Z FLAG, or Register A = 14H (GAT read error) with the NZ FLAG. No code of the member calls it: 52D1H-52D9H read the table themselves. (disassembly) |
| 54E6H ↳21734 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 11 (PURGE): Get Eight Characters. Register Pair DE = the MPW parameter (0000H not given, FFFFH alone, else the address of the quoted value), Register Pair HL = the prompt. A quoted value is copied to 5800H up to ENTER, a comma or a quote; otherwise, unless a JCL job runs (then the NZ FLAG is returned), the prompt is displayed and up to eight characters are typed, BREAK ending the command with Purge aborted. The eight places are padded with spaces and small letters made capitals. Returns Register Pair DE = 5800H and the Z FLAG. (disassembly) |
| 54E9H ↳21737 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 1 (MEMORY): MEMORY Data: the Parameter Table. The table @PARAM reads (5204H): fourteen entries of eight bytes, a keyword of six characters padded with spaces and the address where its value is stored, then 00H. Each address is the operand of an instruction that uses the value; the short form of each keyword names the same address. (disassembly) |
| 54F1H ↳21745 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): SMOOTH and GRAPHIC. SMOOTH=ON stores F3H (DI) and SMOOTH=OFF 00H (NOP) at 46FDH, the byte the floppy driver calls before a transfer. GRAPHIC=ON sets and GRAPHIC=OFF clears bit 7 of DFLAG$. (disassembly) |
| 54F4H ↳21748 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 7 (COPY, APPEND): COPY with a Device: Open Both Ends. When the source or the destination is a device, both are opened (a device opens as a device), the destination made with @INIT with the record length of LRL (or 256) when it is a file, and the copy goes byte by byte. (disassembly) |
| 54F4H ↳21748 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 6 (FREE): Errors and the Exit. 54F4H reports error 2CH, 54F6H the error in Register A, through @ERROR; 5500H is the end of a command carried out. (disassembly) |
| 54FAH ↳21754 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): DO Data: the Conditional Directive Table. The three directives that run even inside a block being skipped: a six character name padded with spaces and the two byte address of the handler, ended by 00H. Searched by 56FBH. (disassembly) |
| 54FBH ↳21755 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 9 (ATTRIB): Get Eight Characters. Register Pair DE = a parameter (0000H not given, FFFFH given alone, else the address of its quoted value), Register Pair HL = a prompt. A quoted value is copied to 5700H up to ENTER, a comma or a quote; otherwise the prompt is displayed (not during a JCL job) and up to eight characters are typed there, BREAK ending the command with ATTRIB aborted!. The eight places are padded with spaces and small letters made capitals. Returns Register Pair DE = 5700H. (disassembly) |
| 5500H ↳21760 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 13 (SETCOM): SETCOM Data: The Name, the Message, the Baud Rates, the Display List, the Texts and the Parameter Table. The module name $CL, the message for a missing driver, the sixteen baud rates (index 0-15, the value kept in both halves of the baud byte), the list of the display routines walked by 5364H, the texts of the display (each ended by 03H so that the line goes on), and the parameter table of @PARAM (each keyword of six characters and the address of its cell, the operand of an instruction in the code). (disassembly) |
| 5509H ↳21769 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): Show One File: Name, Extension and Attributes. Register Pair HL = any byte of the file's directory record. The name and /extension take 13 columns, then five attribute characters: S (system), I (invisible), P (a password with an access level below full), * (bit 5 of the attribute byte: a partitioned data set) and + (the mod flag), each - when off, and a space. With the full display (A, the default) the detail follows (55C5H) and the line ends; in the short display (A=N) three files share a line. (disassembly) |
| 550FH ↳21775 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 6 (SPOOL): PAUSE and RESUME. Both need the spooler installed and on (DFLAG$ bit 0). PAUSE clears KFLAG$ bit 4, so the despool task sends nothing while characters are still queued; RESUME sets it again. Each says whether the bit was already as asked. (disassembly) |
| 5510H ↳21776 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): DO Data: the Other Directive Table. The directives that run only when the block is compiled: an eight character name padded with spaces and the two byte address of the handler, ended by 00H. Searched by 5704H. (disassembly) |
| 5512H ↳21778 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 6 (FREE): FREE Data: The Line Template, the Map Label, the Line Buffer and the Parameter Table. The line of a drive is built over the template at 5512H-5552H; the map's lines in the buffer at 555AH-5599H, which the file does not load. (disassembly) |
| 5517H ↳21783 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): ALIVE: The Alive Indicator Module. ALIVE=ON puts the module $AL (5579H-5591H, 25 bytes) below HIGH$ (or uses the one already there) and its task block into task slot 3: five times a second it changes the character at the top right of the screen (3C3FH) between the graphics characters 86H and 89H. ALIVE=OFF empties slot 3 and gives the memory back when the module is the lowest in high memory. (disassembly) |
| 5519H ↳21785 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 7 (COPY, APPEND): Copy Byte by Byte. Each byte is taken from the source with @GET (0013H) and given to the destination with @PUT (001BH). A file source ends at its end of file (error 1CH); a device source ends with BREAK (01H), and gives 00H while it has no character. ECHO shows each byte of a device on the screen. BREAK or a pause (SHIFT @) are looked at after each byte (56E9H). The end closes the destination (547AH). (disassembly) |
| 5525H ↳21797 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 8 (LIST): BREAK and the Pause. During a JCL job nothing is looked at. BREAK (KFLAG$ bit 0) sends ENTER and ends the command with Register Pair HL = FFFFH. A pause (bit 1, SHIFT @) waits for BREAK or another key than SHIFT @. 5548H clears bits 2-0 of KFLAG$ and returns the Z FLAG. (disassembly) |
| 5528H ↳21800 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 10 (DEVICE): Show and Print. 5528H shows the text at Register Pair HL (@DSPLY) and prints it too (@PRINT) when P is on; 5533H a comma and 5535H the character in Register A, on the screen and, with P, the printer. 5542H ends a line: ENTER, then unless the display runs without stopping (P) a page of 14 lines waits for a key (BREAK ends the command, any other clears the screen), then BREAK and the pause are looked at (5569H), unless BREAK is disabled (SFLAG$ bit 4). (disassembly) |
| 5539H ↳21817 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 6 (SPOOL): OFF: Turn the Spooler Off. The spooler is taken out of DFLAG$, the sending stops, @KITSK gets back the three bytes saved in the module, and task slot 9 is emptied. When HIGH$ is still the one the install left, the memory is given back (HIGH$ = the top) and 4DF0H-4DF1H is cleared; otherwise the spooler stays in memory to be turned on again in the same place. Then the device is reset by running the command RESET with its name through 4451H, which ends the member. The spool file is not closed here. (disassembly) |
| 553FH ↳21823 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 11 (PURGE): Helpers: The Allocation Table, the JCL Test, the Masks, a Record's Date. 553FH reads sector 0 of the directory cylinder of drive Register C into 5900H (Register A = 14H on failure). 5552H returns the NZ FLAG while a JCL job runs. 5558H copies up to Register B characters of a partspec from Register Pair HL into a mask at Register Pair DE ($, letters and digits; small letters made capitals). 5577H packs a record's date from +01H (Register Pair HL) into Register Pair DE as year x 800H + month x 80H + day x 4: the year from +13H (bits 4-0, less 1980) on a drive whose bit in 475DH is set, else bits 2-0 of +02H. (disassembly) |
| 5543H ↳21827 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): IF: Evaluate the Condition and Push the Block State. The expression after //IF is tokens joined by the operators & (and) and + (or); a token is true when it is defined (set on the DO line, by //SET or by //ASSIGN), and a leading - means not. 557FH evaluates a term of tokens joined by & and returns the Z FLAG for a true term; + starts another term. When a false token is followed by &, the rest of the line is passed over, so the terms after it are not evaluated. The result (00H compile for a true term, FFH skip) is pushed onto the condition stack at 59A8H ORed with the state below it, so a block inside a skipped block is skipped too. (disassembly) |
| 554EH ↳21838 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 9 (ATTRIB): Read or Write the Allocation Table at 5800H. One routine with two entries: 554EH is OR AFH, which leaves the NZ FLAG (read); 554FH is the AFH alone, XOR A, which leaves the Z FLAG (write). Sector 0 of the directory cylinder of drive Register C is read into 5800H (error 14H) or written from it with the deleted data mark and verified (error 15H). Register Pairs DE and HL are kept. (disassembly) |
| 5559H ↳21849 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 8 (LIST): The Line Number. 5559H writes Register Pair HL in decimal into the five places at Register Pair DE, spaces in front. 5572H counts the decimal number whose last digit is 4 places after Register Pair HL up by one (a space counts as 0); 5573H the one whose last digit is 3 places after it. (disassembly) |
| 555AH ↳21850 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 1 (MEMORY): MEMORY Data: the High Line and the ADD Line. The line shown when nothing is above HIGH$ (52E1H), and the template of the ADD line, whose digits are filled in by 5244H-527EH and whose end (5583H or 558EH) is chosen by 5289H. (disassembly) |
| 5564H ↳21860 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 7 (COPY, APPEND): Keep a Destination as It Was Typed. When @FSPEC refuses the destination (a drive alone, /EXT, .PASSWORD), its text is copied into 59DAH as it was typed: from the character @FSPEC stopped at (the one before Register Pair HL), spaces skipped first, small letters made capitals, up to 32 characters, ending at 0DH or a bracket, with 0DH stored after it. 558EH completes it from the source. (disassembly) |
| 556BH ↳21867 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): ELSE: Flip the Block State. Reverses the top of the condition stack, unless an enclosing block is skipped. 544EH makes sure a block is open and returns Register Pair HL at the top state byte. The byte is complemented (compile becomes skip and the other way about) and ORed with the state below it, so an ELSE inside a skipped block stays skipped. (disassembly) |
| 5572H ↳21874 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 9 (ATTRIB): Not during a JCL Job; the Messages. 5572H returns only when no JCL job runs (bit 5 of SFLAG$); otherwise it displays Invalid command during DO processing! and ends the command. 5578H-558FH is a chain of LD IX instructions: each entry after the first is the LD HL hidden after the DDH prefix, so a jump into the chain picks one message for @LOGOT. (disassembly) |
| 5576H ↳21878 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): END: Pop the Block. 544EH makes sure a block is open and returns Register Pair HL at the top state byte; the stack pointer is lowered by one to drop it. (disassembly) |
| 5579H ↳21881 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): The $AL Module: The Alive Indicator. Copied to high memory by 556AH; the addresses in the comments are those of this member. Its task block (+08H) names the routine at +0AH, which SYS0/SYS runs in slot 3 five times a second. (disassembly) |
| 557FH ↳21887 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): Evaluate a Term of the Condition. A term is one or more tokens joined by & (and): 5589H evaluates one token (with a leading - for not) and returns the NZ FLAG when it is false. A false token makes the whole term false at once; otherwise & joins the next token. Returns the Z FLAG for a true term and Register A = the character after it. (disassembly) |
| 5583H ↳21891 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 8 (LIST): Errors and the Exit. 5583H reports error 2CH (parameter error), 5585H the error in Register A, through @ERROR; 558CH displays File spec required!. Each ends the command with Register Pair HL = FFFFH. (disassembly) |
| 5589H ↳21897 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): Evaluate One Token. A leading - means not. 5598H reads the token (5620H) and looks it up (56EAH): the Z FLAG when it is defined (true), the NZ FLAG when it is not. After a minus sign the result is turned round with the OR AFH at 5594H, whose AFH is entered as XOR A. Register A returns the character after the token. (disassembly) |
| 558EH ↳21902 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 7 (COPY, APPEND): Complete the Destination from the Source. A destination that is missing, or starts with a digit, is refused (Destination spec required). A destination that starts with something other than a letter (/EXT, .PW, :d) gets the source's name put in front of it; then a missing extension (after /) and a missing password (after .) are taken from the source when it has them. The source's characters are put in at the place in the destination text, the rest of it moved up. (disassembly) |
| 558FH ↳21903 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 1 (MEMORY): MEMORY Data: the Directory Texts. The texts of the High Memory Directory: the summary line's parts (5357H), the column headings (5398H), the name of a block with no header (53E8H) and the template of a hexadecimal address (53FFH). (disassembly) |
| 5592H ↳21906 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): SVC: The Supervisor Calls below 80H. SVC copies the module $SVC (55E0H-5704H, 293 bytes) below HIGH$ and points the supervisor dispatcher's jump for request codes below 80H (the operand at 4BCFH-4BD0H) at the module's dispatcher (+109H): a program then calls a system routine by its number with LD A,n and RST 28H. Bit 0 of SFLAG$ notes that it is installed (a second SVC shows SVC table already implemented). (disassembly) |
| 5598H ↳21912 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 8 (LIST): LIST Data: Texts and the Parameter Table. The message, the line number text, the line head of the hexadecimal listing, the default extension, and the table @PARAM reads (5214H): fifteen entries of eight bytes, a keyword of six characters padded with spaces and the address where its value is stored, then 00H. Each address is the operand of an instruction that uses the value; the short form of a keyword names the same address. (disassembly) |
| 559CH ↳21916 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 9 (ATTRIB): ATTRIB Data: Messages, the Protection Words, the Prompts and the Parameter Table. The texts, ended by 0DH (the prompts by 03H so that the answer is typed on the line), the eight two letter words of the protection levels, and the parameter table for a diskette. (disassembly) |
| 55A1H ↳21921 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 11 (PURGE): Read a Date M/D/Y. 55A1H reads up to three fields of two digits separated by slashes (Register C = 2FH) into 5717H (the month), 5716H (the day) and 5715H (the year), returning the Z FLAG when all three were read. 55B6H reads two digits into Register A (Z), 55CCH one digit (CARRY for a digit). (disassembly) |
| 55A5H ↳21925 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): SET: Give a Token the Value True. The token after //SET is read (5620H) and stored true (56EAH looks it up, 56CDH stores it when it is new). (disassembly) |
| 55A7H ↳21927 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 6 (SPOOL): CLEAR: Empty the Queue. Needs the spooler on. Every slot of the installed spooler's table is made free, the first slot becomes the whole queue again (pointing at itself, as the first and last slot), and the store and send places are both put at the start of its page, so the characters queued are lost. (disassembly) |
| 55AAH ↳21930 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 10 (DEVICE): DEVICE Data: Texts and the Parameter Table. The texts of the three parts (each ended by 03H), the names of the bits of DFLAG$ (the last letter of each with bit 7 set), the table of stepping rates, the line buffer, and the table @PARAM reads (5204H): eight entries of eight bytes, a keyword of six characters padded with spaces and the address where its value is stored, then 00H. Each address is the operand of an instruction that uses the value. (disassembly) |
| 55B4H ↳21940 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): RESET: Give a Token the Value False. The token after //RESET is read (5620H) and, when it is found (56EAH, Register Pair DE at the entry's length byte), a space is stored over the first character of its name, eight bytes before: the entry can no longer be found, so the token counts as false. A token not already stored is already false. (disassembly) |
| 55C5H ↳21957 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): The Detail of a File: Access, LRL, Records, EOF, Extents, Size, Date and Time. Fills the detail template at 5B3CH (pr lrl #recs eof de s=sssss.s dd-mmm-yy hh:mm, 45 characters) from the record at Register Pair HL and displays it. pr is the access code (5AEBH; AL when no password protects the file), the records are worked out from the ending record number, the end of file byte and the record length, the size in kilobytes from the granules; s: instead of s= marks a file made by CREATE. The time is shown only for a diskette that carries it (56ACH). (disassembly) |
| 55C6H ↳21958 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): ASSIGN: Give a Token a Character String Value. The token after //ASSIGN is read (5620H) and stored (56EAH, 56CDH); then an equals sign is required, the value string is read (562BH) and stored against the token (56DFH). (disassembly) |
| 55D3H ↳21971 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 11 (PURGE): Errors and Messages. 55D3H reports error 2CH and 55D5H the error in Register A through @ERROR. 55DCH-55EBH is a chain of LD IX instructions: each entry after the first is the LD HL hidden after the DDH prefix, so a jump into the chain picks one message for @LOGOT. All end the command with Register Pair HL = FFFFH. (disassembly) |
| 55DFH ↳21983 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): INCLUDE: Compile Another File in Place. The current source control block at 57BCH is pushed onto the include stack at 5906H (error Too many nested INCLUDEs! when the stack is full, its top at or above 59A8H, the condition stack), the named file is opened in its place, and the compile goes on reading from it. (disassembly) |
| 55E0H ↳21984 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): The $SVC Module: The Table of Supervisor Calls. Copied to high memory by 55CDH; the addresses in the comments are those of this member. After its header comes the table of 128 routine addresses for the supervisor call numbers 0-127 (from +09H), then the dispatcher (+109H) and the routine for number 100 (+11AH). The supervisor dispatcher of SYS0/SYS jumps to the dispatcher for any request code below 80H with the RST 28H's return address still on the stack, so the routine's RET goes back to the program. (disassembly) |
| 55F1H ↳22001 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 6 (SPOOL): Find a Device Control Block by Name. Register Pair DE holds the two letters of the name (Register E the first). The blocks of 8 bytes are searched, their names at +06H-+07H: KI, DO and PR at 4015H-402CH, then 43C0H-43FFH (JL, SI, SO and the spare blocks). Returns the Z FLAG and Register Pair HL at the block, or the NZ FLAG and Register A = 08H (device not available). (disassembly) |
| 55F4H ↳22004 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 11 (PURGE): Read and Pack a Date. Reads M/D/Y from Register Pair HL: the month must be 1-12 and the day within the month (29 days in February of a leap year; the table's February is counted up for every leap year date read, so a second one allows 30). Years 00-11 count as 2000-2011. Returns Register Pair BC = (year less 1980) x 800H + month x 80H + day x 4 and Register Pair HL after the date; a bad date ends the command with Bad date format. (disassembly) |
| 55FEH ↳22014 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 7 (COPY, APPEND): Open a File or Device and Check Its Access. Register Pair DE = the control block holding a specification, Register Pair HL = the buffer, Register B = the record length, Register A = the low byte of the routine: 24H for @OPEN (4424H), 20H for @INIT (4420H). First the name to show is built at 59A6H: the specification up to its password or drive (a slash with no extension after it left out), then a colon and the drive (filled in after the open, 5679H) and 03H; a device keeps its name alone. After a good @INIT the drive is checked for write protection (@CKDRV). Access: a file opened with @OPEN needs a level below 6 (read), one made or opened with @INIT a level below 5 (write); otherwise it is closed and error 19H (file access denied) is reported. (disassembly) |
| 5614H ↳22036 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): QUIT: End the Compile. The SYSTEM/JCL file is closed and the member jumps to the finish (57B3H with the line at 59D8H, which ends the command). (disassembly) |
| 5617H ↳22039 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 6 (SPOOL): The Messages and the Exit. 5617H and the six entries below it are a chain of LD IX instructions whose DD prefixes make each entry but the one jumped to a dead load, so entering at 5617H, 561BH, 561FH, 5623H, 5627H, 562BH or 562FH loads Register Pair HL with one message. 5632H displays it and ends the command with Register Pair HL = 0000H; 5638H puts the stack back and, for HL = FFFFH during a JCL job, ends the job through @ABORT. 5647H reports error 2CH (parameter error) through @ERROR, and 5650H, 5654H and 5658H are a second chain for the refusals. (disassembly) |
| 5620H ↳22048 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): Read a Token or a Value String. 5620H reads a token of up to eight characters at Register Pair HL into the buffer at 57DCH; 562BH reads a value string of up to 32 characters into 57E5H and stores its length at 57E4H (error Symbol string too long! above 32). Both call 5667H, which stores the characters, folds small letters to capitals, keeps the characters inside a pair of quotes whole, sets the label flags on an @, and pads the field with spaces. (disassembly) |
| 563CH ↳22076 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 8 (LIST): LIST Data: the Work Areas. Above the member: the bytes of a hexadecimal line, the file's control block, the copy of the specification and the file's buffer. (disassembly) |
| 5642H ↳22082 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 11 (PURGE): PURGE Data: Messages, the Month Table, the Masks and the Parameter Table. The messages (Purge aborted after a line feed), the prompt and the question texts, the days of the months, the month names, the masks of the partspec, the flags of the dates; 5711H-5733H are a work area not in the file; then the parameter table. (disassembly) |
| 5664H ↳22116 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 6 (SPOOL): SPOOL Data: the Messages. The messages of the selectors at 5617H and 5650H, each ended by 0DH, displayed by @LOGOT. (disassembly) |
| 5667H ↳22119 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): The Character Reader of a Token or Value. Register B = the most characters, Register Pair DE = the buffer, Register Pair HL = the text. Characters are stored until 03H, 0DH or a character not allowed in a token; a pair of quotes keeps whatever is between them; an @ at a token sets the label flags (a second @ is Too many Proc labels!); the field is padded with spaces to Register B characters. Returns the character that ended it in Register A, the Z FLAG when a character was stored. (disassembly) |
| 56A1H ↳22177 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 7 (COPY, APPEND): Display the Banner. Copying: (or Appending: for APPEND, 5211H), the source's name (59B6H), " to " and the destination's name (59C6H runs on into 59CAH), then ENTER. (disassembly) |
| 56BDH ↳22205 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 7 (COPY, APPEND): The Record Length of a File. Register Pair DE = the control block of a file just opened, whose directory sector is still at 4200H. Its directory record is the 32 byte slot of +07H AND E0H; Register A returns the record's +04H, the record length. (disassembly) |
| 56CCH ↳22220 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 7 (COPY, APPEND): Keep the Source's Directory Bytes. Register Pair DE = the source's control block, its directory sector at 4200H. The record's +00H-+02H (attributes, flags and month, day and year) and +10H-+13H (the password hash and the time field) are copied to 5A1EH-5A24H for CLONE. Register Pair HL returns at the record +14H. (disassembly) |
| 56CDH ↳22221 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): Store a Token in the Token Table. Register Pair DE = the free entry 56EAH found (the 00H that ends the table). The eight character name at 57DCH is copied into it, its length byte (+08H) is set to 00H (no value string), and the first byte of the next entry, 41 bytes on, is cleared to end the table. (disassembly) |
| 56DFH ↳22239 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): Store a Value String against a Token. Register Pair DE = the length byte of the token just stored (after its name). The 33 bytes at 57E4H (the length and up to 32 characters) are copied there, so the token carries its value string. (disassembly) |
| 56E9H ↳22249 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 7 (COPY, APPEND): BREAK and the Pause. During a JCL job nothing is looked at (Z FLAG). Otherwise BREAK (KFLAG$ bit 0) returns the NZ FLAG; a pause (bit 1, SHIFT @) waits until BREAK (NZ) or another key than SHIFT @ (Z, the copy goes on). (disassembly) |
| 56E9H ↳22249 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): The $SVC Module: The Dispatcher and SVC 100. 56E9H is entered from 4BCEH with Register A = the supervisor call number (0-127) and the program's registers. It looks the number up in the table and goes to the routine with Register A = the value of Register C (the call's argument) and Register Pair HL as it was. 56FAH is supervisor call 100: with Register Pair HL not 0000H it stores HL as HIGH$; in either case it returns HIGH$ in Register Pair HL. (disassembly) |
| 56EAH ↳22250 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): Look for a Token in the Token Table. The token name at 57DCH is searched in the table at 5D00H (41 byte entries: eight name, one length, 32 value; 00H ends the table). 5716H returns Register Pair HL at the length byte of the matching entry, or at the 00H free slot. Returns Register Pair DE = that address and the Z FLAG when the token was found. (disassembly) |
| 56FBH ↳22267 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): Search a Directive Table. 56FBH searches the conditional directive table at 54FAH (7 byte entries), 5704H the other directive table at 5510H (10 byte entries), for the name at 57DCH. 5716H returns Register Pair HL at the two byte handler address after the matched name, which is read into Register Pair DE. The Z FLAG is set when the name was found. (disassembly) |
| 5705H ↳22277 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): SYSRES: Keep a System File in Memory. SYSRES=n (1-5 or 8-12) keeps SYSn/SYS in high memory, so that its requests no longer read the diskette. The first SYSRES puts the module $SR (57BFH-5824H) below HIGH$ and points the supervisor dispatcher's CALL (operand 4BDFH-4BE0H) at its hook (+28H). Then the file is loaded through the overlay loader (4BF5H), copied below HIGH$ with its length in front and an 8 byte header named $Sn, and its address noted in the $SR module's table. SYSRES=0, 6, 7 or 13 and up shows Can't SYSRES requested module, a file already kept System module already resident. (disassembly) |
| 5709H ↳22281 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): The Size of a File: the Sorted Key or the Extents. 5709H returns Register Pair DE = the file's granules and Register Pair BC = its extents. With SORT the two words stored at +16H-+19H of the copied record (54DEH) are taken; otherwise 571FH adds up the extents of the record at Register Pair HL and of its extension records: each extent is two bytes (the cylinder, then bits 7-5 the first granule and bits 4-0 the granules less one), FEH as a cylinder links to an extension record whose number follows, FFH ends the list. An extension record not in the buffer at 4200H is read into 5D00H. (disassembly) |
| 570CH ↳22284 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 7 (COPY, APPEND): The Diskette Prompts of X. 570CH asks for the system diskette, but only for X on drive 0, where the system diskette has to come back for the overlays. 571EH asks for the source diskette and 5740H for the destination diskette until the GAT of the diskette in the drive has the 18 bytes kept for it (59FAH, 5A0CH). Without X each returns at once. (disassembly) |
| 5716H ↳22294 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): The Name Table Search. Register Pair HL = the table, Register Pair DE = the name wanted, Register B = the characters compared, Register C = the bytes of an entry. Each entry's name is compared with the wanted name, spaces at the end of either counting as the end; on a match Register Pair HL is left just past the entry's name, on no match it steps on by Register C bytes. A 00H where a name begins ends the table, returning the NZ FLAG. (disassembly) |
| 5766H ↳22374 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): Helper: Write a Number in Decimal. Register Pair HL = the number, Register Pair DE = the first of five places. The places are filled with spaces, then the digits are written from the right by dividing by ten (@DIV) until the number is 0. (disassembly) |
| 576BH ↳22379 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 7 (COPY, APPEND): Flash a Prompt until ENTER. Waits until BREAK and ENTER are let go, then shows the prompt at Register Pair HL (it ends with 1DH, the cursor back to the start of the line) and erases it with 1EH, again and again, while KFLAG$ is watched: BREAK ends the command with Transfer aborted through @ABORT; ENTER clears the keys and returns to the caller of 576EH. (disassembly) |
| 577CH ↳22396 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): Output Helpers: a Text, a Character, a Space. 577CH displays the text at Register Pair HL and prints it when P was given (the P parameter at 578FH). 5787H shows a space, 5789H the character in Register A, both also sent to the printer with P; 578EH sends Register A to the printer only. (disassembly) |
| 577FH ↳22399 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): Helper: Test for a Space or a Comma. Returns the Z FLAG for a space or a comma in Register A, the NZ FLAG otherwise. Register A is kept. (disassembly) |
| 5785H ↳22405 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): Helper: Fold a Small Letter to a Capital. A character a-z (61H-7AH) has 20H taken off to make it a capital; the CARRY FLAG is set for a character that is not a letter a-z. Any other character is left as it is. (disassembly) |
| 578FH ↳22415 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): Parameter Error and the Message Selector. 578FH reports error 2CH (parameter error) through @ERROR; 5798H and the five entries below it are a chain of LD IX instructions whose DD prefixes make each entry but the one jumped to a dead load, so entering at 5798H, 579CH, 57A0H, 57A4H, 57A8H, 57ACH or 57B0H each loads Register Pair HL with one message. 57B3H displays it and ends the command. (disassembly) |
| 5796H ↳22422 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): Granules to Kilobytes. Register Pair DE = granules, Register Pair HL = the place of five digits. The granules times the sectors in a granule (579BH) give the sectors; four sectors of 256 bytes make one kilobyte. The kilobytes go out as five decimal digits (588CH) and the quarter left over returns in Register A as the tenths digit 0, 2, 5 or 8. (disassembly) |
| 57B2H ↳22450 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 6 (SPOOL): SPOOL Data: the RESET Line and the Device. The command line OFF runs (5598H): Reset, then the device's specification, which @FSPEC writes into the control block that follows (an asterisk, two letters and 03H), with 0DH stored after the letters at 57BBH. (disassembly) |
| 57BFH ↳22463 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): The $SR Module: System Files Kept in Memory. Copied to high memory by 57B1H; the addresses in the comments are those of this member. Its table holds one word for each request code's low four bits: the address of the length word in front of a file kept in memory, or a high byte of 00H. The supervisor dispatcher calls the hook (+28H, 57E7H) with Register A = the request code (Register B = the library member): a file kept in memory and not already at 4E00H is copied there (its length to 4BC9H, 4E00H as the entry at 4BE5H, the code to OVRLY$); any other request goes on to the overlay loader at 4BF5H. (disassembly) |
| 57C2H ↳22466 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): Copy a Name Field into a Mask. Register A = the first character, Register Pair HL = the text after it, Register Pair DE = the mask, Register B = the most characters. A $ and the letters and digits are stored, small letters as capitals; any other character ends the field. Returns Register A = the character after the field and Register Pair HL past it. (disassembly) |
| 57C5H ↳22469 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 7 (COPY, APPEND): Three Overlay Loads, a Device Test, the Date Layout Test and the GAT Read. 57C5H, 57C8H and 57CBH each issue one request whose function does nothing (00H): the supervisor loads SYS2/SYS (84H), SYS8/SYS (8AH) or SYS3/SYS (85H) into 4E00H, where the next open, write or close then finds it, which matters while another diskette than the system diskette is in drive 0. The supervisor drops the RST's return address, so each returns to its caller. 57CEH tests for a device; 57DAH for the date layout of a drive; 57EDH reads a GAT. (disassembly) |
| 57D8H ↳22488 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 6 (SPOOL): SPOOL Data: Default Names and the Parameter Table. The default spool file name, the default device and the table @PARAM reads (52C6H): twelve entries of eight bytes, a keyword of six characters padded with spaces and the address where its value is stored, then 00H. Each address is the operand of an instruction that uses the value; the short form of each keyword names the same address. A spooler in memory is read from 5803H on, without MEM and DISK. (disassembly) |
| 57DDH ↳22493 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): A Directory Date as One Word. Register Pair HL = byte +01H of a directory record. Returns Register Pair DE = the year in bits 15-11, the month in bits 10-7 and the day in bits 6-2, so that dates compare as numbers. The year is the five bit year at +13H on a diskette with this release's dates (56ACH), else the three bits of +02H. (disassembly) |
| 57FFH ↳22527 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 7 (COPY, APPEND): Open the Source or the Destination. 57FFH opens the control block at Register Pair DE with @INIT (20H); 5803H the source (5986H) and 5806H the control block at Register Pair DE with @OPEN (24H), at 5B00H; 580CH with the routine named by Register A. Register B = Register L, 00H: records of 256. A failure goes to the error report. (disassembly) |
| 5806H ↳22534 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): Read a Date Argument MM/DD/YY. Register Pair HL = the first digit. Three fields of two digits separated by slashes are read into 5BEBH (the month), 5BEAH (the day) and 5BE9H (the year); years 00-11 mean 2000-2011. The day is checked against the days of the month at 5B76H (February gets one more day in a leap year: 581FH adds it to the table itself, so a second leap year date in the same command allows one more). Returns Register Pair BC = the date as one word in the form of 57DDH, Register Pair HL after the date. A bad date goes to Bad date format. (disassembly) |
| 580DH ↳22541 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): DO Data: Launch Stubs and the SYSTEM/JCL Name. The stubs copied over the exit and error vectors while the JCL runs, and the file specification SYSTEM/JCL with its drive patched in. (disassembly) |
| 5810H ↳22544 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 7 (COPY, APPEND): Errors and the Message Selector. 5810H reports the error number in Register A (5816H: error 2CH, parameter error) through @ERROR, after asking for the system diskette back for X on drive 0. 581FH and the four entries below it are a chain of LD IX instructions whose DD prefixes make each entry but the one jumped to a dead load, so entering at 581FH, 5823H, 5827H, 582BH or 582FH loads Register Pair HL with one message. Each ends the command with Register Pair HL = FFFFH. (disassembly) |
| 5825H ↳22565 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): DO Data: the Messages. The messages the selector at 5798H and the error path at 5469H choose between, each ended by 0DH. (disassembly) |
| 5825H ↳22565 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): The Drive Options: DRIVE, WP, CYL, DISABLE, ENABLE, STEP, DELAY. With DRIVE=d the options apply to drive d only; without it WP, CYL, ENABLE, STEP and DELAY apply to every drive in turn (DISABLE needs DRIVE). Index Register IY points at the drive's code table in DCT$ (4700H + d x 10), Index Register IX at the same drive's table in drive 0's system information sector at 4200H (the block at 4220H after a boot through a driver, else 4270H), which is read first and written back afterwards when CYL is given: CYL changes only the copy the boot uses. WP sets the software write protect (bit 7 of +03H), DISABLE puts a RET (C9H) and ENABLE a JP (C3H) at +00H, STEP=n the step rate (bits 1-0 of +03H, unless bit 4 of +04H is set), DELAY=ON clears and DELAY=OFF sets bit 2 of +03H (one motor wait less). (disassembly) |
| 583BH ↳22587 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 7 (COPY, APPEND): COPY Data: the Messages. The two banner words end with 03H so that the name follows on the same line; the error messages end with 0DH; the four prompts start with 1DH 1EH (the cursor to the start of the line, the line erased) and end with 1DH 03H, so that 1EH can erase them again (576BH). The drive digit of the last two is written by 530EH and 5311H. (disassembly) |
| 5844H ↳22596 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 6 (SPOOL): The Spooler Module: Header and Driver Entry. 5844H-59AEH (016BH bytes) is copied to high memory by 54C9H and runs there, at the module's start (HIGH$ + 1) plus the distance from 5844H; the rows show it at its place in the member. 5488H-54C1H point every address the module uses inside itself at its new place. It starts with a module header (a JR over the header, a link word holding the top of its memory, the length of the name and SPOOL) and its parameter block. The device's control block points at 5844H as its driver: a character sent to the device (the Z FLAG set) is queued; a status request (Register C = 00H) is answered as ready, and anything else returns Register A = Register C. (disassembly) |
| 5856H ↳22614 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): Read Three Two Digit Fields. Register Pair HL = the text, Register C = the separator. The fields go to 5BEBH, 5BEAH and 5BE9H. Returns the Z FLAG with Register Pair DE = 5BE9H, or the NZ FLAG when a field is not two digits or a separator is not Register C. 586BH reads two digits into Register A (the Z FLAG when both are digits); 5881H takes one character and returns the CARRY FLAG for a digit. (disassembly) |
| 5863H ↳22627 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 6 (SPOOL): The Spooler Module: Queue a Character. Stores Register C at the store place (queue block +20H-+21H) and moves it on. While the page has room, one character is sent if the device is ready and the page change of 5942H is tried. When the page is full a free slot is looked for in the table: a memory slot becomes the last slot of the queue and its page receives the next characters; a disk slot takes the full page, which is written to that sector of the spool file and linked in before the last slot, so that the same page can be filled again. With no free slot the module sends and changes pages until one is free. (disassembly) |
| 5888H ↳22664 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): Decimal Output: Three, Five or Two Digits. Register Pair HL = the number, Register Pair DE = the place for the digits. 5888H writes three digits and 588CH five, with spaces for leading zeros; 58A0H writes two digits with Register A = the character for a leading zero (a space or 0). Each digit is found by 58ACH, which subtracts the power of ten in Register Pair BC as often as it can. Register Pair DE returns after the digits. (disassembly) |
| 58C7H ↳22727 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): BREAK and the Pause Key. 58C7H returns the Z FLAG to go on and the NZ FLAG for BREAK. During a JCL job (bit 5 of 430FH) nothing is checked. With SHIFT @ held (bit 1 of KFLAG$, 4423H) it waits for a key other than SHIFT @. 58E8H clears the BREAK, pause and ENTER bits of KFLAG$. (disassembly) |
| 58F2H ↳22770 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): Count a Line against the Page. Counts down the lines left on the screen (58F3H, 15 a page). At the end of a page, unless N or P was given or a JCL job runs, it waits for a key: BREAK ends the command, C (or c) makes the rest of the display continuous, any key clears the screen; then the column headings are shown again (5921H). (disassembly) |
| 58F6H ↳22774 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 6 (SPOOL): The Spooler Module: the Despool Task. The task block (module +B2H) put into slot 9 by 54F3H: its word points at 58F8H, which runs the send routine twice, so up to two characters go to the device on each tick. 58FBH sends nothing while KFLAG$ bit 4 is clear (PAUSE) or the device is not ready, nothing when the page being sent is empty (queue block +23H = 00H) or the send place has reached the store place; after the last byte of a page it sets +23H to 00H, and 5942H chooses the next page outside the interrupt. (disassembly) |
| 5906H ↳22790 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): DO Data: Stacks and the Error Line. The include stack and the condition stack grow in the work area; their pointers are kept here, and the error line holds the line number. (disassembly) |
| 590DH ↳22797 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): DRIVER: Load a Disk Driver. DRIVER="filespec" loads the driver file (default extension /DCT) with @LOAD and runs it at its transfer address with Register Pair DE = the code table of the drive named by DRIVE (0000H for none) and bit 3 of 4758H set. DRIVER alone asks Enter DCT driver <BREAK=default> : ; BREAK there puts the drive table that the boot uses (from the system information sector) back into the code table, from byte +03H on, for the drive of DRIVE or drive 0. (disassembly) |
| 593CH ↳22844 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 6 (SPOOL): The Spooler Module: the Keyboard Task Part. @KITSK (4300H) jumps here (module +F8H) on each keyboard scan once the spooler is on. The page change runs here, outside the interrupt, since it can read a sector of the spool file; then the three bytes saved from @KITSK carry on as @KITSK did before the install. (disassembly) |
| 5942H ↳22850 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 6 (SPOOL): The Spooler Module: Change the Page Being Sent. Does nothing while a page is being sent (queue block +23H not 00H). Otherwise the first slot of the queue is done: when the slot after it is a memory slot, the first slot is made free and that slot becomes the first, its page sent next. When the slot after it is a disk slot, its sector is read into the first slot's page, the disk slot is made free and taken out of the queue, and the first slot's page is sent again. Then one character is sent if the device is ready. Every register is kept. (disassembly) |
| 5944H ↳22852 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): SORT: Sort the Collected Records by Name and Show Them. The records copied to 5E00H up to the address in 5BE1H are sorted through a table of pointers built right after them, one word for each record: a Shell sort (5997H) compares the eleven characters of name and extension and swaps the pointers, then each record is shown through 5509H in the new order. The room test before the table compares twice the count with the ceiling address itself, not with the room left above the records. (disassembly) |
| 5986H ↳22918 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 7 (COPY, APPEND): COPY Data: the Control Blocks and the Names. The work areas above the code. Only " to " at 59C6H-59C9H is loaded from the file. (disassembly) |
| 5997H ↳22935 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): The Shell Sort of the Pointer Table. N = the number of records (5998H). The gap starts at N/2 and halves until it is 0 (599EH). For each i from 0 below N - gap (59BAH, the limit at 5A1FH), j starts at i (59C0H): when the name of record j + gap is below the name of record j, the two pointers swap and j steps back by the gap while it stays 0 or more. Every count lives in the operand of the instruction that loads it. (disassembly) |
| 59AFH ↳22959 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 6 (SPOOL): The Spooler Module: the Queue Block. The 44 bytes copied below the slot table by 542DH (the module +016BH in high memory). The first 32 bytes are the spool file's control block; +20H-+2BH are the queue's cells. The member fills it in place (5268H, 5293H, 534FH, 53D7H-541AH) before the copy. (disassembly) |
| 59B3H ↳22963 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): SYSTEM and SWAP: Exchange Two Drives. SWAP=d exchanges the code tables of drive d and the drive of DRIVE (drive 0 when DRIVE is not given); SYSTEM=d is SWAP=d with drive 0. Both drives must be 0-7 and different. A drive that becomes drive 0 must hold a system diskette (5A84H). The JCL file of a running job follows its drive (5AC5H). The ten bytes of each table are exchanged through 4200H. (disassembly) |
| 5A00H ↳23040 ↳FILTER | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 14 (FILTER, SET): Load a Filter or a Driver. One member, loaded at 5A00H-5B43H, serves FILTER *d filespec (member 66H, entry 5A00H) and SET *d filespec (member 65H, entry 5A01H, the AFH inside the OR AFH, which runs as XOR A). Register A after the entry is not 00H for FILTER and 00H for SET; it is kept at 5A84H. Only at LDOS command level. The file gets the extension FLT or DVR when it has none. FILTER needs the device to exist (else error 08H); SET takes a free block for a new device (none: error 21H). SFLAG$ bit 2 and bit 3 of 4758H are set, the file is loaded with @LOAD, SET names the block, and the member jumps to the file's transfer address with Register Pair DE = the device's control block and Register Pair HL = the rest of the command line; the loaded code installs itself and returns to the program that ran the command. (disassembly) |
| 5A01H ↳23041 ↳SET | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 14 (FILTER, SET): SET enters here: the AFH inside the OR AFH at 5A00H, which runs as XOR A, so that Register A is 00H for SET. (disassembly) |
| 5A25H ↳23077 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 7 (COPY, APPEND): COPY Data: the Parameter Table. The table @PARAM reads: COPY from 5A25H (52CAH), APPEND from 5A4DH (5232H), so APPEND knows only STRIP and ECHO. Ten entries of eight bytes, a keyword of six characters padded with spaces and the address where its value is stored, then 00H. Each address is the operand of an instruction that uses the value; the short form of each keyword names the same address. (disassembly) |
| 5A29H ↳23081 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): Errors and the Common Exit. 5A29H displays Insufficient memory for SORT buffer!; 5A2DH (inside the LD IX at 5A2CH) displays Bad date format; 5A35H reports error 2CH (parameter error) and 5A37H the error in Register A through @ERROR, which returns. All end the command with Register Pair HL = FFFFH. (disassembly) |
| 5A2FH ↳23087 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): SYSGEN and the Exit. SYSGEN (or SYSGEN=OFF) is refused while the spooler is installed (bit 0 of DFLAG$). Otherwise Preparing to alter configuration is shown and Library B member 1CH (SYSGEN, member 5) is run through request 89H with Register H = the drive (DRIVE, 0 when not given) and Register L = FFH to build or 00H to delete; it loads over this member and does not come back here. 5A4FH and 5A52H are the exit of every option. (disassembly) |
| 5A42H ↳23106 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): DIR Data: the Parameter Table. The table @PARAM reads (5249H): thirteen entries of eight bytes, a keyword of six characters padded with spaces and the address its value goes to, then 00H. Every address is the operand of the instruction that uses the value. (disassembly) |
| 5A61H ↳23137 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): Read and Write Drive 0's System Information Sector; Errors. 5A61H reads cylinder 0, sector 2 of drive 0 into 4200H, 5A6EH writes it back; either reports a failure through @ERROR and ends the command. 5A7AH (inside the LD BC at 5A79H) reports error 2CH, a parameter error. (disassembly) |
| 5A84H ↳23172 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): A System Diskette in the Drive Register A. The drive must hold a system diskette when it is to become drive 0: it must be ready and directory record 03H (the first record of directory sector 5, SYS1/SYS's) must be in use. Otherwise Insert SYSTEM diskette in drive X! is shown and ENTER makes it look again; BREAK ends the command with Manual <BREAK> abort!. During a JCL job no prompt is possible: Can't prompt for SYSTEM disk during JCL!. (disassembly) |
| 5AA2H ↳23202 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 14 (FILTER, SET): Find a Device Control Block by Name. Register Pair DE holds the two letters (Register E the first). The blocks of 8 bytes are searched, their names at +06H-+07H: KI, DO and PR at 4015H-402CH, then 43C0H-43FFH. Returns the Z FLAG and Register Pair HL at the block, or the NZ FLAG and Register A = 08H (device not available). Then the error exits and the messages. (disassembly) |
| 5AABH ↳23211 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): DIR Data: the Headings, the Access Codes and the Drive Line. The column headings of the full display (5926H), the eight access codes of the detail (55D3H) and the template of the drive line (53C1H), whose fields 5302H-53BEH fill in for each drive. (disassembly) |
| 5AC5H ↳23237 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): A JCL Job's File Follows the Swap. During a JCL job the drive in byte +06H of JFCB$ (435EH, the job file's control block at 4358H) is changed to the other drive of the swap when it is one of the two drives exchanged, so that the job reads its file from where its diskette now is. (disassembly) |
| 5AE7H ↳23271 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): Find a Module in High Memory; the Command Level Test; Messages. 5AE7H finds the module whose name is at Register Pair DE through request BCH (SYS10/SYS) and returns the Z FLAG with Register Pair HL = the module and Register Pair DE = its link word (+02H-+03H). 5AF7H refuses a change of memory when a program owns @EXIT (402DH, or its copy at 4065H during a JCL job, holds a JP) and the command line came from a program (bit 1 of 4758H). 5B0DH-5B28H is a chain of LD IX instructions: each entry after the first is the LD HL hidden after the DDH prefix, so a jump into the chain picks one message for @LOGOT. (disassembly) |
| 5B31H ↳23345 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS7 member 7 (SYSTEM): SYSTEM Data: Messages, the Default Extension and the Parameter Table. The messages, each ended by 0DH (the prompt for the driver by 03H), the extension DCT for DRIVER, and the 30 entries of the parameter table: a keyword of six characters (padded with spaces) and the address where @PARAM stores its value, the operand of the instruction that tests it. The text New SYSTEM drive installed (5C9EH) is in the file but no code uses it. (disassembly) |
| 5B3CH ↳23356 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): DIR Data: the Detail Template, the Masks and the Days of the Months. The 45 characters of the detail (filled by 55C5H), the name and extension masks of the partspec, and the days in each month for the date check. (disassembly) |
| 5B82H ↳23426 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 2 (DIR): DIR Data: Messages, Month Names and the Date Mode. The two messages (5A29H, 5A2DH), the month names of the detail (569CH), the five asterisks of a record count that does not fit (5624H) and the date mode byte, the last byte of the member. (disassembly) |
| 5D00H ↳23808 | L1 (LDOS 5.3.1, Model I) | LDOS 5.3.1 SYS6 member 5 (DO): DO Data: the Token Table. The table of tokens set on the DO line, by //SET or by //ASSIGN. Each entry is eight name characters, a length byte and a 32 byte value string (41 bytes); a 00H name byte ends it. Built in the work area above the member. (disassembly) |