This page covers the 3000H and higher portion of the ROM which does not exist on the Model I. Text in READ is for v1 of the Model III ROM. Text in BLUE is for v2 of the Model III ROM. Text in GREEN is for the Model 4 ROM.3000 – Jump Table.
3036 – “$TIME” – Get the time.
On entry, (HL) should be the eight byte output buffer. On exit, (HL) should contain HH:MM:SS. All registered altered.
3039 – This set of code plays with the NMI.
NOTE: Port E4H is the Non-Maskable Interrupt Latch.
3042 – “$SETCAS” – Prompt the User to set the cassette baud rate.
This cal repeats the CASS? dialog on the next line of the display, and waits for a H or a L. Upon return, the baud rate is already set accordingly.
3045 – Keyboard Rows 0-3, Unshifted, No Caps Lock.
3060 – Load A with the Computer version number, which is always 1 for a Model III and 0 for a Model 4.
NOTE: 37EAH is a hard coded 01H.
3065 – Keyboard Rows 4-6, Unshifted, No Caps Lock.
307D – Set the Keyboard Repeat Delay Count to 1500.
NOTE: 05DCH is 1500.
NOTE: 41FFH holds the keyboard scan repeat delay count.
3085 – Keyboard Rows 0-3, shifted, No Caps Lock.
30A0 – This is a mess. The v1 code is a mess and so the v2 code is weird. v2 has it putting A into (HL), clearing A and FLAGS and RETURN.
30A6 – Keyboard Rows 4-6, shifted, No Caps Lock.
30BD – Toggle Caps Lock.
NOTE: 28BFH computes the amount of space remaining in the string area.
NOTE: 40D3H is generally used as the pointer workspace.
NOTE: 4019H holds the caps lock toggle in the keyboard DCB.
30C5 – Keyboard Rows 0-3, UNshifted, Caps Lock.
30E0 – GOSUB to the PRINT SCREEN Routine, Clear A, and RETURN
30E5 – Keyboard Rows 4-6, UNshifted, Caps Lock
30FD – Checking for a BREAK key during a cassette operation
NOTE: 40D6H holds the next available string location.
NOTE: 40B3H is the current position in the workspace table.
3105 – Keyboard Rows 0-3, shifted, Caps Lock
3120 – Go to the next Keyboard row
3125 – Keyboard Rows 4-6, Shifted, Caps Lock
313D – Restore Scanning Variables.
This routine is called from 33CC which is in the middle of the keyboard input routine.
NOTE: 20A2H is in the middle of the PRINT routine, and is at the point where we know we have a At this point we have a PRINT@nnnn.
NOTE: 41FDH is the saved position in the keyboard scan.
NOTE: 41FEH is the saved IMAGE at the saved position in the keyboard scan data.
3145 – Printer Character Table Codes 32-127.
31A5 – Output the TIMING MARK to the cassette
NOTE: Port FFH is the cassette port. When outputting to FFH, Bits Zero and 1 set to: 00 is .85V, 01 is .46V, and 10 is 0.0V.
NOTE: Port FFH is the cassette port. When outputting to FFH, Bits Zero and 1 set to: 00 is .85V, 01 is .46V, and 10 is 0.0V.
NOTE: 31F3H resets the cassette port, and then output a 0 to the Cassette Port FFH.
31C0 – Turn Off The Cassette
NOTE: 4213H is the default interrupt vector setting for the cassette.
NOTE: Port E0H is the maskable interrupt latch, which directs jumps.
Jump Table:
- xxxxxxx1 jumps to 3365H
- xxxxxx1x jumps to 3369H
- xxxxx1xx jumps to 4046H
- xxxx1xxx jumps to 403DH
- xxx1xxxx jumps to 4206H
- xx1xxxxx jumps to 4209H
- x1xxxxxx jumps to 44040H
- 1xxxxxxx jumps to 44043H
NOTE: Port FFH is the cassertte port read status. If the 7th bit is 0 then it is low, and if 7th bith is 1 then it is high.
NOTE: 4210H is the bit mask for Port ECH. Port ECH is the Miscellaneous Controls port, which covers clock on/off (Bit 0), cassette motor on or off (Bit 1), double size video on or off (Bit 2), and special character set select of Kana or misc (Bit 3). Higher bits are used for the Model 4 only.
31D1 – Turn On The Cassette – Part 1. This will remove the return address, save DE and BC, restore the return address, and than blank the “**”
NOTE: Port ECH is the Miscellaneous Controls port, which covers clock on/off (Bit 0), cassette motor on or off (Bit 1), double size video on or off (Bit 2), and special character set select of Kana or misc (Bit 3). Higher bits are used for the Model 4 only.
31E8 – Turn On The Cassette – Actually Set the Bit Mask and Output the Command
NOTE: 4210H is the bit mask for Port ECH. Port ECH is the Miscellaneous Controls port, which covers clock on/off (Bit 0), cassette motor on or off (Bit 1), double size video on or off (Bit 2), and special character set select of Kana or misc (Bit 3). Higher bits are used for the Model 4 only.
NOTE: 4210H is the bit mask for Port ECH. Port ECH is the Miscellaneous Controls port, which covers clock on/off (Bit 0), cassette motor on or off (Bit 1), double size video on or off (Bit 2), and special character set select of Kana or misc (Bit 3). Higher bits are used for the Model 4 only.
31F3 – Reset the Cassette Port. This routine OUTputs a 0 to the Cassette Port FFH
NOTE: Port FFH is the cassette port. When outputting to FFH, Bits Zero and 1 set to: 00 is .85V, 01 is .46V, and 10 is 0.0V.
31F7 – Check to see if we have a PRINT # command and, if so, get the port number, validate that the next character is a , and return.
NOTE: 0253H is in the middle of the “Write a Byte to Cassette” Routine. It ends in a RETURN.
“,”
3203 – Vector for a SLOW cassette read
NOTE: 3220H reads the tape until it finds a timing mark or the BREAK is hit.
NOTE: 4212H holds the cassette blinker counter.
3220 – Cassette – Keep reading tape looking for a timing mark or BREAK.
NOTE: FFH is the Cassette Port.
322E – Cassette – Wait for the timing mark to pass and the next data to show up. Put that data into Bit 0 of D.
First, wait for 6EH Units (the length of the timing mark)
Reset the cassette port
Next, wait for 98H Units (the length until a data pulse is expected)
… continue
NOTE: Port FFH is the Cassette Port.
3241 – Vector for a SLOW cassette write. On entry A is the byte to output.
NOTE: D will be the DATA BYTE.
3258 – “Write a 0 Bit” by simply waiting the appropriate amount of time and doing nothing.
325E – SLOW tape header write
NOTE: 3241H is the Vector for a SLOW cassette write.
NOTE: 420CH is the TAPE WRITE VECTOR.
NOTE: A5H is the OUTPUT SYNC BYTE.
3274 – SLOW tape header read
NOTE: 3203H is the vector for a SLOW cassette read.
NOTE: 420EH is the TAPE READ VECTOR.
NOTE: 3220H reads the tape until it finds a timing mark or the BREAK is hit.
329B – FAST tape header write.
NOTE: 32BAH is the VECTOR TO FAST WRITE.
NOTE: 420CH is the TAPE WRITE VECTOR.
NOTE: 32B4 restore all registers from the STACK, and Fill C with A, and JUMP to cassette write
NOTE: 7FH is the OUTPUT SYNC BYTE.
NOTE: 32B4 restore all registers from the STACK, and Fill C with A, and JUMP to cassette write
NOTE: A5H is the SLOW SYNC BYTE.
32B4 – Restore all registers from the STACK, and Fill C with A, and JUMP to cassette write.
32BA – Save all registers to the STACK, and Fill C with A, GOSBUB to write out the START BIT …
32C1 – Call 3335H to Output a Bit 8 Times
32CA – Read the start bit, read 8 bits, check for error, and flash the star
32DA – FAST tape header read.
NOTE: 32CAH reads an verifies a byte.
NOTE: Port E0H is the maskable interrupt latch, which directs jumps.
Jump Table:
- xxxxxxx1 jumps to 3365H
- xxxxxx1x jumps to 3369H
- xxxxx1xx jumps to 4046H
- xxxx1xxx jumps to 403DH
- xxx1xxxx jumps to 4206H
- xx1xxxxx jumps to 4209H
- x1xxxxxx jumps to 44040H
- 1xxxxxxx jumps to 44043H
NOTE: Port E0H is the maskable interrupt latch, which directs jumps.
Jump Table:
- xxxxxxx1 jumps to 3365H
- xxxxxx1x jumps to 3369H
- xxxxx1xx jumps to 4046H
- xxxx1xxx jumps to 403DH
- xxx1xxxx jumps to 4206H
- xx1xxxxx jumps to 4209H
- x1xxxxxx jumps to 44040H
- 1xxxxxxx jumps to 44043H
NOTE: Port FFH is the cassette port. When outputting to FFH, Bits Zero and 1 set to: 00 is .85V, 01 is .46V, and 10 is 0.0V.
NOTE: Port FFH is the cassette port. When outputting to FFH, Bits Zero and 1 set to: 00 is .85V, 01 is .46V, and 10 is 0.0V.
3350H – READ a BIT
3365H – This is a Port E0H Masked Jump. If the MASKABLE INTERRUPT is xxxxxxx1, it jumps here. This is a Cassette Routine with E set to HIGH
NOTE: FFH is the Cassette Port.
337CH – Check for a Data Error.
- If A=22H it sets the ZERO FLAG
- If A<22H then the CARRY FLAG will be set
- If A>=22H then the NO CARRY FLAG will be set
338EH – Jump Point for Keyboard Input.
Differences between the M3 and M4 ROMS: In the Model III this portion of memory includes most of the keyboard scan routine (338EH-3454H), the bootstrap routine (3455H-3517H), a short time-delay routine used by the bootstrap routine (3518H-351BH), the Non-Maskable Interrupt handler routine (351CH-3527H), and an unused FFH byte (3528H). In the Model 4 this area contains part of the keyboard scan routine (338EH-3400H), the bootstrap routine (3401H-34CDH), the Non-Maskable Interrupt handler routine (34CEH-34O9H), more of the keyboard scan routine (37DAH-34FCH), a new screen print routine used when the control and asterisk keys are pressed (34FDH-351EH), and ten NOPs (zero bytes at 351FH through 3528H).
NOTE: The Model III v1 and v2 code diverges and remerges too often between here and 3529H, often differing just by memory location, so the tracking of those versions is stopping here.
NOTE: 4224H Holds the CONTROL KEY flag.
NOTE: 4201H is the REPEAT DELAY COUNTER.
33DA – Keyboard Repeat – Jumps Here if the same keys are still pressed.
NOTE: 4201H is the REPEAT DELAY COUNTER.
NOTE: 4201H is the REPEAT DELAY COUNTER.
NOTE: 41FFH is the REPEAT DELAY COUNT.
NOTE: 4201H is the REPEAT DELAY COUNTER.
NOTE: 41FFH is the REPEAT DELAY COUNT.
NOTE: 41FE is the SAVED IMAGE AT POSITION.
NOTE: 41FDH is the SAVED POSITION IN SCAN.
NOTE: 4019H is the CAPS LOCK TOGGLE.
NOTE: BIT 7 is the difference between UPPER CASE and LOWER CASE versions of the same letter.
3447 – If this is a Model III then we do not have a CAPS LOCK so check A is a “*” then check to see if the CONTROL KEY FLAG is 1F.
NOTE: 4224H is the CONTROL KEY flag, part of the I/O Router DCB.
3455 – This is the BOOTSTRAP. Clears ports, checks for a BREAK key and a Floppy Controller.
NOTE: Port E4H is the non-maskable interrupt latch. This is to clear the non-maskable interrupt status.
NOTE: Port ECH is the control port. In this case, this is turning on bit 5 which ENABLEs the Video Waits. This bit is mirrored into a chip called a latch which has a wire running to both the Z-80 and the video circuity that mediates access to video RAM.
NOTE: Port F4H is the Disk Drive and Disk Density Select. Bits 0-3 are the drive select of 0-3 and Bit 7 is 0 for single density and 1 for double density.
NOTE: Port F0H is the FDC Status Register. Output Commands:
- 00H – restore
- 80H – read sector
- A0H – write normal sector
- A1H – write read protect sector
- C0H – read address
- D0H – reset; puts FDC in mode 1
- E0H – read track
- F0H – write track
NOTE: Port E0H is the maskable interrupt latch, which directs jumps.
Jump Table:
- xxxxxxx1 jumps to 3365H
- xxxxxx1x jumps to 3369H
- xxxxx1xx jumps to 4046H
- xxxx1xxx jumps to 403DH
- xxx1xxxx jumps to 4206H
- xx1xxxxx jumps to 4209H
- x1xxxxxx jumps to 44040H
- 1xxxxxxx jumps to 44043H
NOTE: Port F0H is the FDC Status Register. A B0H (Decimal: 00001011) sent to Port F0H is the command Restore (0000), Load Head at Beginning (1), No Verify (0), 30ms step rate (11).
NOTE: Port F0H is the FLOPPPY STATUS REGISTER. Results:
- 1 = Busy
- 2 = Index/DRQ
- 4 = Track 0/Lost Data
- 8 = CRC Error
- 16 = Seek Error/Record Not Found
- 32 = Record Type/Write Fault/Head Loaded
- 64 = Write Protected
- 128 = Not Ready
NOTE: Port F4H is the Disk Drive and Disk Density Select. Bits 0-3 are the drive select of 0-3 and Bit 7 is 0 for single density and 1 for double density.
OR C
NOTE: Port F0H is the FLOPPPY STATUS REGISTER. Results:
- xxxx xxx1 = Busy
- xxxx xx1x = Index/DRQ
- xxxx x1xx = Track 0/Lost Data
- xxxx 1xxx = CRC Error
- xxx1 xxxx = Seek Error/Record Not Found
- xx1x xxxx = Record Type/Write Fault/Head Loaded
- x1xx xxxx = Write Protected
- 1xxx xxxx = Not Ready
34ABH – Warm Boot Routine.
NOTE: Port F0H is the FLOPPPY STATUS REGISTER. Results:
- xxxx xxx1 = Busy
- xxxx xx1x = Index/DRQ
- xxxx x1xx = Track 0/Lost Data
- xxxx 1xxx = CRC Error
- xxx1 xxxx = Seek Error/Record Not Found
- xx1x xxxx = Record Type/Write Fault/Head Loaded
- x1xx xxxx = Write Protected
- 1xxx xxxx = Not Ready
NOTE: Port F4H is the Disk Drive and Disk Density Select. Bits 0-3 are the drive select of 0-3 and Bit 7 is 0 for single density and 1 for double density.
OR C
NOTE: Port F4H is the Disk Drive and Disk Density Select. Bits 0-3 are the drive select of 0-3 and Bit 7 is 0 for single density and 1 for double density.
NOTE: 4049H is the Non-Maskable Interrupt Vector.
NOTE: Port E4H is the non-maskable interrupt latch.
NOTE: Port F3H is the Floppy Disk Controller Data Register.
NOTE: Port F2H is the Floppy Disk Controller Track Register.
NOTE: Port F0H is the FDC Status Register. Outputting 1000 0000 is issuing the command READ SECTOR (100), SINGLE RECORD (0), SIDE 0 (0), NO 15MS DELAY (0), DISABLE SIDE COMPARE (0).
NOTE: Port F0H is the FLOPPPY STATUS REGISTER. Results:
- 1 = Busy
- 2 = Index/DRQ
- 4 = Track 0/Lost Data
- 8 = CRC Error
- 16 = Seek Error/Record Not Found
- 32 = Record Type/Write Fault/Head Loaded
- 64 = Write Protected
- 128 = Not Ready
NOTE: Port F4H is the Disk Drive and Disk Density Select. Bits 0-3 are the drive select of 0-3 and Bit 7 is 0 for single density and 1 for double density.
NOTE: This appears to be an infinite loop in the code, but it isn’t in actuality. Once the disk controller has loaded an entire sector, it will trigger a non-maskable interrupt and will exit to 3502H. That was set up at 34CE.
3502H – Non-Maskable Interrupt Jump Point to verify the disk sector read wasn’t in error.
NOTE: Port E4H is the non-maskable interrupt latch. This is to clear the non-maskable interrupt status.
NOTE: 4049H is the Non-Maskable Interrupt Vector.
NOTE: Port F0H is the FLOPPPY STATUS REGISTER. Results:
- xxxxxxx1 = Busy
- xxxxxx1x = Index/DRQ
- xxxxx1xx = Track 0/Lost Data
- xxxx1xxx = CRC Error
- xxx1 xxxx = Seek Error/Record Not Found
- xx1x xxxx = Record Type/Write Fault/Head Loaded
- x1xx xxxx = Write Protected
- 1xxx xxxx = Not Ready
3518H – Really Short Delay keyed to FDC Controller Response Time.
351CH – NMI handler. On entry, A holds Bit 5 of the Non-Maskable Interrupt Latch at port 0E4H. 303DH jumped here.
NOTE: Port E4H is the Non-Maskable Interrupt Latch.
NOTE: Port E4H is the Non-Maskable Interrupt Latch.
3529H – Deal with the cursor.
NOTE: Port ECH is the Miscellaneous Controls port, which covers clock on/off (Bit 0), cassette motor on or off (Bit 1), double size video on or off (Bit 2), and special character set select of Kana or misc (Bit 3). Higher bits are used for the Model 4 only.
NOTE: 4022H holds the Cursor ON/OFF Flag and will be 0 if the cursor is off, or the the underscore character otherwise.
NOTE: 401CH holds the Cursor Blink Switch and will be 0 for Blink, and anything else for No Blink.
NOTE: 401AH is the memory location that stores the cursor blink count.
NOTE: 401AH is the memory location that stores the cursor blink count.
NOTE: 401AH is the memory location that stores the cursor blink count.
NOTE: 401BH holds the cursor blink status – 0 = Off, Anything Else = On.
NOTE: 4020H holds the current cursor position.
NOTE: 4023H holds the cursor character.
3556H – Update the heartbeat and deal with the time, including rollover to the next day, month, and year.
NOTE: (HL) will hold the current cursor position.
NOTE: 4216H is the heartbeat counter.
NOTE: 4216H is the heartbeat counter.
NOTE: 0266H points to the TIME DATA of the number of seconds in a minute, the number of mnutes in an hour, and the number of hours in a day.
NOTE: If HL is 4217H then it is seconds, 4218H then it is minutes, 4217H then it is hours.
NOTE: 0266H points to the TIME DATA of the number of seconds in a minute, 0267H points to the number of mnutes in an hour, and 0268H points to the number of hours in a day.
NOTE: If HL is 4217H then it is seconds, 4218H then it is minutes, 4219H then it is hours, and 421AH then it is YEARS.
NOTE: 0266H points to the TIME DATA of the number of seconds in a minute, 0267H points to the number of mnutes in an hour, and 0268H points to the number of hours in a day.
NOTE: 421BH holds the current DAY portion of the date.
NOTE: 421BH holds the current MONTH portion of the date.
NOTE: 421BH holds the DAY portion of the date.
NOTE: DE currently points to the memory locations housing the of days in each month.
NOTE: If this is not a loop, the HL holds the day portion of the date.
NOTE: A CP actually subtracts 1E from A without modifying A, but the flags are set accordingly. Here, if A is < 1E then the CARRY FLAG will be set.
NOTE: 421AH points to the current YEAR.
NOTE: 421BH points to the current DAY.
NOTE: 421BH points to the current MONTH.
NOTE: This will test against a month 13. If A is < 13, then the CARRY FLAG will be set.
NOTE: 421BH points to the current DAY.
NOTE: 421BH points to the current YEAR.
3591H – Check to see if the clock is on and exit back out if it is off OR the heartbeat shows that the clock was just updated. Pass through otherwise.
NOTE: 4210H is the bit mask for Port ECH. Port ECH is the Miscellaneous Controls port, which covers clock on/off (Bit 0), cassette motor on or off (Bit 1), double size video on or off (Bit 2), and special character set select of Kana or misc (Bit 3). Higher bits are used for the Model 4 only.
NOTE: 4216H is the heartbeat counter.
NOTE: A CP actually subtracts 1E from A without modifying A, but the flags are set accordingly.
35A0H – Put the Clock 10 characters from the end of the first line. We enter this routine with HL pointing to the screen location 10 characters from the end of the first line.
NOTE: 4219H is the current HOUR.
NOTE: This routine is also used to convert the date, and C will be swapped out to a / for that routine.
NOTE: This is because we need to convert 3 numbers, so we will loop 3 times.
NOTE: This will be HOUR (4219H) on the first pass, MINUTE (4218H) on the second pass, and SECOND (4219H) on the third pass.
NOTE: 2F is a / which is also 1 character below a 0.
35BBH – Put the DATE 8 characters from the end of the first line. We enter this routine with HL pointing to the screen location and we just jump into the prior routine with a different pointer to the DATE and a change in the delimeter to a /.
NOTE: 421CH holds the current MONTH.
35C2H – Maskable Interrupt Handler.
NOTE: 4046H is Interrupt Vector 2 and contains a JUMP to 4046H which, in at least in TRSDOS, is just a JUMP to 3529H and is used by the clock.
NOTE: 403DH is Interrupt Vector 3 and contains a JUMP to 403DH which, in at least in TRSDOS, is just a JUMP to 35FAH which is a RETurn.
NOTE: 403DH is Interrupt Vector 4 and contains a JUMP to 4206H which, in at least in TRSDOS, is just a JUMP to 35FAH which is a RETurn.
NOTE: 4209H is Interrupt Vector 5 and contains a JUMP to 4209H which, in at least in TRSDOS, is just a JUMP to 35FAH which is a RETurn.
NOTE: 4209H is Interrupt Vector 6 and contains a JUMP to 4040H which, in at least in TRSDOS, is just a JUMP to 35FAH which is a RETurn.
NOTE: 4043H is Interrupt Vector 7 and contains a JUMP to 4043H which, in at least in TRSDOS, is just a JUMP to 35FAH which is a RETurn.
35FBH – RS-232 Initialization Routine. I’m [guessing] that IX is set to 41F5H
NOTE: Port EAH is the RS-232 UART Control Register/Status Register. Input:
- Bit 3: Parity error (1=True)
- Bit 4: Framing Error (1=True)
- Bit 5: Overrun (1=True)
- Bit 6: Data Sent (1=True)
- Bit 7: Data Ready (1=True)
NOTE: Port E8H is the RS-232 Status Register & Master Reset. Outputting ANYTHING to Port E8H resets the RS-232.
NOTE: 41F8H holds the baud rate code.
NOTE: Port E9H is the RS-232 Baud Rate Selects and Sense Switches. Outputting to Port E9H will set the Baud Rate as follows:
- Bits 0-3 – Select the Receive Rate
- Bits 4-7 – Select the Transmit Rate
NOTE: 41F9 holds the RS-232 Configuration Code.
NOTE: Port EAH is the RS-232 UART Control Register/Status Register. For output:
- Bit 0: Data Terminal Ready
- Bit 1: Request to End
- Bit 2: Break
- Bit 3: Parity Enable
- Bit 4: Stop Bits
- Bit 5: Select
- Bit 6: Word Length
- Bit 7: Parity (0=Odd, 1=Even)
NOTE: 41E5H Is the RS-232 Input DCB. 1=READ ONLY.
NOTE: 41FAH holds the RS-232 Wait Switch.
NOTE: 41E9H is the RS-232 Input DCB:
- Bit 2: Driver On/Off
- Bit 1: Wait/No Wait
NOTE: 41E9H is the RS-232 Input DCB:
- Bit 2: Driver On/Off
- Bit 1: Wait/No Wait
NOTE: 41EDH is the RS-232 Output DCB. Type = 2 = Write Only.
NOTE: 41F1H is part of the RS-232 Output DCB:
- Bit 2: Driver ON/OFF
- Bit 1: Wait/No Wait
NOTE: Port E8H is the RS-232 Status Register & Master Reset. Input:
- Bit 4: Ring Indicator
- Bit 5: Carrier Detect
- Bit 6: Data Set Ready
- Bit 7: Clear to Send
363A – This will zero out a bunch of RS-232 Related Ports and Memory Addresses. We wind up here if there is no RS-232 or the RS-232 CONFIGURATION CODE is 0.
- Port E8H: RS-232 Status Register & Master Reset
- Port E9H: RS-232 Baud Rate Select and Sense Switches
- Port EAH: RS-232 UART Control Register and Status Register
- Port EBH: RS-232 Data Register
NOTE: 41F0H is the 1 characer output buffer for the RS-232 Output DCB.
365AH – RS-232 Input Routine.
NOTE: 41E5H is the DCB for RS-232 Input. 41E8H is the 1 Character RS-232 Input.
NOTE: 41E8H is the 1 Character RS-232 Input.
NOTE: Bit 2 of 41E9 contains the DRIVER ON/OFF.
NOTE: Port EAH is the RS-232 UART Control Register/Status Register. Input:
- Bit 3: Parity error (1=True)
- Bit 4: Framing Error (1=True)
- Bit 5: Overrun (1=True)
- Bit 6: Data Sent (1=True)
- Bit 7: Data Ready (1=True)
NOTE: Bit 7 will be 1 if DATA READY (1=True).
NOTE: Bit 1 of 41E9 contains the WAIT/NO WAIT of the RS-232 Input DCB.
NOTE: 4203H JUMPS to 022EH and is the break vector for tape and RS-232.
NOTE: Port EBH is the RS-232C Data Register. It contains the data received from the RS-232C.
NOTE: 41E8H is the 1 Character RS-232 Input.
3680H – RS-232 Output Routine.
NOTE: Port EAH is the RS-232 UART Control Register/Status Register. Input:
- Bit 3: Parity error (1=True)
- Bit 4: Framing Error (1=True)
- Bit 5: Overrun (1=True)
- Bit 6: Data Sent (1=True)
- Bit 7: Data Ready (1=True)
NOTE: 41F1H Hholds DRIVER ON/OFF in BIT 2, and WAIT/NO WAIT in BIT 1.
NOTE: 4203H JUMPS to 022EH and is the break vector for tape and RS-232.
NOTE: 41F0H is RS-232 output buffer byte.
NOTE: Port EBH is the RS-232C Data Register. It contains the data to be sent to the RS-232C.
36AAH – Initial Vectors and DCBs for RAM 4000H-404BH.
36F5H – UNUSED.
36F9H – Initial Vectors and DCBs for RAM 41E5H-4224H.
3739H – I/O Re-Router.
On the Model III, the area of memory from 3739H-37E7H contains the I/O re-router routine (3739H-377AH), a patch to the LIST command routine (377BH-3798H), the TIME$ function routine (3799H-37AEH), a portion of the non-disk bootstrap routine that prompted the user to s:et the cassette baud rate (37AFH 37B4H), the $SETCAS routine (37B5H-37DBH), another portion of the non-disk bootstrap routine, which put the address of the TIME$ routine into the vector at 4177H (37DCH-37E4H), and three unused AAH bytes (37E5H-37E7H). In the Model 4, this area contains a good portion of the keyboard scan routine (3739H-37A3H), a patch to the LIST command routine (37A4H-37ClH), the TIME$ function routine (37C2H-37D7H), more of the keyboard scan routine (37D8H-37EOH), a short time-delay routine used by the disk bootstrap routine (37ElH-37E4H), and three unused zero bytes (37E5H-37E7H).
375EH – Look Up DCB Address. On SUCCESSFUL exit, HL will have the DCB address.
NOTE: CPIR will check (HL) vs A. HL is then increased, and BC decreased. If BC is still not zero, and Z is not set, it repeats.
376CH – DCB Address Table.
377BH – This is jumped to by 2B91 in the middle of the tokenize routine.
NOTE: 409FH is the DATA FLAG.
NOTE: XOR is an exclusive OR, meaning that if the 2 things are the SAME the result is 0, and if the 2 things are DIFFERENT, the result is 1.
NOTE: 409FH is the DATA FLAG.
NOTE: 06AAH is in the middle of the KEYBOARD DRIVER ENTRY ROUTINE.
NOTE: 409FH is the DATA FLAG.
NOTE: 06A8H is in the middle of the KEYBOARD DRIVER ENTRY ROUTINE.
NOTE: 06A3H is the REM processor in the middle of the KEYBOARD DRIVER ENTRY ROUTINE.
3799H – BASIC TIMES (DATE$+” “+TIME$)
NOTE:
- The RST 10H routine loads the next character from the string pointed to by the HL register into the A-register and clears the CARRY FLAG if it is alphabetic, or sets it if is alphanumeric.
- Blanks and control codes 09H and 0BH are ignored causing the following character to be loaded and tested.
- The HL register will be incremented before loading any character therfore on the first call the HL register should contain the string address minus one.
- The string must be terminated by a byte of zeros.
NOTE: This is to set up for a 17 Byte String.
NOTE: 40D4 is the string pointer.
37AFH – This is a jump to NON-Disk BASIC
37B5H – Set the TAPE BAUD RATE ($SETCAS).
NOTE: 0049H is the $KBWAIT routine which scans the keyboard and returns with the key pressed, if any, in register A.
NOTE: A currently holds the character pressed in response to the “CASS?” message.
NOTE: 0033H is the character print routine, to put the character held in Register A at the current cursor position.
NOTE: A will then hold the character pressed in response to the “CASS?” message.
37D4 – Set the Selected Cassette Baud Rate as LOW SPEED
NOTE: Storing a 0 at 4211H will select low speed.
37D4 – Write the Byte to Select the Selected “CASS?” Cassette Baud Rate
NOTE: 4211H holds the CASSETTE BAUD RATE SELECT as:
- 0: 500 Baud
- Anything Else: 1500 baud
NOTE: 0033H is the character print routine, to put the character held in Register A at the current cursor position.
37DCH – Enable the TIME$ Command
NOTE: 3030H is the STRING=DATE$+””+TIME$ routine.
NOTE: 4176H is the TIME$ vector as is currently set to be JP ?L3 ERROR as the M1/M3 ROM considered that to be a DOS command. It is not a DOS command for a Model III so that jump needs to be changed. In this case, it is changed from JP ?L3 ERROR to JP 3030H.
NOTE: 022EH will enable interrupts, show the READY prompt, and RETURN.
37E8H – Hidden 2 Byte Code – Printer Output. While these bytes may show JR NC,381AH, that is not really a valid command as there is no executable code at 381AH.
37EA – Computer Version Number
37EBH – Display the Copyright Message
NOTE: 0202H points to the message ‘(C) “80 Tandy”‘.