Purpose: Read status word
Call address: $FFB7 (hex) 65463 (decimal)
Communication registers: A
Preparatory routines: None
Error returns: None
Stack requirements: 2
Registers affected: A
Description: This routine returns the current status of the I/O devices in the accumulator. The routine is usually called after new communication to an I/O device. The routine gives you information about device status, or errors that have occurred during the I/O operation.
The bits returned in the accumulator contain the following information: (see table below)
| ST BIT POSITION | ST NUMERIC VALUE | CASETTE READ | SERIAL/RW | TAPE VERIFY + LOAD |
|---|---|---|---|---|
| 0 | 0 | Time out write | ||
| 1 | 2 | Time out read | ||
| 2 | 4 | Short block | Short block | |
| 3 | 8 | Long block | Long block | |
| 4 | 16 | Unrecoverable read error | Any mismatch | |
| 5 | 32 | Checksum error | Checksum error | |
| 6 | 64 | End of file | EOI line | |
| 7 | -128 | End of tape | Device not present | End of tape |
How to Use:
EXAMPLE:
;CHECK FOR END OF FILE DURING READ JSR READST AND #64 ;CHECK EOF BIT (EOF=END OF FILE) BNE EOF ;BRANCH ON EOF
| This page has been created by Sami Rautiainen. | |
| Read the small print. | Last updated December 17, 2002. |