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. 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 | Both Model I and III ROM | Keyboard row for the SHIFT key(s). Read during keyboard scanning and BREAK key detection. |
| 3880H ↳14464 | Both Model I and III ROM | Keyboard row for the letters group. Used in keyboard scanning routines. |
| 3C00H-3FFFH ↳15360 | Both Model I and III ROM | Start of Video RAM. 1024-byte display buffer (64 columns x 16 rows). |
| 3C3EH ↳15422 | Both Model I and III ROM | Video RAM - second-to-last character of top screen line. Drive activity indicator / status character position. |
| 3C3FH ↳15423 | Both Model I and III ROM | Video RAM - last character of top screen line. Asterisk blink position during cassette operations. |
| 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 | 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. |
| 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. |
| 400FH ↳16399 | Both Model I and III ROM, T1 | RST 30H vector target (3 bytes). Expression evaluator call. JP 400FH at 0030H. |
| 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 | Both Model I and III ROM | Interrupt vector / keyboard driver table (3+ bytes). Loaded as DE at 002BH. Model III disk ROM copies 24 bytes from 36BFH here at 0455H. |
| 4016H ↳16406 | N1 | NEWDOS/80: Store at 4016H - set interrupt handler. |
| 4018H ↳16408 | Model III ROM | Disk directory buffer pointer or NMI workspace. Loaded as HL at 3396H. |
| 4019H ↳16409 | Model III ROM | Disk system flag byte. Read at 3427H; HL pointer base at 30BFH. Disk-active/motor-on status. |
| 401AH ↳16410 | Model III ROM | Disk parameter pointer (2 bytes). HL loaded at 353BH. |
| 401CH ↳16412 | Model III ROM | Disk track register shadow. Read at 3535H during disk seek. |
| 401DH ↳16413 | Both Model I and III ROM, N1 | Alternate RST 30H redirect / keyboard line-input vector (3 bytes). Loaded as DE at 0033H. |
| 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. |
RST Vector Jump Table (4000H-4027H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4022H ↳16418 | Model III ROM | Disk read/write flag. Read at 352FH. |
| 4023H ↳16419 | Model III ROM | Disk format fill byte. Read at 354FH. |
| 4025H ↳16421 | Both Model I and III ROM, N1 | Alternate RST 18H redirect (3 bytes). Loaded as DE at 003BH. |
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). |
| 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. |
| 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 command dispatch vector (3 bytes). Conditional jump at 0687H. |
| 4036H ↳16438 | Model I ROM, T1, N1 | DOS parameter block pointer (3+ bytes). Loaded as HL at 03E3H. |
| 4036H ↳16438 | Model III ROM | Disk parameter block pointer (3+ bytes). Loaded as HL at 33BAH. |
| 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 | DOS ready flag / disk jump vector (1-3 bytes). Read at 0348H; conditional JP at 35DDH. Only 2 refs on Model III vs 10 on Model I. Model III replaced port FFH shadow with 4210H device selector. |
| 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 | Disk function vector #2 (3 bytes). Conditional JP 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 | Disk function vector #3 (3 bytes). Conditional JP 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 | Disk function vector #1 (3 bytes). Conditional JP 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. |
| 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 | Model III ROM, N1 | Disk workspace byte/pointer. Written at 34D6H (byte), 3508H (word); conditional JP at 351CH. |
| 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 | Model III ROM | Disk workspace pointer (2 bytes). Written at 34D1H. |
| 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 ↳TSTK$ | Model III ROM | Disk initialization stack pointer. SP loaded at 3457H during disk cold-start. |
RS-232 / Serial Communication Workspace (4080H-408FH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4080H ↳16512 ↳FDIVC / RAMLOW | Both Model I and III ROM | RS-232 driver entry point / serial config block. 39 bytes copied from ROM 18F7H at boot (0075H). Called at 08CAH. Also overlaps floating-point division code. |
| 4081H ↳16513 | Both Model I and III ROM | RS-232 config byte #1. Written at 08BBH. |
| 4085H ↳16517 ↳FDIVB | Both Model I and III ROM | RS-232 config byte #2. Written at 08B6H. Also used in single precision division. |
| 4089H ↳16521 ↳FDIVA | Both Model I and III ROM | RS-232 config byte #3. Written at 08B1H. Also used in single precision division. |
| 408CH ↳16524 ↳FDIVG | Both Model I and III ROM | RS-232 status/control byte. Read at 08F0H; written at 08C4H, 08D2H, 08F4H. Also used in single precision division. |
| 408EH ↳16526 ↳USRTAB | Both Model I and III ROM, T1 | RS-232 buffer pointer / USR entry point (2 bytes). Read as HL at 2815H. In tape systems, entry point for USR(0): POKE 16526=LSB, 16527=MSB, then X=USR(0). |
| 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. |
| 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 | BASIC input buffer pointer (3 bytes). Loaded as HL at 14F0H. Also cassette I/O / FP workspace. |
| 4093H-4098H ↳16531 ↳STAINP | Both Model I and III ROM | BASIC ON ERROR handler vector (3 bytes). Called at 2AF5H. |
| 4094H ↳16532 | Both Model I and III ROM | Error handling flag. Written at 2AF2H, 2B11H. Prevents recursive errors. |
| 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 | Both Model I and III ROM | Error resume flag. Written at 2B14H. |
| 4099H ↳16537 ↳CHARC | Both Model I and III ROM | INKEY$ storage / BASIC output device flag. Read at 019FH; written at 01ADH, 0362H, 1DA5H. 0=screen. |
| 409AH ↳16538 ↳ERRFLG | Both Model I and III ROM, N1 | Current error code / TAB column. Read at 1A2BH, 1F8EH, 24D0H; written at 19B7H, 1FB8H, 2E53H. |
| 409BH ↳16539 ↳LPTPOS | Both Model I and III ROM | Last key pressed / keyboard buffer byte / printer carriage position. Read at 038FH, 03B1H, 20D5H, 211BH, 214EH; written at 03B7H. |
| 409CH ↳16540 ↳PRTFLG / OUTSEL | Both Model I and III ROM | Output device flag (1 byte). -1/129=Cassette, 0=Video, 1=Printer. 10 refs. |
| 409DH ↳16541 ↳LINLEN | Both Model I and III ROM | Cassette output flag / max video line length. Set to 64 at power-up. Read at 20DDH. |
| 409EH ↳16542 ↳CLMLST | Model I ROM | Size of print line. Read at 2123H. |
| 409EH ↳16542 ↳CLMLST | Model III ROM | Max print zones per line. 0=1 zone, 16=2, 32=3, 48=4. Set to 48 at power-up. |
| 409FH ↳16543 | Model I ROM | Reserved / unused on Model I. |
| 409FH ↳16543 | Model III ROM | BASIC run-mode flags (1 byte). 9 refs. Bit 0=quoted string, Bit 1=DATA, Bit 2=REM. Rewritten tokenizer. |
| 40A0H-40A1H ↳16544 ↳STKTOP | Both Model I and III ROM, N1 | String storage area top pointer (2 bytes). Top of free memory. Set to MEMSIZ-50 at power-up. Changed by CLEAR n. |
| 40A2H-40A3H ↳16546 ↳CURLIN | Both Model I and III ROM, N1 | Current/last executed line number (2 bytes). FFFFH=direct mode. 15 refs. |
| 40A4H-40A5H ↳16548 ↳TXTTAB | Both Model I and III ROM, N1 | BASIC program start pointer (2 bytes). Default: 42E9H (tape). 9 refs. Model I refs from 1B5DH; Model III from 046FH. |
| 40A6H ↳16550 ↳TTYPOS | Both Model I and III ROM | Current cursor column position (1 byte). Returned by POS function. 8 refs. |
| 40A7H-40A8H ↳16551 ↳BUFPNT | Both Model I and III ROM, N1 | Input buffer pointer (2 bytes). Initialized at 008BH. 12 refs. |
| 40A9H ↳16553 ↳CASFLG | Both Model I and III ROM, N1 | PRINT USING format flag / cassette input flag. 0=input from cassette. |
| 40AAH-40ACH ↳16554 ↳RNDX | Both Model I and III ROM | Random number seed (3 bytes). 24-bit PRNG seed. |
| 40ABH ↳16555 ↳RNDX+1 | Both Model I and III ROM | Middle byte of RNG seed / cassette speed. Updated by RANDOM with Z80 Refresh register. |
| 40ACH ↳16556 ↳RNDX+2 | Both Model I and III ROM | High byte of RNG seed / cassette data byte. |
| 40AEH ↳16558 ↳DIMFLG | Both Model I and III ROM | EDIT line number buffer / DIM flag (2 bytes). 0=locate/create; non-zero=DIM only. |
| 40AFH ↳16559 ↳VALTYP / SAFLAG | Both Model I and III ROM, N1 | Variable type flag / output position counter. 2=int, 3=str, 4=sng, 8=dbl. 16 refs. |
| 40B0H ↳16560 ↳DORES | Both Model I and III ROM | Dual-purpose flag. Tokenization: DATA flag. Evaluation: operator precedence. |
| 40B1H-40B2H ↳16561 ↳MEMSIZ / MEMTOP | Both Model I and III ROM, N1 | Top of memory pointer (2 bytes). Last usable RAM. Set at Memory Size? prompt. |
| 40B3H-40B4H ↳16563 ↳TEMPPT | Both Model I and III ROM, N1 | String space bottom / temp string descriptor pointer (2 bytes). |
| 40B5H-40D2H ↳16565 ↳TEMPST | Both Model I and III ROM | String variable VARPTR storage area (30 bytes). 3-byte descriptors for temp strings. |
| 40D3H-40D5H ↳16595 ↳DSCTMP | Both Model I and III ROM | Temporary string descriptor (3 bytes). Length + 2-byte address. |
| 40D4H-40D5H ↳16598 | Both Model I and III ROM | Simple variable end pointer / VARTAB (2 bytes). Model III adds ref at 37A0H. |
| 40D6H-40D7H ↳16600 ↳FRETOP | Both Model I and III ROM, N1 | Next free string byte / array table end pointer (2 bytes). 10 refs. |
| 40D8H-40D9H ↳16602 ↳TEMP3 | Both Model I and III ROM | DATA read pointer / multi-purpose temp (2 bytes). 11 refs. |
| 40DAH-40DBH ↳16602 ↳DATLIN | Both Model I and III ROM | Line number of last DATA item read (2 bytes). |
| 40DCH ↳16604 ↳SUBFLG | Both Model I and III ROM, N1 | FOR/NEXT loop counter / subscript flag. 64H during FOR processing. |
| 40DDH ↳16605 ↳BFKLFL | Both Model I and III ROM | Input-phase flag. 0=not in input; non-zero=input active. |
| 40DEH ↳16606 ↳FLGINP | Both Model I and III ROM | INPUT vs READ flag. 0=INPUT active; non-zero=READ. Also PRINT USING delimiter. 7 refs. |
| 40DFH-40E0H ↳16607 ↳TEMP | Both Model I and III ROM, N1 | General-purpose temp pointer (2 bytes). LET target, SYSTEM entry point. 8 refs. |
| 40E1H ↳16609 ↳AUTFLG | Both Model I and III ROM | AUTO command flag. 0=off; non-zero=active. |
| 40E2H-40E3H ↳16610 ↳AUTLIN | Both Model I and III ROM | AUTO current line number (2 bytes). |
| 40E4H-40E5H ↳16612 ↳AUTINC | Both Model I and III ROM | AUTO increment / CONT line number (2 bytes). |
| 40E6H-40E7H ↳16614 ↳SAVTXT | Both Model I and III ROM | Pointer to terminator of last executed statement (2 bytes). |
| 40E8H-40E9H ↳16616 ↳SAVSTK | Both Model I and III ROM | Saved SP (2 bytes). LD (40E8H),SP at 1D28H. 7 refs. |
| 40EAH-40EBH ↳16618 ↳ERRLIN | Both Model I and III ROM | Line number of last error (2 bytes). FFFFH=direct mode. |
| 40ECH-40EDH ↳16620 ↳DOT | Both Model I and III ROM, N1 | Dot line number (2 bytes). Used by EDIT, LIST, DELETE when '.' is typed. |
| 40EEH-40EFH ↳16622 ↳ERRTXT | Both Model I and III ROM | Last byte executed when error occurred (2 bytes). For RESUME. |
| 40F0H-40F1H ↳16624 ↳ONELIN | Both Model I and III ROM, N1 | ON ERROR GOTO target line (2 bytes). |
| 40F2H ↳16626 ↳ONEFLG | Both Model I and III ROM | Error trap active flag. Non-zero=inside ON ERROR handler. |
| 40F3H-40F4H ↳16627 ↳TEMP2 / VARPTR base | Both Model I and III ROM | Variable table start / decimal point in PRINT buffer (2 bytes). 8 refs. |
| 40F5H-40F6H ↳16629 ↳OLDLIN | Both Model I and III ROM | Last line before STOP/END/BREAK (2 bytes). |
| 40F7H-40F8H ↳16631 ↳OLDTXT | Both Model I and III ROM | End of last statement executed (2 bytes). For CONT. |
| 40F9H-40FAH ↳16633 ↳VARTAB | Both Model I and III ROM, N1 | Simple variables start / FOR/NEXT variable pointer (2 bytes). 12 refs. |
| 40FBH-40FCH ↳16635 ↳ARYTAB | Both Model I and III ROM, N1 | Array variable table start / function definition pointer (2 bytes). |
| 40FDH-40FEH ↳16637 ↳STREND | Both Model I and III ROM, N1 | Stack limit / end of arrays (2 bytes). 8 refs. |
| 40FFH-4100H ↳16639 ↳DATPTR | Both Model I and III ROM | DATA pointer / temp USR pointer (2 bytes). |
Variable Type Table and Trace Flag (4101H-411BH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4101H-411AH ↳16641 ↳DEFTBL | Both Model I and III ROM | Variable type table (26 bytes, A-Z). 2=int, 3=str, 4=sng, 8=dbl. All set to 4 on RUN. |
| 411BH ↳16667 ↳TRCFLG | Both Model I and III ROM | TRON/TROFF trace flag. Non-zero=trace on. |
Floating-Point Accumulator / Math Workspace (411CH-4130H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 411CH ↳16668 ↳DFACLO-1 | Both Model I and III ROM | Secondary math scratchpad (2+ bytes). 6 refs. |
| 411DH-4124H ↳16669 ↳DFACLO | Both Model I and III ROM | Primary Software Accumulator (8 bytes). DP uses all 8; SP uses 4121H-4124H; INT uses 4121H-4122H. 10 refs. |
| 411FH ↳16671 | Both Model I and III ROM | Math working register extension (2 bytes). |
| 4120H ↳16672 ↳FACLO-1 | Both Model I and III ROM | Math accumulator extension. Read during DP multiply/divide. |
| 4121H-4122H ↳16673 ↳FACLO | Both Model I and III ROM, N1 | FAC main register (2 bytes). 40 references - most referenced address in ROM. |
| 4123H-4124H ↳16675 ↳FAC-1 | Both Model I and III ROM, N1 | FAC exponent and mantissa MSB (2 bytes). 14 refs. |
| 4124H ↳16676 ↳FAC | Both Model I and III ROM | FAC exponent byte. 0=number is zero. 20 refs. |
| 4125H ↳16677 ↳FAC+1 | Both Model I and III ROM | Sign byte / string descriptor pointer. Bit 7: 80H=neg, 00H=pos. |
| 4126H ↳16678 ↳ARGLO-1 | Both Model I and III ROM | Last-operation flag / DP addition bit bucket. |
| 4127H-412EH ↳16679 ↳ARGLO / ARG-7 | Both Model I and III ROM | Alternate Software Accumulator (8 bytes). Second operand for arithmetic. 9 refs. |
| 412DH ↳16685 ↳ARG-1 | Both Model I and III ROM | Numeric string conversion buffer / ARG MSB. |
| 412EH ↳16686 ↳ARG | Both Model I and III ROM | ARG exponent / numeric conversion format byte. |
| 412FH ↳16687 ↳FBUFFR | Both Model I and III ROM | Extended conversion workspace. |
| 4130H-4149H ↳16688 ↳FBUFFR+1 | Both Model I and III ROM | Multipurpose work area (26 bytes). Number-to-ASCII buffer. RND seed. |
| 414AH ↳16714 ↳FBUFFR+27 | Both Model I and III ROM | DOS file I/O workspace / DP division temp (3+ bytes). |
| 414FH ↳16719 ↳FMLTT1 | Both Model I and III ROM | Display cursor character save byte. |
| 4150H-4151H ↳16720 ↳FMLTT2 | Both Model I and III ROM | Cursor address pointer (2 bytes). |
| 4151H ↳16721 ↳FBUFFR+34 | Both Model I and III ROM | Display driver state block. |
Disk BASIC Entry Points / Driver Vector Table (4152H-41E4H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4152H ↳16722 ↳ERCALL | Both Model I and III ROM | Start of driver vector table. 28 JP stubs (to 012DH) + 21 RET stubs at boot. CVI vector. |
| 4155H ↳16725 | Both Model I and III ROM | Disk BASIC: FN / VARPTR vector. |
| 4158H ↳16728 | Both Model I and III ROM | Disk BASIC: CVS vector. |
| 415BH ↳16731 | Both Model I and III ROM | Disk BASIC: DEF vector. |
| 415EH ↳16734 | Both Model I and III ROM | Disk BASIC: CVD vector. |
| 4161H ↳16737 | Both Model I and III ROM | Disk BASIC: EOF vector. |
| 4164H ↳16740 | Both Model I and III ROM | Disk BASIC: LOC vector. |
| 4167H ↳16743 | Both Model I and III ROM | Disk BASIC: LOF vector. |
| 416AH ↳16746 | Model III ROM | Disk BASIC: MKI$ vector (Model III only). |
| 416DH ↳16749 | Model III ROM | Disk BASIC: MKS$ vector (Model III only). |
| 4170H ↳16752 | Both Model I and III ROM | Disk BASIC: MKD$ vector. |
| 4173H ↳16755 | Both Model I and III ROM | Disk BASIC: CMD vector. |
| 4176H ↳16758 | Both Model I and III ROM | Disk BASIC: TIME$ / SGN function vector. |
| 4177H ↳16759 | Model III ROM | Disk bootstrap pointer save. HL written at 37DFH. |
| 4179H ↳16761 | Both Model I and III ROM | Disk BASIC: OPEN vector. |
| 417CH ↳16764 | Both Model I and III ROM | Disk BASIC: FIELD vector. |
| 417FH ↳16767 | Both Model I and III ROM | Disk BASIC: GET vector. |
| 4182H ↳16770 | Both Model I and III ROM | Disk BASIC: PUT vector. |
| 4185H ↳16773 | Both Model I and III ROM | Disk BASIC: CLOSE vector. |
| 4188H ↳16776 | Both Model I and III ROM | Disk BASIC: LOAD vector. |
| 418BH ↳16779 | Both Model I and III ROM | Disk BASIC: MERGE vector. |
| 418EH ↳16782 | Both Model I and III ROM | Disk BASIC: NAME vector. |
| 4191H ↳16785 | Both Model I and III ROM | Disk BASIC: KILL vector. |
| 4194H ↳16788 | Both Model I and III ROM | Disk BASIC: & (ampersand) vector. |
| 4197H ↳16791 | Both Model I and III ROM | Disk BASIC: LSET vector. |
| 419AH ↳16794 | Both Model I and III ROM | Disk BASIC: RSET vector. |
| 419DH ↳16797 | Both Model I and III ROM | Disk BASIC: INSTR vector. |
| 41A0H ↳16800 | Both Model I and III ROM | Disk BASIC: SAVE vector. |
| 41A3H ↳16803 | Both Model I and III ROM | Disk BASIC: LINE vector. |
| 41A6H ↳16806 ↳RETCNT | Both Model I and III ROM | Error processing vector. RET in cassette BASIC; JP to long error messages in Disk BASIC. Start of 21 hookable RET stubs. |
| 41A9H ↳16809 | Both Model I and III ROM | DOS link for USR N (3 bytes). Called at 27FEH. |
| 41ACH ↳16812 | Both Model I and III ROM | DOS link for READY prompt. Called at 1A1CH. |
| 41AFH ↳16815 | Model I ROM | DOS exit from 0368H. Keyboard line input. |
| 41AFH ↳16815 | Model III ROM | DOS link for INKEY$ / keyboard input. Called at 0368H. |
| 41B2H ↳16818 | Both Model I and III ROM | DOS exit from 1AA1H. After BASIC line tokenized. |
| 41B5H ↳16821 | Both Model I and III ROM | DOS exit from 1AECH. After program line table updated. |
| 41B8H ↳16824 | Both Model I and III ROM | DOS exit from 1AF2H. After above + CLEAR. |
| 41BBH ↳16827 | Both Model I and III ROM | DOS exit from 1B8CH, 1DB0H. NEW/END processing, close files. |
| 41BEH ↳16830 | Both Model I and III ROM | PRINT# / PRINT output hook. Called from 2174H. Level II: RESET button vector. |
| 41C1H ↳16833 | Both Model I and III ROM | Byte output to any device. Called from 032CH. |
| 41C4H ↳16836 | Both Model I and III ROM | ROM KB scan hook. Called from 0358H. INKEY$ + BREAK check. |
| 41C7H ↳16839 | Both Model I and III ROM | DOS exit from 1EA6H. RUN with filename/line number. |
| 41CAH ↳16842 | Both Model I and III ROM | DOS exit from 206FH. Print processing, check for PRINT#. |
| 41CDH ↳16845 | Both Model I and III ROM | DOS exit from 20C6H. After number to ASCII, before print. |
| 41D0H ↳16848 | Both Model I and III ROM | DOS exit from 2103H. After PRINT sends CR. |
| 41D3H ↳16851 | Both Model I and III ROM | DOS exit from 2108H, 2141H. Comma tabs and TAB statement. |
| 41D6H ↳16854 | Both Model I and III ROM | INPUT# hook. Called from 219EH. |
| 41D9H ↳16857 | Both Model I and III ROM | Left-side MID$ hook. JP at 2AECH. Only DOS exit that's a JP, not CALL. |
| 41DCH ↳16860 | Both Model I and III ROM | READ/INPUT variable assignment. Called from 222DH. |
| 41DFH ↳16863 | Both Model I and III ROM | DOS exit from 2278H, 2B44H. After INPUT assign + LIST processing. |
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 | SYSTEM command hook. Called from 02B2H before *? prompt. |
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 ↳BUFINI-3 | Model III ROM | Video Display DCB (8 bytes). Three separate DCBs: Video(41E5H), Printer(41EDH), Keyboard(41F5H). 24 bytes from 36F9H copied at 0460H. IX-indexed addressing. |
| 41E8H ↳16872 ↳BUFINI | Both Model I and III ROM | RS-232 input buffer / BASIC I/O buffer start. Model I: 256-byte buffer. Model III: Video DCB cursor field. |
| 41EDH-41F4H ↳16877 | Model III ROM | Printer DCB (8 bytes). Same structure as Video DCB. |
| 41F0H ↳16880 ↳RSTX | Both Model I and III ROM | RS-232 output buffer / Printer DCB position field. |
| 41F4H ↳16884 | Both Model I and III ROM | Value 103. First of 2 to change LINE to LPRINT. |
| 41F5H-41FCH ↳16885 | Both Model I and III ROM | Value 32. Second of 2 for LINE->LPRINT. Model III: Keyboard DCB start (8 bytes). |
| 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. |
| 41F9H ↳16889 | Both Model I and III ROM, N1 | $RSINIT: Parity/word/stop-bit code. Default 108. |
| 41FAH ↳16890 | Both Model I and III ROM, N1 | $RSINIT: Wait switch. 0=wait, non-zero=no wait. |
| 41FDH ↳16893 | Model III ROM | Disk operation status / repeating key LSB save. Written at 3408H. |
| 41FEH ↳16894 | Model III ROM | Disk drive select / repeating key row save. Read at 3141H; written at 3404H. |
| 41FFH-4200H ↳16895 | Model III ROM | Disk directory pointer / repeating key max delay (2 bytes). 1500/150 decimal. |
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 | Model III ROM, N1 | Disk sector pointer / key repeat current delay (2 bytes). |
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 | Disk error vector / BREAK key vector (3 bytes). Init to JP 022EH. |
| 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 | Model III ROM | Write-byte-to-cassette routine pointer (2 bytes). 500 baud=3241H, 1500=32BAH. |
| 420EH-420FH ↳16910 | Model III ROM | Read-byte-from-cassette routine pointer (2 bytes). 500 baud=3203H, 1500=32CAH. |
| 4210H ↳16912 | Model III ROM | Port ECH output bits / device selector. 14 refs. Bit 0=clock, 1=cassette motor, 2=32-char mode, 3=alt charset, 4=I/O bus(M4), 5=video waits(M4), 6=CPU speed(M4). Replaces Model I 403DH. |
| 4211H ↳16913 | Model III ROM | Cassette baud select. 0=500, non-zero=1500. Also interrupt mask/NMI flag. |
| 4212H ↳16914 | Model III ROM | Cassette blinker counter / disk retry counter. |
| 4213H ↳16915 | Model III ROM | Default interrupt vector setting / disk sector size code. Output to E0H on cassette-off. |
| 4214H ↳16916 | Model III ROM | Video scroll protect (0-7 lines) / BASIC program loaded flag. |
| 4216H ↳16918 | Model III ROM | Clock: Heartbeat counter. |
| 4217H ↳16919 | Model III ROM | Clock: Seconds (00-59). POKEable. |
| 4218H ↳16920 | Model III ROM, N1 | Clock: Minutes (00-59). POKEable. |
| 4219H ↳16921 | Model III ROM | Clock: Hours (00-23). POKEable. |
| 421AH ↳16922 | Model III ROM | Clock: Year (00-99). POKEable. |
| 421BH ↳16923 | Model III ROM | Clock: Day (01-31). POKEable. |
| 421CH ↳16924 | Model III ROM | Clock: Month (01-12). POKEable. |
| 421DH ↳16925 | Model III ROM | I/O Router DCB: Type=2 (Write Only). Also extended device vector. |
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 | Model III ROM | Control key flag. 1FH=control sequence; FFH=normal. Also disk directory hash workspace. |
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. |
| 4267H ↳16999 | N1 | NEWDOS/80: If the Carry Flag is set, then the sector number is too high! JUMP to 4267H. |
| 427EH ↳17022 | N1 | NEWDOS/80: Load Register A with the drive number from 427EH. |
| 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. |
| 4283H ↳17027 | N1 | NEWDOS/80: Load Register A with the disk name pointer from DOS parameter area 4283H. |
| 4287H ↳17031 | N1 | NEWDOS/80: If NZ FLAG (DRQ active), JUMP to 4287H - ROM routine to handle rapid data transfer. |
| 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. |
| 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. |
| 4290H ↳17040 | N1 | NEWDOS/80: Load Register A with the upper display limit from 4290H. |
| 4291H ↳17041 | N1 | NEWDOS/80: Point DE to 4291H, the destination - active drive parameter area. |
| 4296H ↳17046 | N1 | NEWDOS/80: Load HL with 4296H - address of default drive number in system area. |
| 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. |
| 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. |
| 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. |
| 42A9H ↳17065 | N1 | NEWDOS/80: Fetch delay value from boot sector. |
| 42B6H ↳17078 | N1 | NEWDOS/80: If the NZ FLAG (Not Zero) has been set, JUMP to 42B6H to skip over incrementing the track. |
| 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. |
| 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. |
| 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. |
| 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 | Model III ROM | BASIC command-line buffer start (Model III). 3AH,00H,2CH prefix + 256-byte buffer + zero at 43E8H. |
| 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 | Model III ROM | BASIC cold-start stack (Model III). SP at 00ACH. Replaces Model I 41F8H. |
| 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). |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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 | Model III ROM | End-of-RAM test marker (Model III). Replaces Model I 42E8H. |
| 43F0H ↳17392 | N1 | NEWDOS/80: Point HL to the boolean flag storage table at 43F0H. |
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. |
| 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. |
| 440DH ↳17421 | T1, N1 | TRSDOS 2.3 SVC Jump Table entry: Write Sector (3 bytes). SVC code for physical disk write operations via SYS0. |
| 4411H ↳17425 | T1, N1 | TRSDOS 2.3 SVC Jump Table entry: Memory Size Query (3 bytes). Returns DOS memory size (from 4049H) in HL. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
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 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. |
| 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. |
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. |
| 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. |
| 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. |
| 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. |
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. |
| 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. |
| 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. |
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. |
| 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. |
| 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. |
| 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. |
| 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. |
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. |
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. |
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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
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 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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). |
| 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. |
| 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. |
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. |
| 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. |
| 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. |
| 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. |
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. |
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. |
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. |
| 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.). |
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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
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. |
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. |
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 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 |
| 400FH ↳16399 ↳RST30 | Model III ROM, T3 | RST 30H vector: JP to DEBUG breakpoint handler |
| 402DH ↳16429 ↳SYS1IN | Model III ROM, T3 | Normal return-to-DOS entry point (JP to S1RST1 via DO 10,1) |
| 4030H ↳16432 ↳ABORT | Model III ROM, T3 | Abort operation, re-entry to DOS (DO 20,1) |
| 4033H ↳16435 ↳ROMCIO | Model III ROM, T3 | Continuation of ROM character I/O dispatcher (JP CIO1) |
| 4046H ↳16454 | Model III ROM, T3 | Real-time clock interrupt vector 2 (JP 3529H in ROM). Handles cursor flash and clock/calendar update. |
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 |
| 4225H-4264H ↳16933 ↳COMAND | Model III ROM, T3 | 64-byte command line input buffer |
| 4265H-426CH ↳16997 ↳MIKE1 | Model III ROM, T3 | 8-byte work area |
| 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) |
| 4272H-4273H ↳17010 ↳BASIC1 | Model III ROM, T3 | BASIC general purpose save area 1 (2 bytes) |
| 4274H-4275H ↳17012 ↳BASIC2 | Model III ROM, T3 | BASIC general purpose save area 2 (2 bytes) |
| 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) |
| 427EH ↳17022 ↳SSYS12 | Model III ROM, T3 | BASIC renumber overlay vector (DO 00,12) |
| 4281H ↳17025 ↳SYSS12 | Model III ROM, T3 | BASIC compress function overlay vector (DO 10,12) |
| 4284H ↳17028 ↳SSYS13 | Model III ROM, T3 | BASIC sort function overlay vector (DO 00,13) |
| 4287H ↳17031 ↳SYSS13 | Model III ROM, T3 | BASIC Julian date function overlay vector (DO 10,13) |
| 428AH ↳17034 ↳SSSY13 | Model III ROM, T3 | BASIC cross-reference function overlay vector (DO 20,13) |
| 428DH ↳17037 ↳SSYS14 | Model III ROM, T3 | USER: return LFN and drive overlay vector (DO 00,14) |
| 4290H ↳17040 ↳SSSY14 | Model III ROM, T3 | USER: return directory to RAM overlay vector (DO 10,14) |
| 4293H ↳17043 ↳SSYS15 | Model III ROM, T3 | Spare/undefined overlay vector (DO 00,15) |
| 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) |
| 42A2H ↳17058 ↳BACKUP | Model III ROM, T3 | Disk backup overlay vector (DO 10,7) |
| 42A5H ↳17061 ↳SSYS8 | Model III ROM, T3 | HELP command overlay vector (DO 10,8) |
| 42A8H ↳17064 ↳SSYS9 | Model III ROM, T3 | Library commands part 2 overlay vector (DO 10,9) |
| 42ABH ↳17067 ↳SSYS11 | Model III ROM, T3 | Library commands part 3 overlay vector (DO 10,11) |
TRSDOS 1.3 SYS0 System Flags and Control (42AEH-42FFH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 42AEH ↳17070 ↳BREAK | Model III ROM, T3 | Break key kill vector (JP KILBRK). Patched to C9H=RET to activate break key. |
| 42B1H-42B2H ↳17073 ↳GOSAVE | Model III ROM, T3 | DO command save address (initialized to KEYBDZ) |
| 42B3H ↳17075 ↳DIFULT | Model III ROM, T3 | Master/default drive number (1 byte, initialized to 0) |
| 42B4H ↳17076 ↳CFLAG | Model III ROM, T3 | Flag: 55H = clear user memory on next command entry |
| 42B5H-42B6H ↳17077 ↳INITD | Model III ROM, T3 | Flag: DOS has been initialized (2 bytes) |
| 42B7H-42B9H ↳17079 ↳DTSAVE | Model III ROM, T3 | User date save area (3 bytes: MM/DD/YY) |
| 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 |
| 42FFH ↳17151 ↳SCAFLG | Model III ROM, T3 | System/SCA flag byte |
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 |
TRSDOS 1.3 SYS0 User Disk Jump Table (4400H-4452H)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4400H ↳17408 ↳DELLY | Model III ROM, T3 | Long delay routine: 8 PUSH AF/POP AF pairs then RET |
| 4404H ↳17412 ↳SDELAY | Model III ROM, T3 | Short delay routine: 4 PUSH AF/POP AF pairs then RET |
| 4409H ↳17417 ↳ERROR | Model III ROM, T3 | Error handler: PUSH AF then loads SYS4 overlay (DO 00,4) |
| 440BH ↳17419 ↳DEBUG | Model III ROM, T3 | Debug entry: PUSH AF then loads SYS5 overlay (DO 00,5) |
| 440DH-440EH ↳17421 ↳MEMEND | Model III ROM, T3 | End of user memory pointer (2 bytes, default 7FFFH) |
| 440FH ↳17423 ↳MAXDRV | Model III ROM, T3 | Number of disk drives in system (1 byte) |
| 4410H ↳17424 ↳FLAG1 | Model III ROM, T3 | Last system overlay number loaded (1 byte) |
| 4411H-4412H ↳17425 ↳MEM2 | Model III ROM, T3 | Mirror of MEMEND end-of-memory pointer (2 bytes) |
| 4413H-4414H ↳17427 ↳DATA3 | Model III ROM, T3 | Start of user RAM pointer (default 5200H = SYSHI) |
| 4415H ↳17429 ↳SSYS10 | Model III ROM, T3 | BASIC directory command overlay vector (DO 00,10) |
| 4418H ↳17432 ↳SYNTAX | Model III ROM, T3 | Filespec syntax parser overlay vector (DO 40,1) |
| 441BH ↳17435 ↳CURDOS | Model III ROM, T3 | DOS version byte: 13H indicates TRSDOS version 1.3. BASIC checks this. |
| 441CH ↳17436 ↳INIT | Model III ROM, T3 | Initialize/open new file overlay vector (DO 20,2) |
| 441FH ↳17439 ↳DRIVE | Model III ROM, T3 | Current drive select bit pattern (1 byte) |
| 4420H ↳17440 ↳OPEN | Model III ROM, T3 | Open existing file overlay vector (DO 10,2) |
| 4423H ↳17443 ↳CURDRV | Model III ROM, T3 | Current drive number in use (1 byte, 0-3) |
| 4424H ↳17444 ↳CLOSE | Model III ROM, T3 | Close a file overlay vector (DO 10,3) |
| 4427H ↳17447 ↳OVLFLG | Model III ROM, T3 | Overlay-in-progress flag (1 byte) |
| 4428H ↳17448 ↳KILL | Model III ROM, T3 | Kill a file entry point (JP KILFIL) |
| 442BH ↳17451 ↳DULFLG | Model III ROM, T3 | Dual drive mode on/off flag (1 byte) |
| 442CH ↳17452 ↳LDPGM | Model III ROM, T3 | Load program into RAM entry point (JP LDPGM1) |
| 442FH ↳17455 ↳EXEC | Model III ROM, T3 | Load and execute program entry point (JP EXPGM1) |
| 4432H ↳17458 ↳READ | Model III ROM, T3 | Read a record entry point (JP READ1) |
| 4435H ↳17461 ↳WRITE | Model III ROM, T3 | Write without verify entry point (JP WRITE1) |
| 4438H ↳17464 ↳VERF | Model III ROM, T3 | Write with verify entry point (JP WRITE1) |
| 443BH ↳17467 ↳REWIND | Model III ROM, T3 | Rewind file to beginning entry point (JP REW) |
| 443EH ↳17470 ↳POSN | Model III ROM, T3 | Position file to record N entry point (JP POSN1) |
| 4441H ↳17473 ↳BACKSP | Model III ROM, T3 | Backspace one record entry point (JP BKSP) |
| 4444H ↳17476 ↳POSEOF | Model III ROM, T3 | Position to end of file entry point (JP PEOF) |
| 4447H ↳17479 ↳PUTEXT | Model III ROM, T3 | Add extension to filespec overlay vector (DO 50,1) |
| 444AH ↳17482 ↳MULT | Model III ROM, T3 | 16-bit unsigned multiply entry point (JP DMULT) |
| 444DH ↳17485 ↳DIV | Model III ROM, T3 | 16-bit unsigned divide entry point (JP DIVIDE) |
| 4450H ↳17488 ↳SWITCH | Model III ROM, T3 | Table comparison/switch routine overlay vector (DO 60,1) |
TRSDOS 1.3 SYS0 System DCB and Saves (4453H-44ABH)
| Address (Hex/Dec/Label) | Source | Description |
|---|---|---|
| 4453H-4456H ↳17491 ↳DIRTRK | Model III ROM, T3 | Directory track number table (4 bytes, one per drive, all initialized to 17) |
| 4457H-445EH ↳17495 ↳SEKTRK | Model III ROM, T3 | Last-track-used table (8 bytes: 4 drives x 2 sides, all initialized to 0) |
| 445FH ↳17503 ↳CSIDE | Model III ROM, T3 | Current side for disk read/write (0 or 1) |
| 4460H ↳17504 ↳OLDSID | Model III ROM, T3 | Previous side used (0 or 1) |
| 4461H-4496H ↳17505 ↳DCB | Model III ROM, T3 | System DCB (50 bytes). Initialized to 'FILENAME/EXT.PASSWORD:D' template. |
| 4497H ↳17559 ↳MDCB | Model III ROM, T3 | Internal system files DCB start (MTYPE byte, initialized to 80H=disk type) |
| 449AH-449BH ↳17562 ↳MBUFF | Model III ROM, T3 | System DCB buffer pointer (initialized to BUFF2=4D00H) |
| 44A9H-44AAH ↳17577 ↳SAVE2 | Model III ROM, T3 | Temporary storage: caller return address for SAVER routine |
| 44ABH-44ACH ↳17579 ↳SAVE3 | Model III ROM, T3 | Temporary storage: DCB pointer for SAVER routine |
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) |