General:
SYS6 handles the following DOS Commands: APPEND, ATTRIB, AUTO, BUILD, CLEAR, CLOCK, CREATE, DATE, DIR, DO, DUMP, ERROR, FREE, LIB, LOAD, PAUSE, PROT, RENAME, and TIME
On Entry, Register C must hold the order number of the command and Register Pair HL the Buffer Input Line.
Disassembly:
NOTE: 4414H is the storage location for the NUMBER OF THE OVERLAY CURRENTLY IN MEMORY.
NOTE: 42FFH is the storage location for whether a password check is skipped or undertaken in an OPEN command. If Bit 0 is set, the check is skipped.
NOTE: 427AH is the storage location for the EXECUTE FILE FLAG.
[529BH]
[5213H]
5213H – Continuation of the above initial processing routine. Jumped here if there was no routine match.
↳BEGIN1
5218H – Process a PARAMETER NOT FOUND error.
↳ERR3
521CH – Process a FILE ALREADY EXISTS error.
↳ERR1
5220H – Display “END LESS THAN START” and RETurn.
↳ERR5
[523DH]
5225H – Display “START LESS THAN 6000” and RETurn.
↳ERR6
[523DH]
522AH – Display “MEMORY FAULT AT X ‘nnnn'” and RETurn.
↳ERR7
[523DH]
522FH – Display “LRL OF FILES DO NOT MATCH” and RETurn.
↳ERR13
[523DH]
5234H – Process a DISK DRIVE NOT ON error.
↳ERR9
5238H – Process a FILE ACCESS DENIED error.
“ERR4”
523DH – Display the message pointed to by Register Pair HL via the ROM and RETurn.
↳ERRY
[021BH]
NOTE: 021BH will display the character at (HL) until a 03H is found.
5240H – Message Storage Area.
↳MESS5
↳MESS6
↳BADRAM
↳BADLRL
529BH – Routine to Parse the Table of Functions looking to match the requested function number (held in Register C on entry).
↳GETTAB
↳GETTA1
[52B1H]
[52AAH]
52A5
52A7
INC HL
INC HL
52AAH – Continuation of the routine to Parse the Table of Functions. If we are here, then HL is pointing to the entry in the lookup table which matches the desired routine held in Register C on entry.
↳FOUND
52B1H – Continuation of the routine to Parse the Table of Functions. If we are here, then we parsed the table of functions but did not fine one which matches the requested function number (held in Register C on entry).
↳NOTFND
52B3H – Table of Functions in this Overlay.
↳TABCOM
52EDH – AUTO Library Command – Function 3
↳AUTO
[52F9H]
LD C,AUTDRV
[4A93H]
NOTE: 4A93H is the SYS00/SYS routine to READ THE GAT SECTOR INTO RAM (Buffer at 4D00H).
[6132H]
- If Register A equals SPACE, the Z FLAG is set.
- If A < SPACE, the CARRY FLAG will be set.
- if A >= SPACE, the NO CARRY FLAG will be set.
[5315H]
5315H – Continuation of the AUTO command; jumped here if there was a command character found in the passed command line. This routine will fill the command line to be 31 chararcters (with spaces) and put it into the appropriate location in the GAT sector.
↳AUTO4
[4A9BH]
NOTE: 4A9BH is the SYS00/SYS routine to to write the GAT sector from RAM to diskette.
[6132H]
[021BH]
NOTE: 021BH will display the character at (HL) until a 03H is found.
- If Register A equals SPACE, the Z FLAG is set.
- If A < SPACE, the CARRY FLAG will be set.
- if A >= SPACE, the NO CARRY FLAG will be set.
[534FH]
- If Register A equals SPACE, the Z FLAG is set.
- If A < SPACE, the CARRY FLAG will be set.
- if A >= SPACE, the NO CARRY FLAG will be set.
[5349H]
5349H – Continuation of the AUTO command; jumped here if we reached the end of the AUTO command as stored in the GAT sector.
↳AUTO7
[021BH]
NOTE: 021BH is the routine in the Model III ROM which will display the character at (HL) until a 03H is found.
[021BH]
NOTE: 021BH will display the character at (HL) until a 03H is found.
5355H – AUTO COMMAND MESSAGE STORAGE AREA.
↳AUTMSG
↳AUTNUL
5361H – DATE Library Command – Function 11
↳S6DATE
[61EAH]
[61EAH]
[5214H]
- If Register A equals 100, the Z FLAG is set.
- If A < 100, the CARRY FLAG will be set.
- if A >= 100, the NO CARRY FLAG will be set.
[5214H]
- If Register A equals 32, the Z FLAG is set.
- If A < 32, the CARRY FLAG will be set.
- if A >= 32, the NO CARRY FLAG will be set.
[5214H]
[5214H]
- If Register A equals 13, the Z FLAG is set.
- If A < 13, the CARRY FLAG will be set.
- if A >= 13, the NO CARRY FLAG will be set.
[5214H]
[5214H]
53ABH – TIME Library Command – Function 36
↳S6TIME
[61EAH]
[61EAH]
[5214H]
- If Register A equals 61, the Z FLAG is set.
- If A < 61, the CARRY FLAG will be set.
- if A >= 61, the NO CARRY FLAG will be set.
[5214H]
- If Register A equals 61, the Z FLAG is set.
- If A < 61, the CARRY FLAG will be set.
- if A >= 61, the NO CARRY FLAG will be set.
[5214H]
- If Register A equals 24, the Z FLAG is set.
- If A < 24, the CARRY FLAG will be set.
- if A >= 24, the NO CARRY FLAG will be set.
[5214H]
53E2H – CLOCK Library Command – Function 7. Exits with Z FLAG for OFF and NZ FLAG for ON.
[02A1H]
NOTE: 02A1H is the Model III ROM routine to disable the clock display by disabling Bit 0 of 4210H.
[0298H]
NOTE: 02A1H is the Model III ROM routine to enable the clock display by enabling Bit 0 of 4210H.
53EBH – BYTE STORAGE AREA FOR TIME AND DATE ROUTINES.
↳BIN
53EEH – Subroutine within the DATE COMMAND to decode the date and validate for proper delimeters.
↳CONV1
[5403H]
[53F3H]
5403H – Subroutine within the DATE COMMAND to decode a two digit number pointed to by Register Pair HL; results in Register A.
[5418H]
[5418H]
5418H – Subroutine within the DATE COMMAND to exit with the error status set.
↳RET1
541AH – Subroutine within the DATE COMMAND to convert a COMMAND LINE byte pair to decimal. Exits with NC FLAG set if there is an error.
↳DECCHK
- If Register A equals 10, the Z FLAG is set.
- If A < 10 (which is good), the CARRY FLAG will be set.
- if A >= 10, which is bad, the NO CARRY FLAG will be set.
5423H – LIB Library Command – Function 23
↳LIB
[0033H]
NOTE: 0033H is the Model III ROM character print routine; displays the character held in Register A at the current cursor position.
NOTE: 4020H is the storage location for the CURSOR POSITION ON SCREEN.
[5442H]
[0033H]
NOTE: 0033H is the Model III ROM character print routine; displays the character held in Register A at the current cursor position.
[0033H]
NOTE: 0033H is the Model III ROM character print routine; displays the character held in Register A at the current cursor position.
INC HL
[5450H]
[5428H]
5450H – Continuation of the LIBRARY COMMAND; jumped to if we have finished displaying the OVERLAY 1 COMMAND TABLE.
↳S6CR
[0033H]
NOTE: 0033H is the Model III ROM character print routine; displays the character held in Register A at the current cursor position.
5455H – PROT Library Command – Function 29
↳S6PROT
[546BH]
[4454H]
NOTE: 4454H is the DOS PARAMETER STRING PARSE routine. It decodes DOS LIBRARY parameters.
[5214H]
[021BH]
NOTE: 021BH will display the character at (HL) until a 03H is found.
[551AH]
[4A93H]
NOTE: 4A93H is the SYS00/SYS routine to READ THE GAT sector into RAM (Buffer at 4D00H).
[6132H]
[5238H]
54A5
OR E
[54BFH]
[021BH]
NOTE: 021BH will display the character at (HL) until a 03H is found.
[551AH]
↳PROTOK
[4A9BH]
NOTE: 4A9BH is the SYS00/SYS routine to to write the GAT sector from RAM to diskette.
[6132H]
54C5
OR E
↳NOLOCK
[4B0DH]
[6132H]
[54FCH]
[54FCH]
54EC
54EF
ADD A,DUPD
LD L,A
The next few instructions put the password hash stored in Register Pair DE into the UPDATE and ACCESS password slots of the DIRECTORY SECTOR in RAM.
54FF
5502
ADD A,SIZDIR
LD L,A
- If Register A equals 0F0H, the Z FLAG is set.
- If A < 0F0H, the CARRY FLAG will be set.
- if A >= 0F0H, the NO CARRY FLAG will be set.
[54E0H]
[45F7H]
[6132H]
- If Register A equals 13H, the Z FLAG is set.
- If A < 13H, the CARRY FLAG will be set.
- if A >= 13H, the NO CARRY FLAG will be set.
[54D4H]
551AH – SUBroutine as part of the PROT routine.
↳MASINP
[0040H]
NOTE: 0040H is the Model III ROM routine to get a full line from the keyboard. In this routine, a line is terminated by a carriage return or BREAK, and characters typed are echoed to the display. On entry, B must be the maximum length of line to be accepted and (HL) must be the storage buffer which should be set to B+1. On Exit, CARRY will be set if the BREAK key was hit, Register B will contain the number of characters entered, and (HL) will contain the line from the keyboard followed by the terminating character. Register Pair DE is altered in this routine.
5526H – MESSAGE STORAGE AREA for the PROT command.
↳OLDMAS
↳NEWPAS
554EH – PARAMETER STORAGE AREA for the PROT command.
↳SWTCH5
555FH – SUBROUTINE from the PROT library command to encode a password.
↳TRAP
[556FH]
[556AH]
5575
5577
ADD A,07H
LD E,A
[557BH]
5582
5584
RRCA
RRCA
558B
ADD HL,HL
558D
XOR D
[557BH]
559A
OR L
559FH – RENAME Library Command
↳RENAME
[623AH]
[5218H]
[563DH]
[4424H]
[6132H]
[5218H]
- If Register A equals 03H, the Z FLAG is set.
- If A < 03H, the CARRY FLAG will be set.
- if A >= 03H, the NO CARRY FLAG will be set.
[6132H]
[5214H]
- If Register A equals SPACE, the Z FLAG is set.
- If A < SPACE, the CARRY FLAG will be set.
- if A >= SPACE, the NO CARRY FLAG will be set.
[55D0H]
↳CONTE
[563DH]
[4424H]
NOTE: 4424H is the SYS00/SYS routine to OPEN A DISK FILE for use. This RST 28H’s with a value of 92H so as to call ROUTINE 1 in OVERLAY 3.
[521CH]
[6132H]
[564AH]
[4A67H]
NOTE: 4A67H is the SYS00/SYS routine to read the directory entry into RAM (Buffer at 4300H).
[6132H]
The next 4 instructions just set DE = HL + 5, which is the the pointer to the FILENAME in the directory entry.
[4A7BH]
NOTE: 4A7BH is the SYS00/SYS routine to to write the directory entry from the copy in RAM to the diskette.
[6132H]
[4ABAH]
NOTE: 4ABAH is the SYS00/SYS routine to read the HIT sector into RAM.
[6132H]
[50E7H]
[4AC2H]
NOTE: 4AC2H is the SYS00/SYS routine to write the HIT sector from RAM to diskette.
[6132H]
563DH – Copy the contents of (DE) to (HL) until a control character is reached, at which point JUMP to 5647.
↳MOVNAM
[5647H]
5647H – Continuation of the 563DH routine; add a 03H Terminator and RETurn.
↳MOVNA1
564AH – SUBROUTINE called from 5603H to Display a Verification Message of “filename1 —-> filename2”.
↳DSPNAM
[021BH]
NOTE: 021BH will display the character at (HL) until a 03H is found.
[021BH]
NOTE: 021BH will display the character at (HL) until a 03H is found.
[021BH]
NOTE: 021BH will display the character at (HL) until a 03H is found.
[5450H]
MESSAGE STORAGE AREA for the RENAME Command.
↳NAME1
↳NAME2
↳NAMARO
568EH – “APPEND” Command.
↳APPEND
[623AH]
[5218H]
[441CH]
NOTE: 441CH is the SYS00/SYS routine to CHECK THE SYNTAX OF A FILESPEC before for use. This RST 28H’s with a value of C1H so as to call ROUTINE 4 in OVERLAY 1.
[5218H]
[4424H]
NOTE: 4424H is the SYS00/SYS routine to OPEN A DISK FILE for use. This RST 28H’s with a value of 92H so as to call ROUTINE 1 in OVERLAY 3.
[6132H]
[6132H]
[522FH]
[4448H]
NOTE: 4448H is the SYS00/SYS vector for ‘POSEOF’, which positions the disk drive to the last record of the open file.
[56C6H]
[6132H]
[0013H]
[56DAH]
- If Register A equals 1CH, the Z FLAG is set.
- If A < 1CH, the CARRY FLAG will be set.
- if A >= 1CH/ 28/, the NO CARRY FLAG will be set.
[56EDH]
56DAH – Continuation of APPEND Command. This routine is jumped to from 56CC if we got a DEVICE READY regarding FILESPEC 1 after reading a byte.
↳CONT
[028DH]
NOTE: 028DH is the Model III ROM routine to CHECK FOR BREAK. On exit, the NZ FLAG will be set if BREAK was detected.
[56EDH]
[001BH]
NOTE: 001BH is the Model III ROM routine to write a byte to an output device. Requires Register A to contain the byte to output and Register Pair DE to be the starting address of DCB of device. On exit, Z set if device ready. Uses AF.
[6132H]
56EDH – Close FILESPEC 1 and FILESPEC 2 and RETurn.
↳CLOZE
[6132H]
[6132H]
5700H – “DUMP” Command.
The DUMP command stores a program into a disk file. The command structure is:
DUMP file (START=aaaa,END=bbbb,TRA=cccc,RELO=dddd)
- aaaa = The 4 hexadecimal digit start address of the memory block to dump.
- bbbb = The 4 hexadecimal digit end address of the memory block to dump.
- cccc = The 4 hexadecimal digit transfer address to use to execute the program once it has been loaded. If blank, TRSDOS RE-ENTRY is used.
- dddd = The 4 hexadecimal digit start address for relocating or loading the program back into memory. If blank, no relocation is done
- Note: All hexadecimal numbers which begin with a letter must start with a 0. No x’____’ notation is used.
↳DUMP
[59CBH]
[5741H]
↳FILASC
[5734H]
5741H – Part of the DUMP command. Jumped here if the character of the filename stored in Register A is INVALID.
↳SPCFIL
[5743H]
[444BH]
[4420H]
NOTE: 4420H is the SYS00/SYS routine to INITIALIZE A DISK (i.e., CREATE or OPEN). This RST 28H’s with a value of A2H so as to call ROUTINE 2 in OVERLAY 2. Register HL needs to point to a RAM BUFFER for the DCB’s.
[6132H]
[581CH]
[6132H]
[581CH]
[576DH]
[581CH]
[5783H]
[5220H]
[5225H]
57A2
OR L
[57B0H]
[57F4H]
[57CFH]
- If Register A equals 255, the Z FLAG is set.
- If A < 255, the CARRY FLAG will be set.
- if A >= 255, the NO CARRY FLAG will be set.
[57CFH]
[581CH]
[581CH]
[581CH]
[581CH]
[581CH]
[57E9H]
57F4H – Part of the “DUMP” COMMAND. Jumped here when there are no more bytes to save.
In a /CMD file, the TRANSFER address format is 02 nn xx yy, where nn is the length of the block, xx=the LSB, and yy=the MSB.
↳DOEND
[581CH]
[581CH]
[581CH]
[581CH]
[56F9H]
[001BH]
NOTE: 001BH is the Model III ROM routine to output a byte (held in Register A) to a device. Register Pair DE has the DCB of the device to be output to. Z is set if the device is ready.
[5812H]
581CH – Part of the “DUMP” command. This routine is called each time a byte needs to be written, as it also includes that that byte in the running byte count.
↳PUTIT
[001BH]
NOTE: 001BH is the Model III ROM routine to output a byte (held in Register A) to a device. Register Pair DE has the DCB of the device to be output to. Z is set if the device is ready.
5822H – MESSAGE and RAM STORAGE AREA for the DUMP COMMAND.
↳CMD
↳SWITCH7
↳DCOUNT
↳NAMFIL
584FH – “LOAD” Command.
The LOAD command loads a memory image file from disk. After the load, DOS returns to TRSDOS READY.
[5218H]
[4430H]
NOTE: 4430H is DOS PROGRAM LOADER routine and does the same as the DOS LIBRARY command of LOAD. Requires Register Pair DE to contain the applicable FCB. All Registers are modified.
585EH – “ATTRIB” Command.
ATTRIB lets you change the passwords to an existing file or makes the file invisible or non-invisible. Passwords are initially assigned when the file is created. At that time, the update and access words are set to the same value (either the password you specified or a blank password).
ATTRIB file (visibility,ACC = name,UPD = name,PROT = level)
file = file specification.
visibility must be I or N.
ACC=password. If omitted, the access password is unchanged. set to “ACC=“, password is set to blanks.
UPD=password. If omitted, the update password is unchanged. set to “UPD=“, password is set to blanks.
PROT=Protection level. If omitted, it remains unchanged.
- FUL = full access, no protection.
- KILL = Kill, rename, read, execute, and write (gives total access, i.e., the least-protected).
- NAME = Rename, read, execute, and write.
- WRITE = Read, execute, and write.
- READ = Read and execute.
- EXEC = Execute only.
↳ATTRIB
[623AH]
[5218H]
[4424H]
NOTE: 4424H is the SYS00/SYS routine to OPEN A DISK FILE for use. This RST 28H’s with a value of 92H so as to call ROUTINE 1 in OVERLAY 3.
[6132H]
[5218H]
5893H – Continuation of the “ATTRIB” Command. Jumped here if a “(” was Found.
↳NEXTA
[58FAH]
[590AH]
[591AH]
[592FH]
[5218H]
[58C8H]
[58BCH]
58C8H – Continuation of the “ATTRIB” Command. Jumped here during the LEVEL TABLE search when the first character of the desired level matches the first character in the level table; to check the rest for matches
↳CMP2
- If Register A equals Register D, the Z FLAG is set.
- If A < D, the CARRY FLAG will be set.
- if A >= D, the NO CARRY FLAG will be set.
[58DDH]
- If Register A equals N, the Z FLAG is set.
- If A < N, the CARRY FLAG will be set.
- if A >= N, the NO CARRY FLAG will be set.
[58DDH]
[596DH]
[5893H]
- If Register A equals SPACE, the Z FLAG is set.
- If A < 20H, the CARRY FLAG will be set.
- if A >= 20H (ASCII: SPACE), the NO CARRY FLAG will be set.
[596DH]
[5218H]
58FAH – Continuation of the “ATTRIB” Command. Jumped here if a “I” was found after a “(” was found.
[5218H]
590AH – Continuation of the “ATTRIB” Command. Jumped here if a “N” was found after a “(” was found.
[5218H]
591AH – Continuation of the “ATTRIB” Command. Jumped here if a “A” was found after a “(” was found.
NOTE: 514EH is the storage location for the ACCESS PASSWORD.
592FH – Continuation of the “ATTRIB” Command. Jumped here if a “U” was found after a “(” was found.
NOTE: 514CH is the storage location for the UPDATE PASSWORD.
5944H – Continuation of the “ATTRIB” Command. Jumped here to position to the next parameter on the command line.
↳GETEND
- If Register A equals SPACE, the Z FLAG is set.
- If A < SPACE, the CARRY FLAG will be set.
- if A >= SPACE, the NO CARRY FLAG will be set.
[594CH]
594CH – Continuation of the “ATTRIB” Command. Jumped here from the “position to next parameter” subroutine if a control character was detected.
↳GETEN1
- If Register A equals ), the Z FLAG is set.
- If A < ), the CARRY FLAG will be set.
- if A >= ), the NO CARRY FLAG will be set.
[5944H]
[5960H]
596DH – Continuation of the “ATTRIB” Command. This will mask the values and set the passwords and put them in the RAM STORAGE LOCATION for the DIRECTORY ENTRY.
↳DONEA
[4A67H]
NOTE: 4A67H is the SYS00/SYS routine to read the directory entry into RAM (Buffer at 4300H).
[6132H]
[5982H]
5988
598A
ADD A,DUPD
LD L,A
If we are here, then we need to update the UPDATE PASSWORD.
NOTE: 514CH is the storage location for the UPDATE PASSWORD.
NOTE: 514DH is the storage location for the 2nd byte of the UPDATE PASSWORD.
NOTE: 514EH is the storage location for the 1st byte of the ACCESS PASSWORD.
NOTE: 514FH is the storage location for the 2nd byte of the ACCESS PASSWORD.
[4A7BH]
NOTE: 4A7BH is the SYS00/SYS routine to write the directory entry from the copy in RAM to the diskette.
[6132H]
59AFH – MESSAGE AND RAM STORAGE AREA for the “ATTRIB” Command.
↳INDEX
59BDH – Part of the “DUMP” Command. Tests the validity of a HEXIDECIMAL NUMBER stored in Register A.
↳LEGAL
- If Register A equals 0, the Z FLAG is set.
- If A < 0, the CARRY FLAG will be set.
- if A >= 0, the NO CARRY FLAG will be set.
- If Register A equals 1 more than 9, the Z FLAG is set.
- If A < 1 more than 9, the CARRY FLAG will be set.
- if A >= 1 more than 9, the NO CARRY FLAG will be set.
- If Register A equals A, the Z FLAG is set.
- If A < A, the CARRY FLAG will be set.
- if A >= A, the NO CARRY FLAG will be set.
- If Register A equals 1 more than F, the Z FLAG is set.
- If A < 1 more than F, the CARRY FLAG will be set.
- if A >= 1 more than F, the NO CARRY FLAG will be set.
59CBH – Part of the “DUMP” Command. Tests the validity of an ALPHA NUMERIC character stored in Register A.
↳LEAL
- If Register A equals 0, the Z FLAG is set.
- If A < 0, the CARRY FLAG will be set.
- if A >= 0, the NO CARRY FLAG will be set.
- If Register A equals 1 more than 9, the Z FLAG is set.
- If A < 1 more than 9, the CARRY FLAG will be set.
- if A >= 1 more than 9, the NO CARRY FLAG will be set.
- If Register A equals A, the Z FLAG is set.
- If A < A, the CARRY FLAG will be set.
- if A >= A, the NO CARRY FLAG will be set.
- If Register A equals 1 more than Z, the Z FLAG is set.
- If A < 1 more than Z, the CARRY FLAG will be set.
- if A >= 1 more than Z, the NO CARRY FLAG will be set.
59D9H – “DIR” command.
↳DIR
[5A06H]
[5234H]
- If Register A equals 1 more than 3.
- If A < 1 more than 3, the CARRY FLAG will be set.
- if A >= 1 more than 3, the NO CARRY FLAG will be set.
[5234H]
NOTE: 4413H is the storage location for the NUMBER OF DISK DRIVES in the system.
- If Register A equals Register C, the Z FLAG is set.
- If A < Register C, the CARRY FLAG will be set.
- if A >= Register C, the NO CARRY FLAG will be set.
[5234H]
[4454H]
NOTE: 4454H is the DOS PARAMETER STRING PARSE routine. It decodes DOS LIBRARY parameters.
[5214H]
[4A93H]
NOTE: 4A93H is the SYS00/SYS routine to READ THE GAT sector into RAM (Buffer at 4D00H).
[6132H]
[4ABAH]
NOTE: 4ABAH is the SYS00/SYS routine to read the HIT sector into RAM.
[01C9H]
↳CONT2
[6147H]
[6147H]
- If Register A equals 55H, the Z FLAG is set.
- If A < 55H, the CARRY FLAG will be set.
- if A >= 55H, the NO CARRY FLAG will be set.
[5BF5H]
[4A67H]
NOTE: 4A67H is the SYS00/SYS routine to read the directory entry into RAM (Buffer at 4300H).
[6132H]
[028DH]
NOTE: 028DH is the Model III ROM routine to CHECK FOR BREAK. On exit, the NZ FLAG will be set if BREAK was detected.
[4030H]
NOTE: 4030H is the OPERATION ABORTED routine. Routine runs, displays an error, and returns to the DOS PROMPT.
[5BE7H]
[5BE7H]
[5BE7H]
[5AAEH]
5AA8
OR E
[5BE7H]
5AAEH – Continuation of the “DIR” Command. Jumped here when we have passed the first filtering hurdles and the directory entry being pointed to has still not yet been disqualified from being displayed.
↳NOSYS
[5ABAH]
5AB6
OR E
[5BE7H]
5ABAH – Continuation of the “DIR” Command. Display the filespec, 1 space, and the extension.
This section handles the display of filename and extension for directory entries that have passed all the filtering tests.
↳NOTINV
5AC7
5AC9
ADD A,DNAME
LD L,A
[5AD8H]
[6135H]
[5ACDH]
[5AF6H]
[5AF6H]
[6135H]
[5AEBH]
5AF6H – Continuation of the “DIR” Command. Position the Cursor to the Right Location.
↳ENDEXT
The next set of instructions calculates how many spaces to tab over on the screen.
[6135H]
[5B00H]
5B07H – Continuation of the “DIR” Command. Display NON-INV, INV, or SYS FILE
[5B15H]
[6135H]
[5B20H]
[6135H]
5B23H – Continuation of the “DIR” Command. Display the PROTECTION (U)PDATE, A(CCESS), or B(OTH) UPDATE AND ACCESS
5B25
5B27
ADD A,DUPD
LD L,A
[5B38H]
[5B4BH]
[5B4BH]
[6135H]
5B4FH – Continuation of the “DIR” Command. Display the PROTECTION NUMBER OF THE PROTECTION LEVEL.
[6135H]
5B58H – Continuation of the “DIR” Command. Get the EOF Byte.
5B59
5B5A
INC L
INC L
5B5FH – Continuation of the “DIR” Command. Get the LRL Byte.
[61C1H]
5B70H – Continuation of the “DIR” Command. Calculate the number of records in a file.
5B71
5B73
ADD A,DERN
LD L,A
[5B87H]
5B87H – Continuation of the “DIR” Library Command. Jumped here from 5B7CH if the LRL is not zero so that we can calculate the number of LRL for records other than a 256 LRL.
↳NLR256
Next up we need to display the number of records in the file.
[61C1H]
Next up we need to calculate the number of GRANS and EXTENT POINTERS in the file.
We are about to count up the grans by adding the gran numbers found in each valid extent. Register Pair DE will hold the number of grans and Register Pair BC will hold the number of extents.
- If Register A equals 0FEH, the Z FLAG is set.
- If A < 0FEH, the CARRY FLAG will be set.
- if A >= 0FEH, the NO CARRY FLAG will be set.
[5BB6H]
[5BB4H]
[5BA4H]
5BB6H – Continuation of the “DIR” Command. Display the Number of GRANS in a File.
↳CONT4
[61C1H]
5BBCH – Continuation of the “DIR” Command. Display the Number of EXTENTS in a File.
5BBD
LD L,C
[61C1H]
5BC2H – Continuation of the “DIR” Command. Display the EOF BYTE OFFSET of a File.
5BC6
LD L,A
[61C1H]
5BCBH – Continuation of the “DIR” Command. Display the DATE OF CREATION for a File.
[6147H]
5BE1H – Continuation of the “DIR” Command. Check for a User HOLD Key.
5BE7H – Continuation of the “DIR” Command. Bump to the next file in the directory.
↳NXTFI1
[5A68H]
[5A86H]
5BF5H – Continuation of the “DIR” Command. All Files have been displayed. Calculate the number of FREE GRANS on the Disk.
↳ENFILE
[4A93H]
NOTE: 4A93H is the SYS00/SYS routine to READ THE GAT sector into RAM (Buffer at 4D00H).
5C04
LD E,L
[5C10H]
[5C15H]
[5C07H]
[6147H]
[61CAH]
[6147H]
5C32H – MESSAGE AND STORAGE for the “DIR” Command.
↳TITL2
↳TITL4
↳FIRST
↳SECND
↳DETA
5CC3H – “DIR” Command Parameter Table.
↳SWTCH3
↳PRT
5CDCH – “FREE” Library Command.
↳S6FREE
[5234H]
- If Register A equals 04H, the Z FLAG is set.
- If A < 1 + the maximum number drives permitted, the CARRY FLAG will be set.
- if A >= 1 + the maximum number drives permitted, the NO CARRY FLAG will be set.
[5234H]
NOTE: 4413H is the storage location for the NUMBER OF DISK DRIVES in the system.
[5234H]
[4454H]
NOTE: 4454H is the DOS PARAMETER STRING PARSE routine. It decodes DOS LIBRARY parameters.
[5214H]
[4A93H]
NOTE: 4A93H is the SYS00/SYS routine to READ THE GAT sector into RAM (Buffer at 4D00H).
[6132H]
5D2B
OR C
[5D31H]
[6135H]
[5D35H]
[6147H]
[6147H]
[5D8EH]
↳L66P08
[5D83H]
5D8EH – Continuation of the “FREE” command. Jumped here if the track is NOT flawed (so as to skip the display of a flawed track).
↳L6PO9
[5D9AH]
5D9AH – Continuation of the “FREE” command. Jumped here if the track is NOT flawed (so as to skip the display of a flawed track) and we have not yet hit the directory track.
↳L6PO10
↳L60010
[5DA6H]
5DA6H – Continuation of the “FREE” command. Jumped here if the track is NOT flawed (so as to skip the display of a flawed track) and we have not yet hit the directory track AND the gran is allocated.
↳SETX
[5D9EH]
[5D6FH]
[6147H]
5DC2H – MESSAGE and BYTE STORAGE AREA for “FREE”.
↳TITLE
↳GFLAW
↳GDIR
↳TITL3
↳LOW
↳COUNT
↳CDIRET
5E46H – Subroutine in the “FREE” Library Command to Generate a 2-Digit Decimal Number.
↳HEXCOV
[5E48H]
5E52H – “CREATE” Library Command.
↳CREATE
[623AH]
[5218H]
[4454H]
NOTE: 4454H is the DOS PARAMETER STRING PARSE routine. It decodes DOS LIBRARY parameters.
[5214H]
[5EC2H]
[5EC2H]
[4420H]
NOTE: 4420H is the SYS00/SYS routine to INITIALIZE A DISK (i.e., CREATE or OPEN). This RST 28H’s with a value of A2H so as to call ROUTINE 2 in OVERLAY 2. Register HL needs to point to a RAM BUFFER for the DCB’s.
[6132H]
[521CH]
OR C
[56F6H]
[6132H]
5EB1H – PARAMETER TABLE for the “CREATE” Command.
↳SWTCH2
5EC2H – SUBROUTINE in the “CREATE” Command to Convert the Binary Coded Decimal Value Pointed to by Register Pair HL into Binary.
↳CONVHX
5ED4
POP HL
5ED6H – SUBROUTINE to the above SUBROUTINE in the “CREATE” Command. Converts the value held in A to Hexadecimal.
↳ADDHL
5ED9
5EDB
5EDD
SRA A
SRA A
SRA A
The next few instructions get the appropriate power of 10 from a table.
5EF7H – POWERS OF 10 TABLE for the “CREATE” Command.
↳POWR10
5EFFH – “CLEAR” Library Command.
↳CLEAR
[5F1FH]
[5F63H]
[021BH]
NOTE: 021BH will display the character at (HL) until a 03H is found.
5F1FH – Subroutine in the “CLEAR” Library Command. Jumped to if we have parameters on the command line.
↳CLEARX
[4454H]
NOTE: 4454H is the DOS PARAMETER STRING PARSE routine. It decodes DOS LIBRARY parameters.
[5214H]
5F2C
OR E
[5F4BH]
[5225H]
[5220H]
[5220H]
5F43
LD C,L
5F45
LD L,E
5F4BH – Continuation of CLEAR command
5F4F
OR L
[01C9H]
[5225H]
NOTE: 4411H is the storage location for the MEMORY PROTECT address.
[01C9H]
5F63H – Part of the “CLEAR” Library Command. Jumped here if the user didn’t provide any parameters.
↳CLEAR0
NOTE: 4415H is the storage location for the ADDRESS OF THE END OF PHYSICAL MEMORY.
NOTE: 4411H is the storage location for the MEMORY PROTECT address.
[5F7BH]
[5F6FH]
[01C9H]
5F91H – PARAMETER TABLE for the “CLEAR” Command.
↳CLRTAB
5FC9H – “BUILD” Library Command.
↳BUILD
[623AH]
[5218H]
[444BH]
[6132H]
[021BH]
NOTE: 021BH will display the character at (HL) until a 03H is found.
[021BH]
NOTE: 021BH will display the character at (HL) until a 03H is found.
[0040H]
NOTE: 0040H is the Model III ROM routine to get a full line from the keyboard. In this routine, a line is terminated by a carriage return or BREAK, and characters typed are echoed to the display. On entry, B must be the maximum length of line to be accepted and (HL) must be the storage buffer which should be set to B+1. On Exit, CARRY will be set if the BREAK key was hit, Register B will contain the number of characters entered, and (HL) will contain the line from the keyboard followed by the terminating character. Register paid DE is altered in this routine.
[001BH]
NOTE: 001BH is the Model III ROM routine to output a byte (held in Register A) to a device. Register Pair DE has the DCB of the device to be output to. Z is set if the device is ready.
NOTE: 001BH is the Model III ROM routine to write a byte to an output device. Requires Register A to contain the byte to output and Register Pair DE to be the starting address of DCB of device. On exit, Z set if device ready. Uses AF.
[5FF5H]
6001H – Continuation of the “BUILD” Library Command; jumped to if a BREAK key was hit.
↳BLDEXT
[001BH]
NOTE: 001BH is the Model III ROM routine to output a byte (held in Register A) to a device. Register Pair DE has the DCB of the device to be output to. Z is set if the device is ready.
NOTE: 001BH is the Model III ROM routine to write a byte to an output device. Requires Register A to contain the byte to output and Register Pair DE to be the starting address of DCB of device. On exit, Z set if device ready. Uses AF.
[4409H]
NOTE: 4409H is the SYS00/SYS routine to process DOS errors.
600FH – MESSAGE and BYTE STORAGE AREA for “BUILD”.
↳S6PRMP
↳BRKPMT
603DH – “DO” Library Command.
This command modifies the keyboard DCB to force the characters otherwise expected to be input to come from the DO FILE rather than the keyboard. The routine will supply 1 character each time it is called, just like someone typing each letter. The procedure is:
- Get the end of memory address and reserve 544 bytes for use by the DO routine.
- Relocate the DO routine to the top 256 bytes of that space. This is what the keyboard will call.
- Set up the next lower 256 bytes as the file buffer for the DO.
- Set up the next lower 32 bytes as the DCB for the DO file.
↳DO
[5214H]
NOTE: 4415H is the storage location for the ADDRESS OF THE END OF PHYSICAL MEMORY.
NOTE: 4411H is the storage location for the MEMORY PROTECT address.
NOTE: 4411H is the storage location for the MEMORY PROTECT address.
NOTE: 4411H is the storage location for the MEMORY PROTECT address.
6078
6079
DEC D
LD E,0E0H
NOTE: 4411H is the storage location for the MEMORY PROTECT address.
NOTE: 40A0H is the storage location for the TOP OF FREE MEMORY.
[441CH]
NOTE: 441CH is the SYS00/SYS routine to CHECK THE SYNTAX OF A FILESPEC before for use. This RST 28H’s with a value of C1H so as to call ROUTINE 4 in OVERLAY 1.
[5218H]
[444BH]
The next few instructions calculate a buffer address.
NOTE: 4411H is the storage location for the MEMORY PROTECT address.
[4424H]
NOTE: 4424H is the SYS00/SYS routine to OPEN A DISK FILE for use. This RST 28H’s with a value of 92H so as to call ROUTINE 1 in OVERLAY 3.
[4409H]
NOTE: 4409H is the SYS00/SYS routine to process DOS errors.
60A6H – “DO” Driver Routine.
This is the new keyboard routine and is moved to high ram. This restores the normal keyboard driver upon termination of the DO file. Once DO is started, there is no way to stop it, as the keyboard is no longer active.
↳GOGO1
[0013H]
NOTE: 0013H is the Model III ROM routine to read a byte from an input device. Requires DE = starting address of DCB of device and on Exit Register A = byte received from device, Z set if device ready. Uses AF.
[4409H]
NOTE: 4409H is the SYS00/SYS routine to process DOS errors.
60B8H – Continuation of the “DO” Command. Jumped here if there was an error in getting characters.
↳OKGO
[60BEH]
60BEH – JUMP to 60BEH to terminate the “DO” Execution.
↳GOGO3
60CCH – MESSAGE STORAGE AREA for “DO”.
↳EXT5
60CFH – “PAUSE” Library Command.
↳SPAUSE
[021BH]
NOTE: 021BH will display the character at (HL) until a 03H is found.
[60EAH]
[0040H]
NOTE: 0040H is the Model III ROM routine to get a full line from the keyboard. In this routine, a line is terminated by a carriage return or BREAK, and characters typed are echoed to the display. On entry, B must be the maximum length of line to be accepted and (HL) must be the storage buffer which should be set to B+1. On Exit, CARRY will be set if the BREAK key was hit, Register B will contain the number of characters entered, and (HL) will contain the line from the keyboard followed by the terminating character. Register paid DE is altered in this routine.
[60DDH]
60EAH – Continuation of the “PAUSE” Library Command, Jumped here if the “DO” command is active.
60EFH – Continuation of the “PAUSE” Library Command. Subroutine to read the keyboard for an ENTER key.
↳GETCR
[60EFH]
60F8H – MESSAGE STORAGE AREA for “PAUSE”.
↳PRESNY
6114H – “ERROR” Library Command.
[5214H]
[5214H]
612A
RLCA
6135H – Common Subroutine – Display or Print the Character held in Register A.
↳PDATA
613C
OR C
[003BH]
[0033H]
NOTE: 0033H is the Model III ROM character print routine; displays the character held in Register A at the current cursor position.
6147H – Common Subroutine – Display or Print the message pointed to by Register Pair HL.
↳PRT2
614D
OR C
[6157H]
[021BH]
NOTE: 021BH will display the character at (HL) until a 03H is found.
6157H – Common Subroutine – Print a Message Pointed to by Register Pair HL, until a 03H or 0DH is reached.
↳LPRINT
[6165H]
[003BH]
[6158H]
6167H – SUBROUTINE in the “DIR” Library Routine to Start Processing a @ (aka Pause) request.
↳INKEY
[028DH]
NOTE: 028DH is the Model III ROM routine to CHECK FOR BREAK. On exit, the NZ FLAG will be set if BREAK was detected.
[4030H]
NOTE: 4030H is the OPERATION ABORTED routine. Routine runs, displays an error, and returns to the DOS PROMPT.
[617CH]
617CH – Continuation of the SUBROUTINE in the “DIR” Library Routine to Process a @ (aka Pause) keypress.
[617CH]
[617CH]
6188H – Continuation of the SUBROUTINE in the “DIR” Library Routine to Process a @ (aka Pause) keypress. This part scans the keyboard, bypassing the DO command.
↳GETKBD
[002BH]
NOTE: 002BH is the Model III ROM Keyboard scanning routine; Register A exits with the ASCII value for the key that was pressed or ZERO if no key was pressed.
If we are here then we need an ACTUAL keypress, but DO is active; meaning that the keyboard is actually feeding from a disk file. With this we need to jump to a routine in ROM which reads the keyboard regardless of whether DO is active or not.
[3024H]
61A1H – Part of the “CLEAR” Library Command. Jumped here to insert a value into a message.
↳HEXS
61A3
61A4
61A5
RLCA
RLCA
RLCA
[61AAH]
Another DAA set … Never been able to find a good source to clearly explain this. It is converting a decimal value into a binary coded decimal value.
61B5H – Part of the “DIR” Library Command to convert a value held in Register A (which is either FILE CREATION MONTH or FILE CREATION YEAR as extracted from a files directory entry) and place it in the middle of the message “ 00/00“, in the specific the location pointed to by Register Pair HL. Routine is called once with MONTH and then once with YEAR.
↳HEXAAS
[61B7H]
61C1H – Part of the “DIR” Library Command to display the contents of Register Pair HL in decimal form.
↳BINDEC
[6135H]
[61C5H]
[0A9AH]
NOTE: 0A9AH is the Model III ROM routine to STORE AN INTEGER. The value in HL is put into the single precision number storage area of 4121H and is flagged as an INTEGER.
[1034H]
[0FD9H]
61E1H – Message Storage Area for TIME and DATE DISPLAY.
↳DPRT1
↳DELIM1
↳DPRT2
↳DELIM2
↳DPRT3
61EAH – Display TIME$ and DATE$. This routine is called by both the DATE and TIME library commands, and Register C holds the delimter character of either / or :.
[021BH]
NOTE: 021BH will display the character at (HL) until a 03H is found and then RETurn to this routines caller (since JUMP was used instead of CALL).
61F0H – Part of the “DATE” and “TIME” Library Commands. This generates the text line of xx/xx/xx or yy:yy:yy.
↳MSGPR0
[6203H]
620F
INC HL
[6208H]
6218H – Routine to READ A RECORD from FILE 1.
↳REDIT
[4436H]
NOTE: 4436H is the SYS00/SYS vector for ‘READ’, which reads the record that the disk drive is positioned over.
6225H – Routine to OPEN from FILE 1.
[4424H]
NOTE: 4424H is the SYS00/SYS routine to OPEN A DISK FILE for use. This RST 28H’s with a value of 92H so as to call ROUTINE 1 in OVERLAY 3.
622BH – Routine to Set the Variables Needed for a JUMP to 4424H.
6234H – Routine to CREATE FILE 1.
[4420H]
NOTE: 4420H is the SYS00/SYS routine to INITIALIZE A FILE (i.e., CREATE or OPEN). This RST 28H’s with a value of A2H so as to call ROUTINE 2 in OVERLAY 2. Register HL needs to point to a RAM BUFFER for the DCB’s.
623AH – Routine to CHECK FILE 1.
↳GETSYN
[441CH]
NOTE: 441CH is the SYS00/SYS routine to CHECK THE SYNTAX OF A FILESPEC before for use. This RST 28H’s with a value of C1H so as to call ROUTINE 4 in OVERLAY 1.