Note: Tandy tended to allocate ports in groups of 4.
Port 5F - Sprinter III:
The SPRINTER III was controlled both by a jumper on the card and a software switch. The jumper on the card set the speed multiplier and that was the only way to control that. The software control was just on (high) or off (low).
| Port | Command | Effect |
| 5FH (95) | OUT 95,X (X odd) | High speed ON (bit 0 = 1). OUT 95,1 is the usual form. |
| 5FH (95) | OUT 95,X (X even) | High speed OFF / normal speed (bit 0 = 0). OUT 95,0 is the usual form. |
Block 75/79 - Orchestra-90:
The Orchestra-90 is a pair of simple 8-bit digital-to-analog converters - one per stereo channel, with no command, status, or control registers
Each channel's output is the sum of the currently sounding voices: the player accumulates the active voice samples in the accumulator (ADD A,(HL) per voice) and then writes the mixed byte to that channel's port. The two ports are written one after the other
| Port | Use |
| 79H (121) | Orchestra-90 D/A converter, channel A. Write-only. The player writes the mixed sample byte for one stereo channel with OUT (79H),A with 00H corresponding to the converter's mid/silent level. |
| 75H (117) | Orchestra-90 D/A converter, channel B. Write-only. The other stereo channel's mixed sample byte is written with OUT (75H),A, immediately following the write to 79H in the same loop iteration. |
Note: During playback the driver also manipulates port ECH (the Model 4 control / wait-state register - LD A,10H : OUT (0ECH),A and runs with interrupts disabled. This is timing setup for the cycle-counted sample loop, not a function of the Orchestra-90 hardware itself
7FH - Shuffleboard III Memory Control (CP/M):
The Memory Merchant Shuffleboard III (1981/1982) is a plug-in board that adds a full 64K CP/M 2.2 environment to the Model III. It plugs into the Z-80 socket and one nearby socket with no cut traces or soldering, supplying an onboard Z-80A, 16K of RAM, and a CP/M boot ROM. The board is controlled entirely by writing a single map byte to output port 7FH (127), which reconfigures the Model III's memory map between native TRS-80 and CP/M layouts.
| Bit | Function |
| Bit 0 | Map enable. 0 = TRS-80 memory configuration; 1 = CP/M memory configuration. |
| Bit 1 | ROM enable. 0 = CP/M boot ROM disabled; 1 = CP/M boot ROM enabled (mapped over low memory). |
| Bit 2 | RAM enable. 0 = 16K Shuffleboard RAM disabled; 1 = 16K Shuffleboard RAM enabled (block 4 at C000H-FFFFH). |
| Bits 3-7 | Not used. |
Although three bits give eight combinations, only four map-byte values are used:
| Map Byte | Configuration |
| 0 | Normal TRS-80: Level III ROM at 0000H-37FFH, keyboard at 3800H-3BFFH, video at 3C00H-3FFFH, 48K RAM in three blocks from 4000H. Users and programs always see this or map byte 5. |
| 5 | 64K CP/M: four 16K RAM blocks filling 0000H-FFFFH (block 4 is the onboard Shuffleboard RAM at C000H-FFFFH). |
| 7 | CP/M system config I (transparent - used during console/disk I/O): 2K CP/M ROM at 0000H, ROM-expansion reserve to 1FFFH, then RAM blocks 1-4. Never seen by user programs. |
| 3 | CP/M system config II (transparent - used during console/disk I/O). Never seen by user programs. |
80H - Radio Shack Graphics Board (Model III ONLY):
The Model III High-Resolution Graphics Board operates using port-mapped addressing and is based on the MC6845 CRTC chip.
| Port | Use |
| 80H | Input: OPTIONSRD* (Not used) Output: OPTIONS* (CPU writes to Options Register)
Port 80H Bit Map:
- Bit 0: GRAPHICS/ALPHA*. Selects which side fo the video output multiplexer is active.
- Bit 1: Not used
- Bit 2: X Register Decrement/Increment*
- Bit 3: Y Register Decrement/Increment*
- Bit 4: Read X Register Sit/Clock*
- Bit 5: Write X Register Sit/Clock*
- Bit 6: Read Y Register Sit/Clock*
- Bit 7: Write Y Register Sit/Clock*
|
| 81H | Input: VIDRAMRD* (CPU reads from Video RAM) Output: VIDRAM* (CPU writes to Video RAM) |
| 82H | Input: YREGRD* (CPU reads from the Y Register) Output: YREG* (CPU writes to the Y Register) |
| 83H | Input: XREGRD* (CPU reads from the X Register) Output: XREG* (CPU writes to the X Register) |
| 84H-87H | Dual addressed. These ports are mapped to the identical functions as 80H-83H. |
| 88H-8FH | CRTC Enable (VSEL*): Ports 88H and 89H are used to program the internal registers of the CRTC. Because A1 and A2 are not terms in the decoding equation, the CRTC ports are dual addressed four times within the 88H through 8FH range. |
80H - Radio Shack Graphics Board (Model 4 ONLY):
| Port | Use |
| 80H | Input: Reserved. Output: Graphics board register |
| 81H | Input: Graphics board RAM read. Output: Graphics board RAM write. |
| 82H | Input: Reserved. Output: Graphics board Y register. |
| 83H | Input: Reserved. Output: Graphics board X register. |
80H-83H - Grafyx Solution (Micro-Labs, Model 4):
The Grafyx Solution is a third-party high-resolution graphics board from Micro-Labs, Inc., and is not the Radio Shack graphics board documented above; the two are competing products that happen to share the 80H-8FH port region. On the Model 4 it gives a maximum resolution of 640 x 240 (153,600 individually accessible points) and carries 20,480 bytes of its own read/write memory that does not occupy the TRS-80 address space — 19,200 bytes hold the 640 x 240 bitmap (saved as 75 consecutive 256-byte records) and the remaining 1,280 bytes are free for the user. Because the board's memory is reached only through the X/Y address ports rather than being memory-mapped, it does not conflict with normal TRS-80 RAM.
The board is programmed entirely through four consecutive ports. The manual documents these in decimal (the values used by the BASIC OUT and INP statements); the hexadecimal equivalents are shown for cross-reference.
| Port | Use |
| 128 (80H) | X register. Selects the byte column, value 0-79. Each X value addresses one byte = 8 horizontal dot positions, so the X coordinate (0-639) is divided by 8 and the remainder discarded: OUT 128,INT(X/8). |
| 129 (81H) | Y register. Selects the scan line, value 0-239, sent directly: OUT 129,Y. |
| 130 (82H) | Data byte (read/write). The 8-bit value at the current X,Y address; bit 7 (value 128) is the leftmost dot, bit 0 (value 1) the rightmost. Read the current byte with A=INP(130), then OR in a bit to set it or AND with 255 minus the bit value to clear it, and write it back with OUT 130,A. |
| 131 (83H) | Control register. Selects the display mode and the auto increment/decrement behaviour of the X and Y registers (bit map below). |
Control register (port 131 / 83H) bit map: Each function has a "sum value"; add the sum values of every bit you want ON to get the value to output. An asterisk (*) marks an active-low/complemented function as named in the manual.
| Bit | Sum value | Definition |
| 0 | 1 | graphics / alpha* |
| 1 | 2 | 640 x 240 / 512 x 192* (resolution / mode select) |
| 2 | 4 | X register dec/inc* (1 selects decrement) |
| 3 | 8 | Y register dec/inc* (1 selects decrement) |
| 4 | 16 | X clock-after-read* (0 clocks after read) |
| 5 | 32 | Y clock-after-read* |
| 6 | 64 | X clock-after-write* (0 clocks after write) |
| 7 | 128 | Y clock-after-write* |
Setting the right bits lets the X and/or Y address auto-increment or auto-decrement after each data read and/or write, so a horizontal or vertical run of bytes can be written without re-sending the address each time. For example, to auto-increment X after every write in 640 x 240 mode, turn on bits 0, 1, 4, 5, and 7, giving 1+2+16+32+128 = 179.
Common control values:
| Statement | Effect |
| OUT 131,252 | Normal display, no hi-res (computer behaves as if the board were not installed) |
| OUT 131,253 | Hi-res 640 x 240 (512 x 192 in Model III mode) with text overlay |
| OUT 131,255 | Hi-res 640 x 240 with the text screen turned off |
The three basic modes — Normal, hi-res with text overlay, and hi-res with text off — are selected by the two least-significant bits of the control byte. Pressing the orange reset key also forces the board back to Normal Display mode. The contents of graphics memory are preserved across mode changes, so a picture re-appears when hi-res is re-enabled.
84H - Operation Register (Model 4 ONLY):
| Port | Use |
| 84H | Mod 4 - various controls. 80 micro, March 84, p. 122. Input is reserved. Output:
- Bits 1-0: Video memory, keyboard memory, and Model III ROM.
- 1|0 ....
- 0|0: Model III ROMs Enabled, Video/Keyboard = Model 3
- 1|0: Model III ROMs Disabled, Video/Keyboard = Model 3
- 0|1: Model III ROMs Disabled, Video/Keyboard = Model 4 (In)
- 1|0: Model III ROMs Disabled, Video/Keyboard = Model 4 (Out)
- Bit 2: Video display mode (0 = 64x16, 1 = 80x24).
- Bit 3: Reverse Video.
- Bits 6-4: RAM bank select
- 6|5|4 ....
- 0|0|0: Lower 32K Ram in Bank 0, Upper 32K RAM in Bank 1
- 0|1|0: Lower 32K Ram in Bank 0, Upper 32K RAM in Bank 2
- 0|1|1: Lower 32K Ram in Bank 0, Upper 32K RAM in Bank 3
- 1|1|0: Lower 32K Ram in Bank 2, Upper 32K RAM in Bank 1
- 1|1|1: Lower 32K Ram in Bank 3, Upper 32K RAM in Bank 1
- Bit 7: Video page select (64x16 mode): 0 = page 0, 1 = page 1.
|
84H - Operation Register (Model 4P ONLY):
| Port | Use |
| 84H | Mod 4P - Various Operation Controls - Write Only
- Bits 1-0: Mode Select*
- 0|0: Mode 0
- 0|1: Mode 1
- 1|0: Mode 2
- 1|1: Mode 3
- Bit 2: Video display mode (0 = 64x16, 1 = 80x24).
- Bit 3: Reverse Video (0=Inverse Video Disabled, 1=Enabled).
- Bit 4: Page to be mapped as a new page (0=U64K/L32K, 1=U64K/U32K)
- Bit 5: Enable/Disable Mapping of a New Page (0=Page Mapping Disabled, 1=Page Mapping Enabled)
- Bit 6: Point to the page where the new page is to be mapped (0=L64/U32K Page, 1=L64K/L32K Page)
- Bit 7: Video Memory Page (0=Page 0 of Video Memory, 1=Page 1 of Video Memory)
|
Mode Select combined with the Port 9C ROM Enabled/Disabled form the memory map for the Model 4P:
| Mode | 84H Bit 1 | 84H Bit 0 | 9CH Bit 0 | Map |
| 0 | 0 | 0 | 1 | | Address | Allocation | Amount |
|---|
| 0000‑0FFF | Boot ROM | 4K | | 1000-37FF | RAM (Read Only) | 10K | | 37E8-37E9 | Printer Status (Read Only) | 2 | | 3800-3BFF | Keyboard | 1K | | 3C00-3FFF | Video | 1K | | 4000-FFFF | RAM | 48K |
|
| 0 | 0 | 0 | 0 | | Address | Allocation | Amount |
|---|
| 0000‑37FF | RAM (Read Only) | 14K | | 37E8-37E9 | Printer Status (Read Only) | 2 | | 3800-3BFF | Keyboard | 1K | | 3C00-3FFF | Video | 1K | | 4000-FFFF | RAM | 48K |
|
| 1 | 0 | 1 | 1 | | Address | Allocation | Amount |
|---|
| 0000‑0FFF | Boot ROM | 4K | | 0000-0FFF | RAM (Write Only) | 4K | | 1000-37FF | RAM | 10K | | 3800-3BFF | Keyboard | 1K | | 3C00-3FFF | Video | 1K | | 4000-FFFF | RAM | 48K |
|
| 1 | 0 | 1 | 0 | | Address | Allocation | Amount |
|---|
| 0000‑37FF | RAM | 14K | | 3800-3BFF | Keyboard | 1K | | 3C00-3FFF | Video | 1K | | 4000-FFFF | RAM | 48K |
|
| 2 | 1 | 0 | N/A | | Address | Allocation | Amount |
|---|
| 0000‑F3FF | RAM | 64K | | F400-F7FF | Keyboard | 1K | | F800-FFFF | Video | 2K |
|
| 3 | 1 | 1 | N/A | | Address | Allocation | Amount |
|---|
| 0000‑FFFF | RAM | 64K |
|
Block 88/89/8A/8B - CRT Control
| Port | Use |
| 88H | CRT controller control register. |
| 89H | CRT controller data register. |
| 8AH | CRT controller control register. |
| 8BH | CRT controller data register. |
Block 8C/8D/8E/8F - Graphics Board:
| Port | Use |
| 8CH-8FH | Graphics board select 2. |
Block 90/91/92/93 - Sound Port (Model 4 ONLY):
| Port | Use |
| 90H | Model 4 sound port. Any of the sound routines used on the Model I and Model III that uses port FFH can be changed to this and then the Model 4's built in speaker can be used! Only BIT 0 was used for output: 0=Low, 1=High. |
Block 9C/9D/9E/9F - Boot ROM (Model 4P Only):
| Port | Use | Read | Write |
| 9CH |
Switch the Model 4P Boot ROM in or OUT. |
N/A/td>
| Bit 0: 0=Boot ROM Disabled, 1=Boot ROM Enabled |
Block B0-BC - NewClock-80 (Model III and Model 4):
The Alpha Products NewClock-80 uses the identical port set and bit layout on the Model III and Model 4 as it does on the Model I - the High Port configuration occupies ports 176-188 (B0H-BCH), one BCD digit per port, each masked with AND 15 (or AND 3 for the capped tens digits). For the full register map, status-bit definitions, and read/set examples, see the NewClock-80 entry under Ports (Model I). The Model III version of the board also works in the Model 4.
Enabling the Ports (Model III and Model 4)
Unlike the Model I, the Model III and Model 4 do not expose the external I/O bus by default. Before any INP or OUT to the NewClock-80 ports will work, the external I/O bus must be enabled by setting bit 4 of Port ECH (236 decimal). From BASIC:
That enables the ports until the next OUT 236 clears the bit. BASIC re-issues an OUT 236 each time a program exits to the >_ prompt, which disables them again. To stop BASIC from doing this, on a Model III you can:
Do not execute that POKE on a Model I. Because Port ECH also controls cassette, video, character set, and (on the Model 4) CPU clock speed, drivers should read the current ECH shadow value, OR in only bit 4, and write the whole byte back rather than overwriting the other control bits. See the Port ECH entry for the full bit map.
Assembly-Language Enable
In machine code the same enable is done by OR-ing bit 4 (10H) into the cached ECH control byte and writing it out. On the Model III the ECH shadow is kept at 4210H; on the Model 4 it is at 0076H. For example (Model III):
LD A,(4210H) ; current ECH control byte
OR 10H ; set bit 4 (enable I/O bus)
LD (4210H),A ; update the shadow
OUT (0ECH),A ; enable external I/O ports
The clock digits are then read with IN A,(C) stepping C down through the port addresses, masking each nibble (AND 0FH, or AND 03H for the day-tens and hour-tens digits) and combining the tens and ones digits into a BCD value.
B6H - ARCNET (Model 4P Only):
| Port | Use |
| B6H | Arcnet Board (Input/Output). |
C0H-CFH - Hard Drive:
| Port | Use |
| C0H | Write Protection. Write/Output: Reserved. Read/Input: Hard disk write protect:
- Bit 0 (INTRQ): Interrupt Request
- Bit 1 (HWPL): If set, at least one hard drive is currently write protected
- Bit 4 (WPD4): If set, hard drive 4 is currently write protected
- Bit 5 (WPD3): If set, hard drive 3 is currently write protected
- Bit 6 (WPD2): If set, hard drive 2 is currently write protected
- Bit 7 (WPD1): If set, hard drive 1 is currently write protected
|
| C1H | Hard disk controller board control register (Read/Write). ROM equate: HCNTL.
- Bit 2: RUMORED to enable wait state support on a 8X300 Controller Board
- Bit 3: If set, enable controller
- Bit 4: If set, reset controller
Known command values used by the Network 4 Transporter ROM (SERVR routine):
- 10H (0001 0000): Wake up / assert reset — written first to power on the hard disk controller
- 0CH (0000 1100): Software reset — written after the wake-up delay to reset the controller (bits 3 and 2 set)
- 16H: Restore, slow mode — issued as the first seek command after reset; the ROM polls HSTAT (CFH) bit 7 via RLA in a tight loop until the busy flag clears before issuing the next command
- 10H: Restore, fast mode — issued immediately after the slow restore completes
Note: The Network 4 ROM refers to this port by the equate name HCNTL and uses it exclusively during the server-side hard disk initialisation sequence (SERVR). It is not used in the client-side network boot path.
|
| C2H-C3H | Model II with 8x300 Controller - Hard disk device ID register. Output: Reserved. Input: Hard disk device ID register. |
| C4H | Model II with 8x300 Controller - Hard disk CTC channel 0. |
| C5H | Model II with 8x300 Controller - Hard disk CTC channel 1. |
| C6H | Model II with 8x300 Controller - Hard disk CTC channel 2. |
| C7H | Model II with 8x300 Controller - Hard disk CTC channel 3. |
| C8H | Hard Disk Data Register (Read/Write). Register 0 for WD1010 Winchester Disk Controller Chip. |
| C9H | Hard Disk Write Pre-Comp Cyl. Register 1 for WD1010 Winchester Disk Controller Chip. Write/Output: The RWC start cylinder number = The value stored here divide by 4. Read/Input: Error Register:
- Bit 0: Per the WD1010-00 Spec Sheet, this is DAM Not Found. The Radio Shack 15M HD Service Mauals says that this bit is reserved and forced to 0
- Bit 1: Track 0 Error (Restore Command)
- Bit 2: Aborted Command
- Bit 4: ID Not Found Error
- Bit 5: CRC Error - ID Field
- Bit 6: CRC Error - Data Field
- Bit 7: Bad Block Detected
|
| CAH | Hard Disk Sector Count (Read/Write). Register 2 for WD1010 Winchester Disk Controller Chip. This is used only for multiple sector access. Internally decrements when used. |
| CBH | Hard Disk Sector Number (Read/Write). Register 3 for WD1010 Winchester Disk Controller Chip. |
| CCH | Hard Disk Cylinder LSB (Read/Write). Register 4 for WD1010 Winchester Disk Controller Chip. |
| CDH | Hard Disk Cylinder MSB (Read/Write). Register 5 for WD1010 Winchester Disk Controller Chip. Since the maximum number of cylinders is 1024, only Bits 0 and 1 are used (1023 = 0000 0011 + 1111 1111). |
| CEH | Hard Disk Sector Size / Drive # / Head # (Read/Write). Register 6 for WD1010 Winchester Disk Controller Chip.
- Bits 0-2: Head Number (0-7)
- Bits 3-4: Drive Number (00=DSEL1, 01=DSEL2, 10=DSEL3, 11=DSEL 4)
- Bits 5-6: Sector Size (00=256, 01=512, 10=1024, 11=128)
- Bit 7: Extension (if this is set, Error Checking and Correction codes are in use and the R/W data [sector length + 7 bytes] do not check or generate CRC)
|
| CFH |
Hard Disk Error Status Register (Read Only).
Register 7 for WD1010 Winchester Disk Controller Chip.
Read = Status Register | Write = Command Register (Instruction Set).
Read / Input — Status Register
| Bit | Name | Meaning |
| 7 | Busy | Controller busy |
| 6 | Drive Ready | Drive ready (DRDY) |
| 5 | Write Fault | Write fault (WF) |
| 4 | Seek Complete | Seek complete (SC) |
| 3 | Data Request | Buffer ready for transfer (DRQ) |
| 2 | — | Reserved (forced to 0) |
| 1 | Cmd In Progress | Command in progress (CIP) |
| 0 | Error | Error exists (OR of bits 1–7) |
Write / Output — Command Register Instruction Set
| Command |
Hex (field=0) |
Bits |
| 7 | 6 | 5 | 4 |
3 | 2 | 1 | 0 |
| Restore | 10H |
0 | 0 | 0 | 1 |
d | c | b | a |
| Seek | 70H |
0 | 1 | 1 | 1 |
d | c | b | a |
| Read Sector | 20H |
0 | 0 | 1 | 0 |
i | m | 0 | 0 |
| Write Sector | 30H |
0 | 0 | 1 | 1 |
0 | m | 0 | 0 |
| Scan ID | 40H |
0 | 1 | 0 | 0 |
0 | 0 | 0 | 0 |
| Write Format | 50H |
0 | 1 | 0 | 1 |
0 | 0 | 0 | 0 |
d c b a Step rate field (Restore & Seek):
0000 = 35 µs
0001–1111 = 0.5–7.5 ms in 0.5 ms steps
i Interrupt enable status (Read Sector):
0 = interrupt when the data request line (DRQ*) is enabled
1 = interrupt at end of command
m Multiple sector flag (Read & Write Sector):
0 = one sector
1 = multiple sectors
The 4P ROM is known to send three commands to this port:
16H Restore, 20H Read one sector, 70H Seek.
|
Block D0/D1/D2/D3 - Network 4 (Omninet / Corvus Transporter):
Network 4 uses an Omninet RS-422 network interface (the Corvus Transporter chip). The four ports D0–D3 serve overlapping dual roles depending on read vs. write direction and the current state of the Transporter's internal 16-bit address pointer. Port equates and all behavioural detail below are confirmed by the Network 4 Transporter ROM disassembly (ROM Version 01.01.00).
| Port | Equate | Dir | Use |
| D0H | OMOUT | Output | Output to Transporter with automatic address pointer increment. Each byte written advances the internal pointer by one. Used with the Z80 OTIR instruction to load commands and data into the Transporter's zero-page buffer before issuing a strobe. |
| OMINPL | Input | Input from Transporter with automatic address pointer increment. Used with the Z80 INIR instruction to burst-read a full 256-byte sector from the Transporter data area (MSB pointer pre-set to 04H) directly into a memory buffer in one operation. |
| D1H | OLSB | Output | Omninet Address Pointer: LSB. Sets the low byte of the Transporter's internal 16-bit address pointer. The LSB must always be written before the MSB. Writing 00H to both OLSB (D1H) and OMSB (D3H) resets the pointer to zero (the start of the Transporter's zero-page command/response buffer). |
| D2H | OMIN | Input | Input from Transporter without automatic pointer increment. Used to poll a specific byte in the Transporter's buffer — typically a result/response byte — in a tight loop until it changes from FFH (the Transporter's "not yet ready" sentinel), as implemented by the OMWAIT routine. After the value changes from FFH, OMWAIT issues four EX (SP),HL delay instructions before re-reading to guard against the value being mid-transition, then returns the final byte in register A. |
| OSTROB | Output | Omninet Strobe Port. Writing to this port issues a command strobe to the Transporter, causing it to execute the command loaded into its buffer via OMOUT/D0H. The STROBE routine issues two zero-valued strobes (for address 0) followed by the caller's actual strobe value; before each write it polls OMSTAT (D3H input) in a tight loop, shifting bit 7 into carry via RLA and looping while carry is clear, ensuring the Transporter is ready before each strobe. |
| D3H | OMSB | Output | Omninet Address Pointer: MSB. Sets the high byte of the Transporter's internal address pointer. Always write OLSB (D1H) first, then OMSB. To point at the Transporter's received-data area, write 04H here (full pointer = 0400H). |
| OMSTAT | Input | Transporter Status Register. Bit 7 is the ready flag. The STROBE routine reads this port and executes RLA to shift bit 7 into the carry flag; the loop repeats while carry is clear (NC = not ready). When carry is set the Transporter is ready to accept a strobe write on D2H. |
Boot-time initialization sequence:
- Port ECH bit 4 is set to enable the I/O bus: the byte at RAM address 4210H is OR'd with 10H and written back to ECH, then stored.
- The Transporter is reset: address pointer is set to 0 (OUT 00H to D1H, then D3H), FFH is written as the response code (OUT to D0H), then 20H (ASCII space = Reset Command) followed by three zero bytes for the response address. A strobe is issued to station address 1, then OMWAIT is called with A=0 to wait for the response at zero-page offset 0. The returned value in A is this station's Transporter address.
- If the address equals 63H (ASCII '?') the machine is the network server and jumps to the hard-disk boot path (SERVR). Otherwise it reads the boot-pointer sector over the network (OREAD routine, 8 retries with random back-off on error) and loads the appropriate boot volume.
Special flag at address 6FF0H: On startup the ROM reads the 16-bit word at 6FF0H and compares it with 5041H (ASCII 'PA'). If they match, the WAITR delay routine runs for approximately 4 seconds (inner loop counts 1–65536, outer loop repeats 32 times) to protect against rapid power-cycling. After the flag check, DE (= 5041H) is written to 6FF0H to set the flag for the next boot. Once the boot file has been fully loaded, the two-byte start address extracted from the load record is written back to 6FF0H, clearing the flag, and execution jumps there.
Block E0/E1/E2/E3: Maskable Interrupts:
| Port | Use | Input/Read | Output/Write |
| E0H | Maskable Interrupt
- Bit 0 - 3365H (Cassette Routine with E set to HIGH; Rising Edge Interrupt)
Not applicable on the Model 4P
- Bit 1 - 3669H (Cassette Routine with E set to LOW; Falling Edge Interrupt)
Not applicable on the Model 4P
- Bit 2 - 4046H (Real Time Clock Interrupt)
- Bit 3 - 403DH (External I/O Bus Interrupts)
- Bit 4 - 4206H (RS-232 Transmit Holding Register is Empty)
- Bit 5 - 4209H (RS-232 Receive Data Register is Full)
- Bit 6 - 4040H (RS-232/UART Error - Parity Error, Framing Error, or Data Overrun)
- Bit 7 - 4043H (Reserved)
|
Inputting from each bit would be the status of that item. 0=False, 1=True |
Outputting to each bit would be 0=Disable, 1=Enable. So outputting Bit 2 = 0 would disable the reasl time clock interrupt, and 1 = enabled. |
Block E4/E5/E6/E7: Non-Maskable Interrupts:
| Port | Use | Input/Read | Output/Write |
| E4H |
Select NMI options/read NMI status |
- Bit 0: RESERVED
- Bit 1: RESERVED
- Bit 2: RESERVED
- Bit 3: RESERVED
- Bit 4: RESERVED
- Bit 5: Reset Status
(0 = False/Asserted, 1 = True/Negated)
- Bit 6: DRQ Status
(0 = False/Asserted, 1 = True/Negated). The Model 4P calls this "Motor Off"
- Bit 7: INTRQ Status
(0 = False/Asserted, 1 = True/Negated)
|
- Bit 0: RESERVED
- Bit 1: RESERVED
- Bit 2: RESERVED
- Bit 3: RESERVED
- Bit 4: RESERVED
- Bit 5: RESERVED
- Bit 6: Enable or Disable DRQ Interrupt
(0 = Disable, 1 = Enable)
- Bit 7: Enable or Disable INTRQ Interrupt
(0 = Disable, 1 = Enable)
|
Block E8/E9/EA/EB - RS-232:
Note: A Model I will set itself up based on the switches on the card. A Model III will default to 300 baud, 8 Bit Word, 1 Stop Bit, and No Parity.
| Port | Use | Write/Output Master Reset | Read/Input Modem Status |
| E8H | RS-232 Status Register and Master Reset | Any byte will reset the RS-232 |
- Bit 0: Copy of serial input pin UART (Pin 20 of the DB-25)
- Bit 1: UART Control Register (0=Disable, 1=Enable)
- Bit 4: Ring Indicator (Pin 22 of the DB-25)
- Bit 5: Carrier Detect (Pin 8 of the DB-25)
- Bit 6: Data Set Ready (Pin 6 of the DB-25)
- Bit 7: Clear to Send (Pin 5 of the DB-25)
|
| Port | Use | Write/Output | Read/Input |
| E9H | RS-232 Baud Rate Select and Sense Switches |
- 0000 0000 (00H) - Baud: 50
- 0001 0001 (11H) - Baud: 75
- 0010 0010 (22H) - Baud: 100
- 0011 0011 (33H) - Baud: 134.5
- 0100 0100 (44H) - Baud: 150
- 0101 0101 (55H) - Baud: 300
- 0110 0110 (66H) - Baud: 600
- 0111 0111 (77H) - Baud: 1,200
- 1000 1000 (88H) - Baud: 1,800
- 1001 1001 (99H) - Baud: 2,000
- 1010 1010 (AAH) - Baud: 2,400
- 1011 1011 (BBH) - Baud: 3,600
- 1100 1100 (CCH) - Baud: 4,800
- 1101 1101 (DDH) - Baud: 7,200
- 1110 1110 (EEH) - Baud: 9,600
- 1111 1111 (FFH) - Baud: 19,200
|
RESERVED. Used only on the Model I as it reads the dip switches as follows:
- Bit 0-2 = Baud Rate Select (50-1200; 5=300 Baud; 7=1200 Baud)
- Bit 4 = Parity (0 = Enabled, 1 = Disabled)
- Bits 5-6 = Word Length Select (00 = 5, 01=6, 10=7, 11=8)
- Bit 7 = Parity (0 = Odd, 1 = Even)
|
| Port | Use | Write/Output UART Control Register | Read/Input UART Status Register |
| EAH | RS-232 UART Control Register and Status Register |
- Bit 0: Data Terminal Ready (1=DTR Off) (Pin 20 of the DB-25)
- Bit 1: Request to Send (1=RTS Off) (Pin 4 of the DB-25)
- Bit 2: Break (1=Send Break Signal)
- Bit 3: Parity Enable (0 = Enable Parity, 1 = Disable Parity)
- Bit 4: Stop Bits (0 = 1 Stop Bit, 1 = 2 Stop Bits)
- Bits 5-6: Select Word Length (00 = 5, 01 = 7, 10 = 6, 11 = 8)
- Bit 7: Parity (0 = Odd, 1 = Even)
|
- Bits: 0-2 = Unused
- Bit 3: Parity Error (1=True)
- Bit 4: Framing Error (1=True)
- Bit 5: Overrun Error (1=True)
- Bit 6: Data Sent (1=True)
- Bit 7: Data Ready (1=True)
|
| Port | Use | Write/Output
| Read/Input |
| EBH | RS-232 Register | UART Transmit Holding Register | UART Receive Holding Register |
Misc:
| Port | Use | Write/Output
| Read/Input |
| ECH |
Various Controls |
- Bit 0: Supposedly not used, but is on the Model III to test to see if the clock is on [0=off, 1=on].
- Bit 1: Cass motor [0 = on, 1 = off]
On the Model 4P this turns sound on (0) and sound off (1)
- Bit 2: Double width [0 = normal (64 or 80), 1 = double (32 or 40)]
- Bit 3: Alternate character set [0 = Disabled (Kana), 1 = Enabled (Misc)]
- Bit 4: External I/O bus [0 = Disabled, 1 = Enabled]
- Bit 5: Video waits [0 = disable, 1 = enable]
On the Model 4P this is not used
- Bit 6: CPU clock speed [0 = 2 mhz, 1 = 4 mhz] - Model 4 and 4P ONLY
- Bit 7: Reserved
|
Clear the Real Time Clock Interrupt |
A quick note on Bit 5 (thanks to George Phillips). Bit 5 of Port ECH is supported on both the Model III and Model 4 and is set to ENABLE at 345CH. There is a latch connected to this bit that always has the current value. This latch has a wire connecting to both the Z-80 bus and the video circuitry which which mediates acccess to video RAM, so the processing of this bit is actually handled by separate hardware and not the ROM.
An example of this bit can be shown via the short program 10 CLS:FORI=0TO1023:POKE15360+I,191:NEXT. If run once with POKE 16912,0 and run again with POKE 16912,32, hash lines as the screen refreshes can be seen in one but not the other.
The Seatronics Super Speed-Up Board uses bits 6 and 7 of ECH to select the Z-80 Clock Rate:
| Bit 6 | Bit 7 | Speed |
| 0 | 0 | 2 Mhz |
| 1 | 0 | 4 Mhz |
| 0 | 1 | 5.3 Mhz |
| 1 | 1 | 8 Mhz |
Floppy Drive:
| Port | Use |
| F0H | FDC Command/Status: Input (depends on what the inquiry is in relation to: I=Restore, Seek, and Step, II = Read/Write Sector, III = Read/Write Track and Read Address:
- Bit 0:
- [I] BUSY = HIGH indicates command in progress
- [II/III] Busy = HIGH indicates command Is under execution.
- Bit 1:
- [I] INDEX = HIGH indicates index mark detected from drive
- [II/III] DATA REQUEST = HIGH indicates index mark detected from drive.
- Bit 2:
- [I] TRACK 0 = HIGH indicates Read/Write head is positioned to Track 0
- [II/III] LOST DATA = HIGH indicates the computer did not respond to DRQ in one byte time.
- Bit 3:
- [I] CRC ERROR = HIGH indicates a CRC error was found in the ID field
- [II/III] CRC ERROR = If BIT 4 is set, an error is found in one or more ID fields otherwise it indicates error in data field.
- Bit 4:
- [I] SEEK ERROR = HIGH indicates the desired track was not verified
- [II/III] RECORD NOT FOUND = HIGH indicates the desired track, sector, or side were not found.
- Bit 5:
- [I] HEAD LOADED = HIGH indicates the head is loaded and engaged
- [II/III] RECORD TYPE/WRITE FAULT = On Read Record, HIGH indicates the record-type code from data field address mark (1: Deleted Data Mark, 0: Data Mark). On any write, HIGH indicates a Write Fault.
- Bit 6:
- [I] PROTECTED = HIGH indicates Write Protect is activated
- [II/III] PROTECTED = On Read Record or Read Track, not used. On any write: it indicates a Write Protect.
- Bit 7: NOT READY = HIGH indicates the drive is not ready
Output:
Bits 765 | 4 | 3 | 2 | 1 0
00-0F: 000 | 0 | h | V | R R = Restore
10-1F: 000 | 1 | h | V | R R = Seek
20-3F: 001 | T | h | V | R R = Step
40-5F: 010 | T | h | V | R R = Step In
60-7F: 011 | T | h | V | R R = Step Out
80-9E: 100 | m | S | E | C 0 = Read Sector
A0-BF: 101 | m | S | E | C A = Write Sector
C0,C4: 110 | 0 | 0 | E | 0 0 = Read Address
D0-DF: 110 | 1 | x | x | x x = Force Interrupt
E0-E4: 111 | 0 | 0 | E | 0 0 = Read Track
F0-F4: 111 | 1 | 0 | E | 0 0 = Write Track
Legend:
RR = Stepping Motor Rate (00=6ms, 01=12ms, 10=20ms, 11=30ms)
h = Head Load Flag (1: load head at beginning, 0: unload head)
V = Track Number Verify Flag (0: no verify, 1: verify on dest track)
T = Track Update Flag (0: no update, 1: update Track Register)
A = Data Address Mark (0: FB, 1: F8 (deleted DAM))
C = Side Compare Flag (0: disable side compare, 1: enable side comp)
E = 15 ms delay (0: no 15ms delay, 1: 15 ms delay)
S = Side Compare Flag (0: compare for side 0, 1: compare for side 1)
m = Multiple Record Flag (0: single record, 1: multiple records)
xxxx = Interrupt Condition Flags (1111 = Immediate interrupt, Index pulse, Ready to not ready transition, Not ready to ready transition)
Output Examples:
- 00H: Restore
- 80H (1000 0000): Read single sided single sector
- A0H (1010 0000): Write single normal sector
- A1H (1010 0001): Write single sector read protect
- C0H (1100 0000): Read address, no delay
- D0H (1101 0000): Reset; puts FDC in mode 1 (INTRQ; "000" terminate command without interrupt)
- E0H (1110 0000): Read track, no delay
- F0H (1111 0000): Write track, no delay
|
| F1H | FDC Track/Cylinder Register (regardless if READ or WRITE) |
| F2H | FDC Sector Register (regardless if READ or WRITE) |
| F3H | FDC Data Register (the data byte to be read or WRITTEN to disk) |
| F4H | Select drive and options. Output/Write:
- Bit 0: Drive 0 Select (0=No Select, 1=Select)
- Bit 1: Drive 1 Select (0=No Select, 1=Select)
- Bit 2: Drive 2 Select (0=No Select, 1=Select)
- Bit 3: Drive 3 Select (0=No Select, 1=Select)
- Bit 4: Side Select (0 = Select Side 0, 1 = Select Side 1)
- Bit 5: Write Precompensation (0 = Disable WP, 1 = Enable WP)
- Bit 6: Wait State Generation (0 = Disable WSG, 1 = Enable WSG)
- Bit 7: Density Select (0 = Single/FM, 1 = Double/MFM)
|
Block F8/F9/FA/FB - Printer:
| Port | Use | Input/Read LPIN* | Output/Write LPOUT* |
| F8 |
Line printer address port: |
- Bit 4: Printer Fault (1=True, 0=False)
- Bit 5: Device Selected (1=True, 0=False)
- Bit 6: Out of Paper (1=True, 0=False)
- Bit 7: Busy (1=True, 0=False)
|
ASCII Byte to send to the line printer to be printed |
Block FC/FD/FE/FF - Cassette:
| Port | Use | In | Out |
| FC/FD/FE/FF |
Cassette port |
Bit 7: Data Bit (0 = Low, 1 = High) |
- Bits 0-1: 00=0.85 Volts
10=0.0 Volts01 = 0.46 Volts
Model 4P: Bit 0 is the cassette output level, no other bit is used, as the Model 4P does not support cassette storage, this port is only used to generate sound that was to be output via cassette port. The Model 4P sends data to onboard sound circuit. |