LDOS 5.3.1 for the Model III - SYS4/SYS Disassembled
Page Customization
Page Index
SYS4/SYS
Other Navigation
Introduction/Summary
LDOS 5.3.1 SYS4/SYS Disassembly - @ERROR, the Error Messages (Model III)
SYS4/SYS turns an error number into its message for LDOS and displays it: the service @ERROR (4409H). It is a system file, loaded into the overlay area at 4E00H by the supervisor dispatcher of SYS0/SYS (4BCCH) whenever a request code names it: bits 3-0 of the code are 6. The only request of it that SYS0/SYS issues is 96H, from the @ERROR vector, which pushes the program's Register Pair AF first. The manual says that without this overlay every system error gives the message SYS ERROR, and that it takes one granule of a diskette.
The file is a load module of 1020 bytes: a record of type 1FH with the text Copyright 1991 MISOSYS, Inc., All rights reserved, four load blocks for 4E00H-51AEH, a load block for the two bytes 4BC8H-4BC9H (03AFH, the 943 bytes that SYS4/SYS takes up in the overlay area) and the transfer address record for 4E00H. The messages are not stored as text: a dictionary of 56 words (5088H), a run of word numbers for each message (4E03H) and an index of the runs by error number (505AH).
Calling @ERROR
The program puts the error number in Register A and calls 4409H. The bits of Register A:
| Bits | Meaning |
|---|---|
| 5-0 | The error number, 00H-3FH. A number above 2DH (45) gets the message of 2DH, unknown error code; the full message still shows the number given. |
| 6 | Set: the short message, the text alone. Clear: the full message, with the error number, the file or device and the address of the call. Bit 6 of SFLAG$ (442BH) clears this bit, so the full message is always given. |
| 7 | Set: return to the program after the message, with Register A = the error number and Register Pairs BC, DE and HL as they were. Clear: the program ends at @ABORT (4030H), back to LDOS Ready. |
Two bits of 4758H, the status byte of the command interpreter, change what is done. Bit 6 set: no message at all, only the return or the abort; no file on this diskette sets it. Bit 7 set: the short message is built in the program's buffer at Register Pair DE and not displayed, and bit 7 is cleared; TED/CMD uses this to show an error on its own status line (its 56AFH).
The Two Forms of the Message
The full message is built at 4300H and displayed (with the job log) by @LOGOT (428AH), then two more lines are displayed from the templates at 500DH-5059H:
| Line | Contents |
|---|---|
| 1 | A line feed, then *** Error code =NN, Text of the message *** (4EE4H, 4F02H, 4F33H). NN is the error number in decimal; the first letter of the text is made a capital. |
| 2 | <Device=*XX> or <File=NAME/EXT:d> for the control block at JDCB$ (4220H), the one the latest file call used (4F69H). For most errors the block is open: a file is named from its directory record (4FB0H), a device by the name at +06H-+07H. For the errors marked below the block is read as the file specification it holds before an open, and shown as it was given (4F8BH). |
| 3 | Referenced at X'NNNN': the address of the program's CALL into the file system, the return address in JRET$ (4BCAH) less 3 (4FF7H). |
The short message is the text alone, with a space after its last word and a carriage return.
The Messages
Each run of the definition table holds one byte for each word: bits 5-0 the word number, bit 7 set on the last word, and bit 6 of the last byte set for the errors whose control block is read as a file specification (shown here as named from the specification).
| Error | Message |
|---|---|
| 00H (0) | No error |
| 01H (1) | Parity error during header read |
| 02H (2) | Seek error during read |
| 03H (3) | Lost data during read |
| 04H (4) | Parity error during read |
| 05H (5) | Data record not found during read |
| 06H (6) | Attempted to read system data record |
| 07H (7) | Attempted to read locked/deleted data record |
| 08H (8) | Device not available (named from the specification) |
| 09H (9) | Parity error during header write |
| 0AH (10) | Seek error during write |
| 0BH (11) | Lost data during write |
| 0CH (12) | Parity error during write |
| 0DH (13) | Data record not found during write |
| 0EH (14) | Write fault on disk drive |
| 0FH (15) | Write protected disk |
| 10H (16) | Illegal logical file number |
| 11H (17) | Directory read error |
| 12H (18) | Directory write error |
| 13H (19) | Illegal file name (named from the specification) |
| 14H (20) | GAT read error |
| 15H (21) | GAT write error |
| 16H (22) | HIT read error |
| 17H (23) | HIT write error |
| 18H (24) | File not in directory (named from the specification) |
| 19H (25) | File access denied (named from the specification) |
| 1AH (26) | Full or write protected disk (named from the specification) |
| 1BH (27) | Disk space full |
| 1CH (28) | End of file encountered |
| 1DH (29) | Record number out of range |
| 1EH (30) | Directory full - can't extend file |
| 1FH (31) | Program not found (named from the specification) |
| 20H (32) | Illegal drive number (named from the specification) |
| 21H (33) | No device space available (named from the specification) |
| 22H (34) | Load file format error |
| 23H (35) | Memory fault |
| 24H (36) | Attempted to load read only memory |
| 25H (37) | Illegal access attempted to protected file |
| 26H (38) | File not open (named from the specification) |
| 27H (39) | Device in use |
| 28H (40) | Protected system device |
| 29H (41) | Unknown error code |
| 2AH (42) | Unknown error code |
| 2BH (43) | Unknown error code |
| 2CH (44) | Parameter error |
| 2DH (45) | Unknown error code |
About This Page
Every byte of the file is shown, in address order: the load block at 4BC8H first, then 4E00H-51AEH. One instruction is changed by the code before it runs: JP M,0000H at 4F63H, whose operand 4EB2H sets to the dispatcher's return address 4BE6H.
Memory Map
Load Blocks in File Order
The five load blocks of the file in the order the overlay loader (4C8CH) reads them, after the copyright record. The transfer address is 4E00H.
| Address | Contents |
|---|---|
| 4E00H-4EFFH | 256 bytes |
| 4F00H-4FFFH | 256 bytes |
| 5000H-50FFH | 256 bytes |
| 5100H-51AEH | 175 bytes |
| 4BC8H-4BC9H | 2 bytes |
Sections of the Disassembly
| Address | Contents |
|---|---|
| 4BC8H | The Overlay Length (Data) |
| 4E00H | Overlay Entry Point |
| 4E03H | Error Message Definition Table |
| 4EAEH | @ERROR Service Entry, Option Decode and Display Gating |
| 4ED8H | Bit 7 of 4758H: Build the Short Message for the Program |
| 4EE4H | Error Code Prefix Builder |
| 4F02H | Message Decompression Loop |
| 4F33H | Frame and Display the Message |
| 4F5EH | Return to the Program or Abort |
| 4F69H | Device or File Specification Builder |
| 4F8BH | The Control Block as a File Specification |
| 4FB0H | An Open File: the Name From Its Directory Record |
| 4FF7H | Display the Name and the Referenced At Line |
| 500DH | Message Template Literals |
| 505AH | Error Code Index Table |
| 5088H | Compressed Word Dictionary |
Memory SYS4/SYS Uses
| Address | Contents |
|---|---|
| 4030H | @ABORT: the end of the program when bit 7 of the error number is clear (4F66H). |
| 4300H-43FFH | The system buffer of SYS0/SYS: the full message is built here (4ED3H) and displayed; then the directory sector of an open file is read into it (4FB6H). |
| 4220H-4221H | JDCB$: the control block of the latest file call, named in the message (4F6BH). |
| 4BCAH-4BCBH | JRET$: the return address of the latest file call, shown less 3 in the referenced at line (4FFAH). |
| 442BH | SFLAG$: bit 6 forces the full message (4EBBH). |
| 428AH | @LOGOT: display a line and send it to the job log (4F53H, 4FF7H, 500AH). |
| 4758H | The status byte of the command interpreter: bit 6 no message, bit 7 the short message into the program's buffer (4ECAH, 4ECFH, 4F4EH). |
| 4B10H | DIRRD of SYS0/SYS: the directory record of an open file (4FB6H). |
| 4BC8H-4BC9H | The length of the system file in the overlay area: 03AFH for SYS4/SYS. |
| 4BE6H | The end of the supervisor dispatcher, the way back to the program (4EB2H, 4F63H). |
| 4D82H | Write Register Pair DE as four hex digits at Register Pair HL (5004H). |
| 4E00H-51AEH | SYS4/SYS in the overlay area. |
Variables
The entry points of SYS4/SYS, then the data of the file, the operand it changes, and the cells of SYS0/SYS it uses, by address.
Entry Points
| Address | Name | Contents |
|---|---|---|
| 4E00H | The entry: JP 4EAEH over the definition table. | |
| 4EAEH | @ERROR | Function 10H (request 96H, 4409H): display the message of the error number pushed by 4409H. |
| 4ED8H | Bit 7 of 4758H: the short message into the program's buffer, not displayed. | |
| 4EE4H | Write the prefix of the full message with the error number in decimal. | |
| 4F02H | Build the text of the message from the definition table and the dictionary. | |
| 4F33H | Capitalize, end and display the message. | |
| 4F5EH | Return to the program or end it at @ABORT. | |
| 4F69H | Display the file or device of the error and the referenced at line. | |
| 4FF7H | Display a line and then the referenced at line. |
Data in the File
| Address Size | Contents |
|---|---|
| 4BC8H-4BC9H 2 bytes | DEFW 03AFH 4BC8H-4BC9H: 03AFH (943), the number of bytes from 4E00H that SYS4/SYS takes up (4E00H-51AEH). Loading SYS4/SYS puts it over the length the system file loaded before it left here. |
| 4E03H-4E04H 2 bytes | DEFB 01H, 82H 4E03H-4E04H: the message of error 00H (0), no error: 01H (word 1, no); 82H (word 2, error, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E05H-4E09H 5 bytes | DEFB 04H, 02H, 05H, 06H, 89H 4E05H-4E09H: the message of error 01H (1), parity error during header read: 04H (word 4, parity); 02H (word 2, error); 05H (word 5, during); 06H (word 6, header); 89H (word 9, read, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E0AH-4E0DH 4 bytes | DEFB 08H, 02H, 05H, 89H 4E0AH-4E0DH: the message of error 02H (2), seek error during read: 08H (word 8, seek); 02H (word 2, error); 05H (word 5, during); 89H (word 9, read, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E0EH-4E11H 4 bytes | DEFB 0BH, 07H, 05H, 89H 4E0EH-4E11H: the message of error 03H (3), lost data during read: 0BH (word 11, lost); 07H (word 7, data); 05H (word 5, during); 89H (word 9, read, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E12H-4E15H 4 bytes | DEFB 04H, 02H, 05H, 89H 4E12H-4E15H: the message of error 04H (4), parity error during read: 04H (word 4, parity); 02H (word 2, error); 05H (word 5, during); 89H (word 9, read, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E16H-4E1BH 6 bytes | DEFB 07H, 1BH, 0CH, 2CH, 05H, 89H 4E16H-4E1BH: the message of error 05H (5), data record not found during read: 07H (word 7, data); 1BH (word 27, record); 0CH (word 12, not); 2CH (word 44, found); 05H (word 5, during); 89H (word 9, read, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E1CH-4E20H 5 bytes | DEFB 0DH, 09H, 0FH, 07H, 9BH 4E1CH-4E20H: the message of error 06H (6), attempted to read system data record: 0DH (word 13, attempted to); 09H (word 9, read); 0FH (word 15, system); 07H (word 7, data); 9BH (word 27, record, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E21H-4E25H 5 bytes | DEFB 0DH, 09H, 0EH, 07H, 9BH 4E21H-4E25H: the message of error 07H (7), attempted to read locked/deleted data record: 0DH (word 13, attempted to); 09H (word 9, read); 0EH (word 14, locked/deleted); 07H (word 7, data); 9BH (word 27, record, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E26H-4E28H 3 bytes | DEFB 2AH, 0CH, F3H 4E26H-4E28H: the message of error 08H (8), device not available: 2AH (word 42, device); 0CH (word 12, not); F3H (word 51, available, bit 7 set: the last word). Bit 6 of the last byte set: the control block is read as a file specification, its form before an open (4F8BH). |
| 4E29H-4E2DH 5 bytes | DEFB 04H, 02H, 05H, 06H, 8AH 4E29H-4E2DH: the message of error 09H (9), parity error during header write: 04H (word 4, parity); 02H (word 2, error); 05H (word 5, during); 06H (word 6, header); 8AH (word 10, write, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E2EH-4E31H 4 bytes | DEFB 08H, 02H, 05H, 8AH 4E2EH-4E31H: the message of error 0AH (10), seek error during write: 08H (word 8, seek); 02H (word 2, error); 05H (word 5, during); 8AH (word 10, write, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E32H-4E35H 4 bytes | DEFB 0BH, 07H, 05H, 8AH 4E32H-4E35H: the message of error 0BH (11), lost data during write: 0BH (word 11, lost); 07H (word 7, data); 05H (word 5, during); 8AH (word 10, write, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E36H-4E39H 4 bytes | DEFB 04H, 02H, 05H, 8AH 4E36H-4E39H: the message of error 0CH (12), parity error during write: 04H (word 4, parity); 02H (word 2, error); 05H (word 5, during); 8AH (word 10, write, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E3AH-4E3FH 6 bytes | DEFB 07H, 1BH, 0CH, 2CH, 05H, 8AH 4E3AH-4E3FH: the message of error 0DH (13), data record not found during write: 07H (word 7, data); 1BH (word 27, record); 0CH (word 12, not); 2CH (word 44, found); 05H (word 5, during); 8AH (word 10, write, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E40H-4E44H 5 bytes | DEFB 0AH, 15H, 12H, 13H, B0H 4E40H-4E44H: the message of error 0EH (14), write fault on disk drive: 0AH (word 10, write); 15H (word 21, fault); 12H (word 18, on); 13H (word 19, disk); B0H (word 48, drive, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E45H-4E47H 3 bytes | DEFB 0AH, 16H, 93H 4E45H-4E47H: the message of error 0FH (15), write protected disk: 0AH (word 10, write); 16H (word 22, protected); 93H (word 19, disk, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E48H-4E4BH 4 bytes | DEFB 17H, 18H, 1AH, 99H 4E48H-4E4BH: the message of error 10H (16), illegal logical file number: 17H (word 23, illegal); 18H (word 24, logical); 1AH (word 26, file); 99H (word 25, number, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E4CH-4E4EH 3 bytes | DEFB 10H, 09H, 82H 4E4CH-4E4EH: the message of error 11H (17), directory read error: 10H (word 16, directory); 09H (word 9, read); 82H (word 2, error, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E4FH-4E51H 3 bytes | DEFB 10H, 0AH, 82H 4E4FH-4E51H: the message of error 12H (18), directory write error: 10H (word 16, directory); 0AH (word 10, write); 82H (word 2, error, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E52H-4E54H 3 bytes | DEFB 17H, 1AH, E9H 4E52H-4E54H: the message of error 13H (19), illegal file name: 17H (word 23, illegal); 1AH (word 26, file); E9H (word 41, name, bit 7 set: the last word). Bit 6 of the last byte set: the control block is read as a file specification, its form before an open (4F8BH). |
| 4E55H-4E57H 3 bytes | DEFB 22H, 09H, 82H 4E55H-4E57H: the message of error 14H (20), GAT read error: 22H (word 34, GAT); 09H (word 9, read); 82H (word 2, error, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E58H-4E5AH 3 bytes | DEFB 22H, 0AH, 82H 4E58H-4E5AH: the message of error 15H (21), GAT write error: 22H (word 34, GAT); 0AH (word 10, write); 82H (word 2, error, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E5BH-4E5DH 3 bytes | DEFB 23H, 09H, 82H 4E5BH-4E5DH: the message of error 16H (22), HIT read error: 23H (word 35, HIT); 09H (word 9, read); 82H (word 2, error, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E5EH-4E60H 3 bytes | DEFB 23H, 0AH, 82H 4E5EH-4E60H: the message of error 17H (23), HIT write error: 23H (word 35, HIT); 0AH (word 10, write); 82H (word 2, error, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E61H-4E64H 4 bytes | DEFB 1AH, 0CH, 2DH, D0H 4E61H-4E64H: the message of error 18H (24), file not in directory: 1AH (word 26, file); 0CH (word 12, not); 2DH (word 45, in); D0H (word 16, directory, bit 7 set: the last word). Bit 6 of the last byte set: the control block is read as a file specification, its form before an open (4F8BH). |
| 4E65H-4E67H 3 bytes | DEFB 1AH, 2EH, F1H 4E65H-4E67H: the message of error 19H (25), file access denied: 1AH (word 26, file); 2EH (word 46, access); F1H (word 49, denied, bit 7 set: the last word). Bit 6 of the last byte set: the control block is read as a file specification, its form before an open (4F8BH). |
| 4E68H-4E6CH 5 bytes | DEFB 2FH, 37H, 0AH, 16H, D3H 4E68H-4E6CH: the message of error 1AH (26), full or write protected disk: 2FH (word 47, full); 37H (word 55, or); 0AH (word 10, write); 16H (word 22, protected); D3H (word 19, disk, bit 7 set: the last word). Bit 6 of the last byte set: the control block is read as a file specification, its form before an open (4F8BH). |
| 4E6DH-4E6FH 3 bytes | DEFB 13H, 27H, AFH 4E6DH-4E6FH: the message of error 1BH (27), disk space full: 13H (word 19, disk); 27H (word 39, space); AFH (word 47, full, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E70H-4E73H 4 bytes | DEFB 1CH, 1DH, 1AH, A0H 4E70H-4E73H: the message of error 1CH (28), end of file encountered: 1CH (word 28, end); 1DH (word 29, of); 1AH (word 26, file); A0H (word 32, encountered, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E74H-4E78H 5 bytes | DEFB 1BH, 19H, 1EH, 1DH, 9FH 4E74H-4E78H: the message of error 1DH (29), record number out of range: 1BH (word 27, record); 19H (word 25, number); 1EH (word 30, out); 1DH (word 29, of); 9FH (word 31, range, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E79H-4E7CH 4 bytes | DEFB 10H, 2FH, 34H, 9AH 4E79H-4E7CH: the message of error 1EH (30), directory full - can't extend file: 10H (word 16, directory); 2FH (word 47, full); 34H (word 52, - can't extend); 9AH (word 26, file, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E7DH-4E7FH 3 bytes | DEFB 32H, 0CH, ECH 4E7DH-4E7FH: the message of error 1FH (31), program not found: 32H (word 50, program); 0CH (word 12, not); ECH (word 44, found, bit 7 set: the last word). Bit 6 of the last byte set: the control block is read as a file specification, its form before an open (4F8BH). |
| 4E80H-4E82H 3 bytes | DEFB 17H, 30H, D9H 4E80H-4E82H: the message of error 20H (32), illegal drive number: 17H (word 23, illegal); 30H (word 48, drive); D9H (word 25, number, bit 7 set: the last word). Bit 6 of the last byte set: the control block is read as a file specification, its form before an open (4F8BH). |
| 4E83H-4E86H 4 bytes | DEFB 01H, 2AH, 27H, F3H 4E83H-4E86H: the message of error 21H (33), no device space available: 01H (word 1, no); 2AH (word 42, device); 27H (word 39, space); F3H (word 51, available, bit 7 set: the last word). Bit 6 of the last byte set: the control block is read as a file specification, its form before an open (4F8BH). |
| 4E87H-4E8AH 4 bytes | DEFB 26H, 1AH, 2BH, 82H 4E87H-4E8AH: the message of error 22H (34), load file format error: 26H (word 38, load); 1AH (word 26, file); 2BH (word 43, format); 82H (word 2, error, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E8BH-4E8CH 2 bytes | DEFB 11H, 95H 4E8BH-4E8CH: the message of error 23H (35), memory fault: 11H (word 17, memory); 95H (word 21, fault, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E8DH-4E91H 5 bytes | DEFB 0DH, 26H, 09H, 28H, 91H 4E8DH-4E91H: the message of error 24H (36), attempted to load read only memory: 0DH (word 13, attempted to); 26H (word 38, load); 09H (word 9, read); 28H (word 40, only); 91H (word 17, memory, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E92H-4E96H 5 bytes | DEFB 17H, 2EH, 0DH, 16H, 9AH 4E92H-4E96H: the message of error 25H (37), illegal access attempted to protected file: 17H (word 23, illegal); 2EH (word 46, access); 0DH (word 13, attempted to); 16H (word 22, protected); 9AH (word 26, file, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E97H-4E99H 3 bytes | DEFB 1AH, 0CH, F5H 4E97H-4E99H: the message of error 26H (38), file not open: 1AH (word 26, file); 0CH (word 12, not); F5H (word 53, open, bit 7 set: the last word). Bit 6 of the last byte set: the control block is read as a file specification, its form before an open (4F8BH). |
| 4E9AH-4E9CH 3 bytes | DEFB 2AH, 2DH, B6H 4E9AH-4E9CH: the message of error 27H (39), device in use: 2AH (word 42, device); 2DH (word 45, in); B6H (word 54, use, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4E9DH-4E9FH 3 bytes | DEFB 16H, 0FH, AAH 4E9DH-4E9FH: the message of error 28H (40), protected system device: 16H (word 22, protected); 0FH (word 15, system); AAH (word 42, device, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4EA0H-4EA2H 3 bytes | DEFB 25H, 02H, A1H 4EA0H-4EA2H: the message of error 29H (41), unknown error code: 25H (word 37, unknown); 02H (word 2, error); A1H (word 33, code, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4EA3H-4EA5H 3 bytes | DEFB 25H, 02H, A1H 4EA3H-4EA5H: the message of error 2AH (42), unknown error code: 25H (word 37, unknown); 02H (word 2, error); A1H (word 33, code, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4EA6H-4EA8H 3 bytes | DEFB 25H, 02H, A1H 4EA6H-4EA8H: the message of error 2BH (43), unknown error code: 25H (word 37, unknown); 02H (word 2, error); A1H (word 33, code, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4EA9H-4EAAH 2 bytes | DEFB 14H, 82H 4EA9H-4EAAH: the message of error 2CH (44), parameter error: 14H (word 20, parameter); 82H (word 2, error, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 4EABH-4EADH 3 bytes | DEFB 25H, 02H, A1H 4EABH-4EADH: the message of error 2DH (45), unknown error code: 25H (word 37, unknown); 02H (word 2, error); A1H (word 33, code, bit 7 set: the last word). Bit 6 of the last byte clear: the file or device is named from the open control block. |
| 500DH 1 byte | DEFB 0AH 500DH: 0AH, the line feed that starts the full message on a new line, the first of the 17 bytes 4EE5H-4EEAH copy to the buffer. |
| 500EH-5010H 3 bytes | DEFM "***" 500EH-5010H: three asterisks (2AH 2AH 2AH), the start of the full message, and the three bytes 4F3EH-4F44H copy after its last word as its end. |
| 5011H-501DH 13 bytes | DEFM " Error code =" 5011H-501DH: the text Error code = with a space before it; 4EEFH-4EFAH write the two decimal digits of the error number right after the equal sign. |
| 501EH-5027H 10 bytes | DEFM " <Device=*" 501EH-5027H: a space, the text Device= in angle brackets as far as the 2AH (the asterisk) of the device specification, displayed from 501EH by 4F86H-4F89H. |
| 5028H-5029H 2 bytes | DEFM "XX" 5028H-5029H: the two letters of the device name, placeholders that 4F82H overwrites with Register Pair BC (the name from the control block) before the line is shown. |
| 502AH 1 byte | DEFM ">" 502AH: the closing angle bracket of the device line, after the two letters of the device name at 5028H-5029H. |
| 502BH 1 byte | DEFB 0DH 502BH: 0DH, the carriage return that ends the device line; @LOGOT (428AH) displays it and stops there. |
| 502CH-5032H 7 bytes | DEFM " <File=" 502CH-5032H: a space and the text File= after an angle bracket, the start of the file line displayed from 502CH by 4FF4H-4FF7H. |
| 5033H-503AH 8 bytes | DEFM "NNNNNNNN" 5033H-503AH: placeholders for the file name. 4FB0H-4FCAH write the name from the directory record here, and 4F98H-4FACH copy the file specification held in the control block. |
| 503BH 1 byte | DEFM "/" 503BH: the slash between the name and the extension in the template. 4FCCH writes its own slash after the name it copied, so this byte is overwritten. |
| 503CH-503EH 3 bytes | DEFM "EEE" 503CH-503EH: placeholders for the file's extension, overwritten by the extension and the rest of the file specification written from 5033H. |
| 503FH 1 byte | DEFM ":" 503FH: the colon before the drive number in the template, overwritten by the specification 4F98H-4FF1H write from 5033H. |
| 5040H 1 byte | DEFM "D" 5040H: a placeholder for the drive number, overwritten by the specification 4F98H-4FF1H write from 5033H. |
| 5041H 1 byte | DEFM ">" 5041H: the closing angle bracket of the template; 4FEBH-4FEDH write their own after the specification, wherever it ends. |
| 5042H 1 byte | DEFB 0DH 5042H: 0DH, the carriage return of the template; 4FEFH-4FF1H write their own after the closing angle bracket. |
| 5043H-5053H 17 bytes | DEFM " Referenced at X'" 5043H-5053H: a space, the text Referenced at and X with an apostrophe, the start of the line that 5007H-500AH display: the address the error was reported from. |
| 5054H-5057H 4 bytes | DEFM "NNNN" 5054H-5057H: placeholders for four hex digits, overwritten by 5001H-5004H (4D82H of SYS0/SYS) with the address of the program's call into the file system. |
| 5058H 1 byte | DEFM "'" 5058H: the apostrophe that closes the hex address X'NNNN' of the referenced at line. |
| 5059H 1 byte | DEFB 0DH 5059H: 0DH, the carriage return that ends the referenced at line and the whole message. |
| 505AH 1 byte | DEFB 03H 505AH, error 00H (0): 03H, the definition at 4E03H (4E00H + 03H): no error. |
| 505BH 1 byte | DEFB 05H 505BH, error 01H (1): 05H, the definition at 4E05H (4E00H + 05H): parity error during header read. |
| 505CH 1 byte | DEFB 0AH 505CH, error 02H (2): 0AH, the definition at 4E0AH (4E00H + 0AH): seek error during read. |
| 505DH 1 byte | DEFB 0EH 505DH, error 03H (3): 0EH, the definition at 4E0EH (4E00H + 0EH): lost data during read. |
| 505EH 1 byte | DEFB 12H 505EH, error 04H (4): 12H, the definition at 4E12H (4E00H + 12H): parity error during read. |
| 505FH 1 byte | DEFB 16H 505FH, error 05H (5): 16H, the definition at 4E16H (4E00H + 16H): data record not found during read. |
| 5060H 1 byte | DEFB 1CH 5060H, error 06H (6): 1CH, the definition at 4E1CH (4E00H + 1CH): attempted to read system data record. |
| 5061H 1 byte | DEFB 21H 5061H, error 07H (7): 21H, the definition at 4E21H (4E00H + 21H): attempted to read locked/deleted data record. |
| 5062H 1 byte | DEFB 26H 5062H, error 08H (8): 26H, the definition at 4E26H (4E00H + 26H): device not available. |
| 5063H 1 byte | DEFB 29H 5063H, error 09H (9): 29H, the definition at 4E29H (4E00H + 29H): parity error during header write. |
| 5064H 1 byte | DEFB 2EH 5064H, error 0AH (10): 2EH, the definition at 4E2EH (4E00H + 2EH): seek error during write. |
| 5065H 1 byte | DEFB 32H 5065H, error 0BH (11): 32H, the definition at 4E32H (4E00H + 32H): lost data during write. |
| 5066H 1 byte | DEFB 36H 5066H, error 0CH (12): 36H, the definition at 4E36H (4E00H + 36H): parity error during write. |
| 5067H 1 byte | DEFB 3AH 5067H, error 0DH (13): 3AH, the definition at 4E3AH (4E00H + 3AH): data record not found during write. |
| 5068H 1 byte | DEFB 40H 5068H, error 0EH (14): 40H, the definition at 4E40H (4E00H + 40H): write fault on disk drive. |
| 5069H 1 byte | DEFB 45H 5069H, error 0FH (15): 45H, the definition at 4E45H (4E00H + 45H): write protected disk. |
| 506AH 1 byte | DEFB 48H 506AH, error 10H (16): 48H, the definition at 4E48H (4E00H + 48H): illegal logical file number. |
| 506BH 1 byte | DEFB 4CH 506BH, error 11H (17): 4CH, the definition at 4E4CH (4E00H + 4CH): directory read error. |
| 506CH 1 byte | DEFB 4FH 506CH, error 12H (18): 4FH, the definition at 4E4FH (4E00H + 4FH): directory write error. |
| 506DH 1 byte | DEFB 52H 506DH, error 13H (19): 52H, the definition at 4E52H (4E00H + 52H): illegal file name. |
| 506EH 1 byte | DEFB 55H 506EH, error 14H (20): 55H, the definition at 4E55H (4E00H + 55H): GAT read error. |
| 506FH 1 byte | DEFB 58H 506FH, error 15H (21): 58H, the definition at 4E58H (4E00H + 58H): GAT write error. |
| 5070H 1 byte | DEFB 5BH 5070H, error 16H (22): 5BH, the definition at 4E5BH (4E00H + 5BH): HIT read error. |
| 5071H 1 byte | DEFB 5EH 5071H, error 17H (23): 5EH, the definition at 4E5EH (4E00H + 5EH): HIT write error. |
| 5072H 1 byte | DEFB 61H 5072H, error 18H (24): 61H, the definition at 4E61H (4E00H + 61H): file not in directory. |
| 5073H 1 byte | DEFB 65H 5073H, error 19H (25): 65H, the definition at 4E65H (4E00H + 65H): file access denied. |
| 5074H 1 byte | DEFB 68H 5074H, error 1AH (26): 68H, the definition at 4E68H (4E00H + 68H): full or write protected disk. |
| 5075H 1 byte | DEFB 6DH 5075H, error 1BH (27): 6DH, the definition at 4E6DH (4E00H + 6DH): disk space full. |
| 5076H 1 byte | DEFB 70H 5076H, error 1CH (28): 70H, the definition at 4E70H (4E00H + 70H): end of file encountered. |
| 5077H 1 byte | DEFB 74H 5077H, error 1DH (29): 74H, the definition at 4E74H (4E00H + 74H): record number out of range. |
| 5078H 1 byte | DEFB 79H 5078H, error 1EH (30): 79H, the definition at 4E79H (4E00H + 79H): directory full - can't extend file. |
| 5079H 1 byte | DEFB 7DH 5079H, error 1FH (31): 7DH, the definition at 4E7DH (4E00H + 7DH): program not found. |
| 507AH 1 byte | DEFB 80H 507AH, error 20H (32): 80H, the definition at 4E80H (4E00H + 80H): illegal drive number. |
| 507BH 1 byte | DEFB 83H 507BH, error 21H (33): 83H, the definition at 4E83H (4E00H + 83H): no device space available. |
| 507CH 1 byte | DEFB 87H 507CH, error 22H (34): 87H, the definition at 4E87H (4E00H + 87H): load file format error. |
| 507DH 1 byte | DEFB 8BH 507DH, error 23H (35): 8BH, the definition at 4E8BH (4E00H + 8BH): memory fault. |
| 507EH 1 byte | DEFB 8DH 507EH, error 24H (36): 8DH, the definition at 4E8DH (4E00H + 8DH): attempted to load read only memory. |
| 507FH 1 byte | DEFB 92H 507FH, error 25H (37): 92H, the definition at 4E92H (4E00H + 92H): illegal access attempted to protected file. |
| 5080H 1 byte | DEFB 97H 5080H, error 26H (38): 97H, the definition at 4E97H (4E00H + 97H): file not open. |
| 5081H 1 byte | DEFB 9AH 5081H, error 27H (39): 9AH, the definition at 4E9AH (4E00H + 9AH): device in use. |
| 5082H 1 byte | DEFB 9DH 5082H, error 28H (40): 9DH, the definition at 4E9DH (4E00H + 9DH): protected system device. |
| 5083H 1 byte | DEFB A0H 5083H, error 29H (41): A0H, the definition at 4EA0H (4E00H + A0H): unknown error code. |
| 5084H 1 byte | DEFB A3H 5084H, error 2AH (42): A3H, the definition at 4EA3H (4E00H + A3H): unknown error code. |
| 5085H 1 byte | DEFB A6H 5085H, error 2BH (43): A6H, the definition at 4EA6H (4E00H + A6H): unknown error code. |
| 5086H 1 byte | DEFB A9H 5086H, error 2CH (44): A9H, the definition at 4EA9H (4E00H + A9H): parameter error. |
| 5087H 1 byte | DEFB ABH 5087H, error 2DH (45): ABH, the definition at 4EABH (4E00H + ABH): unknown error code. |
| 5088H 1 byte | DEFB D2H 5088H: word 0, R; its only character, R (52H), is stored as D2H, with bit 7 set. Not used: the search at 4F15H-4F1EH skips at least one word end, so it never stops on the first word. |
| 5089H-508AH 2 bytes | DEFM "n",EFH 5089H-508AH: word 1, no; its last character, o (6FH), is stored as EFH, with bit 7 set. Used by errors 00H, 21H. |
| 508BH-508FH 5 bytes | DEFM "erro",F2H 508BH-508FH: word 2, error; its last character, r (72H), is stored as F2H, with bit 7 set. Used by errors 00H, 01H, 02H, 04H, 09H, 0AH, 0CH, 11H, 12H, 14H, 15H, 16H, 17H, 22H, 29H, 2AH, 2BH, 2CH, 2DH. |
| 5090H 1 byte | DEFB EFH 5090H: word 3, o; its only character, o (6FH), is stored as EFH, with bit 7 set. No message uses it. |
| 5091H-5096H 6 bytes | DEFM "parit",F9H 5091H-5096H: word 4, parity; its last character, y (79H), is stored as F9H, with bit 7 set. Used by errors 01H, 04H, 09H, 0CH. |
| 5097H-509CH 6 bytes | DEFM "durin",E7H 5097H-509CH: word 5, during; its last character, g (67H), is stored as E7H, with bit 7 set. Used by errors 01H, 02H, 03H, 04H, 05H, 09H, 0AH, 0BH, 0CH, 0DH. |
| 509DH-50A2H 6 bytes | DEFM "heade",F2H 509DH-50A2H: word 6, header; its last character, r (72H), is stored as F2H, with bit 7 set. Used by errors 01H, 09H. |
| 50A3H-50A6H 4 bytes | DEFM "dat",E1H 50A3H-50A6H: word 7, data; its last character, a (61H), is stored as E1H, with bit 7 set. Used by errors 03H, 05H, 06H, 07H, 0BH, 0DH. |
| 50A7H-50AAH 4 bytes | DEFM "see",EBH 50A7H-50AAH: word 8, seek; its last character, k (6BH), is stored as EBH, with bit 7 set. Used by errors 02H, 0AH. |
| 50ABH-50AEH 4 bytes | DEFM "rea",E4H 50ABH-50AEH: word 9, read; its last character, d (64H), is stored as E4H, with bit 7 set. Used by errors 01H, 02H, 03H, 04H, 05H, 06H, 07H, 11H, 14H, 16H, 24H. |
| 50AFH-50B3H 5 bytes | DEFM "writ",E5H 50AFH-50B3H: word 10, write; its last character, e (65H), is stored as E5H, with bit 7 set. Used by errors 09H, 0AH, 0BH, 0CH, 0DH, 0EH, 0FH, 12H, 15H, 17H, 1AH. |
| 50B4H-50B7H 4 bytes | DEFM "los",F4H 50B4H-50B7H: word 11, lost; its last character, t (74H), is stored as F4H, with bit 7 set. Used by errors 03H, 0BH. |
| 50B8H-50BAH 3 bytes | DEFM "no",F4H 50B8H-50BAH: word 12, not; its last character, t (74H), is stored as F4H, with bit 7 set. Used by errors 05H, 08H, 0DH, 18H, 1FH, 26H. |
| 50BBH-50C6H 12 bytes | DEFM "attempted t",EFH 50BBH-50C6H: word 13, attempted to; its last character, o (6FH), is stored as EFH, with bit 7 set. Used by errors 06H, 07H, 24H, 25H. |
| 50C7H-50D4H 14 bytes | DEFM "locked/delete",E4H 50C7H-50D4H: word 14, locked/deleted; its last character, d (64H), is stored as E4H, with bit 7 set. Used by error 07H. |
| 50D5H-50DAH 6 bytes | DEFM "syste",EDH 50D5H-50DAH: word 15, system; its last character, m (6DH), is stored as EDH, with bit 7 set. Used by errors 06H, 28H. |
| 50DBH-50E3H 9 bytes | DEFM "director",F9H 50DBH-50E3H: word 16, directory; its last character, y (79H), is stored as F9H, with bit 7 set. Used by errors 11H, 12H, 18H, 1EH. |
| 50E4H-50E9H 6 bytes | DEFM "memor",F9H 50E4H-50E9H: word 17, memory; its last character, y (79H), is stored as F9H, with bit 7 set. Used by errors 23H, 24H. |
| 50EAH-50EBH 2 bytes | DEFM "o",EEH 50EAH-50EBH: word 18, on; its last character, n (6EH), is stored as EEH, with bit 7 set. Used by error 0EH. |
| 50ECH-50EFH 4 bytes | DEFM "dis",EBH 50ECH-50EFH: word 19, disk; its last character, k (6BH), is stored as EBH, with bit 7 set. Used by errors 0EH, 0FH, 1AH, 1BH. |
| 50F0H-50F8H 9 bytes | DEFM "paramete",F2H 50F0H-50F8H: word 20, parameter; its last character, r (72H), is stored as F2H, with bit 7 set. Used by error 2CH. |
| 50F9H-50FDH 5 bytes | DEFM "faul",F4H 50F9H-50FDH: word 21, fault; its last character, t (74H), is stored as F4H, with bit 7 set. Used by errors 0EH, 23H. |
| 50FEH-5106H 9 bytes | DEFM "protecte",E4H 50FEH-5106H: word 22, protected; its last character, d (64H), is stored as E4H, with bit 7 set. Used by errors 0FH, 1AH, 25H, 28H. |
| 5107H-510DH 7 bytes | DEFM "illega",ECH 5107H-510DH: word 23, illegal; its last character, l (6CH), is stored as ECH, with bit 7 set. Used by errors 10H, 13H, 20H, 25H. |
| 510EH-5114H 7 bytes | DEFM "logica",ECH 510EH-5114H: word 24, logical; its last character, l (6CH), is stored as ECH, with bit 7 set. Used by error 10H. |
| 5115H-511AH 6 bytes | DEFM "numbe",F2H 5115H-511AH: word 25, number; its last character, r (72H), is stored as F2H, with bit 7 set. Used by errors 10H, 1DH, 20H. |
| 511BH-511EH 4 bytes | DEFM "fil",E5H 511BH-511EH: word 26, file; its last character, e (65H), is stored as E5H, with bit 7 set. Used by errors 10H, 13H, 18H, 19H, 1CH, 1EH, 22H, 25H, 26H. |
| 511FH-5124H 6 bytes | DEFM "recor",E4H 511FH-5124H: word 27, record; its last character, d (64H), is stored as E4H, with bit 7 set. Used by errors 05H, 06H, 07H, 0DH, 1DH. |
| 5125H-5127H 3 bytes | DEFM "en",E4H 5125H-5127H: word 28, end; its last character, d (64H), is stored as E4H, with bit 7 set. Used by error 1CH. |
| 5128H-5129H 2 bytes | DEFM "o",E6H 5128H-5129H: word 29, of; its last character, f (66H), is stored as E6H, with bit 7 set. Used by errors 1CH, 1DH. |
| 512AH-512CH 3 bytes | DEFM "ou",F4H 512AH-512CH: word 30, out; its last character, t (74H), is stored as F4H, with bit 7 set. Used by error 1DH. |
| 512DH-5131H 5 bytes | DEFM "rang",E5H 512DH-5131H: word 31, range; its last character, e (65H), is stored as E5H, with bit 7 set. Used by error 1DH. |
| 5132H-513CH 11 bytes | DEFM "encountere",E4H 5132H-513CH: word 32, encountered; its last character, d (64H), is stored as E4H, with bit 7 set. Used by error 1CH. |
| 513DH-5140H 4 bytes | DEFM "cod",E5H 513DH-5140H: word 33, code; its last character, e (65H), is stored as E5H, with bit 7 set. Used by errors 29H, 2AH, 2BH, 2DH. |
| 5141H-5143H 3 bytes | DEFM "GA",D4H 5141H-5143H: word 34, GAT; its last character, T (54H), is stored as D4H, with bit 7 set. Used by errors 14H, 15H. |
| 5144H-5146H 3 bytes | DEFM "HI",D4H 5144H-5146H: word 35, HIT; its last character, T (54H), is stored as D4H, with bit 7 set. Used by errors 16H, 17H. |
| 5147H 1 byte | DEFB F9H 5147H: word 36, y; its only character, y (79H), is stored as F9H, with bit 7 set. No message uses it. |
| 5148H-514EH 7 bytes | DEFM "unknow",EEH 5148H-514EH: word 37, unknown; its last character, n (6EH), is stored as EEH, with bit 7 set. Used by errors 29H, 2AH, 2BH, 2DH. |
| 514FH-5152H 4 bytes | DEFM "loa",E4H 514FH-5152H: word 38, load; its last character, d (64H), is stored as E4H, with bit 7 set. Used by errors 22H, 24H. |
| 5153H-5157H 5 bytes | DEFM "spac",E5H 5153H-5157H: word 39, space; its last character, e (65H), is stored as E5H, with bit 7 set. Used by errors 1BH, 21H. |
| 5158H-515BH 4 bytes | DEFM "onl",F9H 5158H-515BH: word 40, only; its last character, y (79H), is stored as F9H, with bit 7 set. Used by error 24H. |
| 515CH-515FH 4 bytes | DEFM "nam",E5H 515CH-515FH: word 41, name; its last character, e (65H), is stored as E5H, with bit 7 set. Used by error 13H. |
| 5160H-5165H 6 bytes | DEFM "devic",E5H 5160H-5165H: word 42, device; its last character, e (65H), is stored as E5H, with bit 7 set. Used by errors 08H, 21H, 27H, 28H. |
| 5166H-516BH 6 bytes | DEFM "forma",F4H 5166H-516BH: word 43, format; its last character, t (74H), is stored as F4H, with bit 7 set. Used by error 22H. |
| 516CH-5170H 5 bytes | DEFM "foun",E4H 516CH-5170H: word 44, found; its last character, d (64H), is stored as E4H, with bit 7 set. Used by errors 05H, 0DH, 1FH. |
| 5171H-5172H 2 bytes | DEFM "i",EEH 5171H-5172H: word 45, in; its last character, n (6EH), is stored as EEH, with bit 7 set. Used by errors 18H, 27H. |
| 5173H-5178H 6 bytes | DEFM "acces",F3H 5173H-5178H: word 46, access; its last character, s (73H), is stored as F3H, with bit 7 set. Used by errors 19H, 25H. |
| 5179H-517CH 4 bytes | DEFM "ful",ECH 5179H-517CH: word 47, full; its last character, l (6CH), is stored as ECH, with bit 7 set. Used by errors 1AH, 1BH, 1EH. |
| 517DH-5181H 5 bytes | DEFM "driv",E5H 517DH-5181H: word 48, drive; its last character, e (65H), is stored as E5H, with bit 7 set. Used by errors 0EH, 20H. |
| 5182H-5187H 6 bytes | DEFM "denie",E4H 5182H-5187H: word 49, denied; its last character, d (64H), is stored as E4H, with bit 7 set. Used by error 19H. |
| 5188H-518EH 7 bytes | DEFM "progra",EDH 5188H-518EH: word 50, program; its last character, m (6DH), is stored as EDH, with bit 7 set. Used by error 1FH. |
| 518FH-5197H 9 bytes | DEFM "availabl",E5H 518FH-5197H: word 51, available; its last character, e (65H), is stored as E5H, with bit 7 set. Used by errors 08H, 21H. |
| 5198H-51A5H 14 bytes | DEFM "- can't exten",E4H 5198H-51A5H: word 52, - can't extend; its last character, d (64H), is stored as E4H, with bit 7 set. Used by error 1EH. |
| 51A6H-51A9H 4 bytes | DEFM "ope",EEH 51A6H-51A9H: word 53, open; its last character, n (6EH), is stored as EEH, with bit 7 set. Used by error 26H. |
| 51AAH-51ACH 3 bytes | DEFM "us",E5H 51AAH-51ACH: word 54, use; its last character, e (65H), is stored as E5H, with bit 7 set. Used by error 27H. |
| 51ADH-51AEH 2 bytes | DEFM "o",F2H 51ADH-51AEH: word 55, or; its last character, r (72H), is stored as F2H, with bit 7 set. Used by error 1AH. |
Self-Modified Operands
| Address Size | Contents |
|---|---|
| 4F64H-4F65H 2 bytes | The operand of JP M,0000H at 4F63H: 4EB2H stores the dispatcher's return address 4BE6H here, so an error number with bit 7 set goes back through the end of the dispatcher (which puts the BREAK trap switch back) to the program. |
Cells Outside the File That SYS4/SYS Uses
| Address Size | Contents |
|---|---|
| 4220H-4221H 2 bytes | JDCB$, the address of the file or device control block of the latest call into the file system, stored by the file prologue of SYS0/SYS (49F9H): the block named in the second line of the full message (4F6BH). |
| 4BCAH-4BCBH 2 bytes | JRET$, the return address of the latest call into the file system, stored by the file prologue (49F6H): less 3, the address in the referenced at line (4FFAH). |
| 442BH 1 byte | SFLAG$, the system flags: when bit 6 is set the short message bit of the error number is cleared, so the full message is given (4EBBH-4EC2H). SYS4/SYS is the only code on this diskette that tests the bit. |
| 4300H-43FFH 256 bytes | The system buffer of SYS0/SYS: the full or short message is built here unless bit 7 of 4758H is set; afterwards the directory sector of an open file is read into it for its name (4FB6H). |
| 4758H 1 byte | The status byte of the command interpreter (the fifth byte of SELECT among the disk primitives of SYS0/SYS): bit 6 set, no message (4ECAH; set by no file on this diskette); bit 7 set, the short message is built at the program's Register Pair DE and not displayed, and bit 7 is cleared (4ECFH, 4F4EH; TED/CMD sets it, its 56AFH). |
Disassembly
4BC8H - The Overlay Length (Data)
Every system file from SYS1/SYS to SYS12/SYS carries a load block for the two bytes 4BC8H-4BC9H in the resident area of SYS0/SYS. They hold the length of the file's part in the overlay area: for SYS4/SYS 03AFH, the 943 bytes 4E00H-51AEH. In the file this block is the last load block, after the four blocks of 4E00H-51AEH and before the transfer address record (4E00H). SYS7/SYS reads and writes the word (its 55E4H, 5692H). The two bytes are data, not instructions.
4E00H - Overlay Entry Point
The supervisor dispatcher (4BCCH) loads SYS4/SYS into 4E00H for a request code whose bits 3-0 are 6 and calls 4E00H with Register A = the request code (from OVRLY$, 4414H). The only request of SYS4/SYS that SYS0/SYS issues is 96H, from the @ERROR vector at 4409H. The first instruction jumps over the message definition table to the code at 4EAEH.
4E03H - Error Message Definition Table
One run of bytes for each message, found through the index table at 505AH: the low byte of the run's address is the index entry of its error number. Each byte names a word of the dictionary at 5088H: bits 5-0 are the word number (1-55), bit 7 set marks the last word of the message, and bit 6 of the last byte says how SYS4/SYS names the file or device of the error (4F70H): clear, the control block at JDCB$ (4220H) is an open file or device and is named from it; set, the control block is read as the file specification it holds before an open (the errors of an open, a load or a file name). The messages are built word by word with a space after each word.
4EAEH - @ERROR Service Entry, Option Decode and Display Gating
Entered from 4E00H with Register A = the request code. A program calls @ERROR (4409H) with the error number in Register A: bits 5-0 the number, bit 6 set for the short message (the text alone), bit 7 set to get control back instead of ending at @ABORT (4030H). 4409H pushes Register Pair AF and issues request 96H; the dispatcher drops the return address of the RST 28H and CALLs 4E00H, so the stack holds the dispatcher's return 4BE6H, then the program's Register Pair AF, then the program's return address. Bit 6 of SFLAG$ (442BH) clears the short message bit; bit 6 of 4758H (the command interpreter's status byte) suppresses the message; bit 7 of 4758H builds the short message in the program's buffer at Register Pair DE without displaying it.
4ED8H - Bit 7 of 4758H: Build the Short Message for the Program
Register Pair DE still holds the program's own Register Pair DE, the buffer the program wants the text in. The short message is forced in Register B and in the error number saved on the stack, so the text is built alone and, at 4F49H, not displayed.
4EE4H - Error Code Prefix Builder
The full message starts with a line feed, three asterisks, Error code =, the error number in two decimal digits, a comma and a space, written at Register Pair DE (4300H). Register Pair DE ends one past the space.
4F02H - Message Decompression Loop
Register C = the error number, Register B = 00H, Register Pair DE = where the text goes (4300H, 4315H or the program's buffer). The number picks a run of the definition table through the index table at 505AH; each byte of the run names a word of the dictionary at 5088H, which is copied with bit 7 of its last character cleared and a space after it, until the byte with bit 7 set.
4F33H - Frame and Display the Message
Register Pair DE = one past the space after the last word, Register Pair HL = one past the last definition byte, and the start of the text is on top of the stack. The first letter is made a capital, the full message gets three asterisks at its end, a carriage return ends the text, and the text at 4300H is displayed and logged unless bit 7 of 4758H was set. For the full message the file or device and the address of the call are shown next (4F69H).
4F5EH - Return to the Program or Abort
The stack holds the error number saved at 4EC3H, the program's Register Pairs BC, DE and HL, and the program's return address. Bit 7 of the error number decides: set, back to the program through the dispatcher's end (4BE6H, which puts the BREAK trap switch back); clear, the program ends at @ABORT.
4F69H - Device or File Specification Builder
Called from 4F5BH for the full message, with Register Pair HL one past the last definition byte. Index Register IX = JDCB$ (4220H), the control block the file prologue of SYS0/SYS (49F9H) noted for the latest file call. Bit 6 of the last definition byte picks the source of the name: clear, an open control block (an open file is named from its directory record, 4FB0H; an open device from its +06H-+07H); set, the block is read as the file specification it holds before an open (4F8BH). The line is displayed and the referenced at line follows (4FF7H).
4F8BH - The Control Block as a File Specification
Before an open the control block holds the file specification as typed, ended by 03H or 0DH; a device specification starts with 2AH (the asterisk) and the two letters of the name. Index Register IX = the control block; the caller's Index Register IX is on the stack.
4FB0H - An Open File: the Name From Its Directory Record
Index Register IX = the control block of an open file: +06H the drive, +07H the number of its directory record. The record is read into 4300H (the message has already been displayed from there) and the name and the extension are copied from it, then a colon and the drive digit.
4FF7H - Display the Name and the Referenced At Line
Register Pair HL = the device line (501EH) or the file line (502CH). After it the referenced at line gives, as four hex digits, the address of the program's CALL into the file system: JRET$ (4BCAH), the return address the file prologue noted, less 3.
500DH - Message Template Literals
The fixed parts of the messages, copied or displayed from here: the prefix of the full message (500DH-501DH, its 2AH 2AH 2AH also used as the suffix at 500EH), the device line (501EH-502BH), the file line (502CH-5042H) and the referenced at line (5043H-5059H). The letters X, N, E and D are placeholders that 4F82H, 4F98H-4FF1H and 5004H overwrite before the line is displayed.
505AH - Error Code Index Table
One byte for each error number 00H-2DH (0-45): the low byte of the address of the error's run in the definition table, whose high byte is 4EH (4F09H-4F0EH). A larger error number is taken as 2DH (4F02H-4F08H). The errors 29H, 2AH, 2BH and 2DH have no message of their own: their bytes point at runs that make unknown error code.
5088H - Compressed Word Dictionary
56 words, each stored once, its last character with bit 7 set (4F18H-4F27H: RLCA moves bit 7 into the CARRY FLAG). Word n is found by skipping n word ends from 5088H, so the first word, number 0, is never reached: a definition byte with word number 0 would skip 256. The words 3 (o) and 36 (y) are used by no message either. The block of the file ends at 50FFH and the last block, 5100H-51AEH, continues the word protected.