General:
SYS09/SYS handles the COPY, DUAL, FORMS, KILL, MASTER, PATCH, RELO, ROUTE, SETCOM, and WP LIBrary Command.
Disassembly:
5200
NOTE: 42B4H is the storage location for the CLEAR RAM Flag.
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.
[5218H]
5218H – Jumped to if the command requested is not one of the commands available in this overlay.
5218
521DH – Jumped here if we are missing the parameter.
521D
5221H – Jumped here if we we were requested to do something to a drive which is not on the system.
5221
5226H – Routine to do a Table Lookup.
[522FH]
522FH – Continuation of the Table Lookup – Jumped here if the table compare byte matched.
522F
[5237H]
5233
5234
INC HL
INC HL
5237H – Continuation of the Table Lookup – Jumped here to load HL with the address of the matched routine.
5237
523EH – Command Lookup Table.
523E
525DH – MAIN ROUTINE — COPY COMMAND
525D
5266
LD E,L
[55B6H]
[59BCH]
[5219H]
[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.
[54A8H]
[528BH]
[528BH]
[5219H]
[529BH]
[529BH]
529BH – Part of the COPY routine; jumped here if the filename characters match.
[529BH]
52A3H – SUBROUTINE to bump the record number being processed and display that record number as being copied.
52A3
[52BCH]
[021BH]
NOTE: 021BH is the Model III ROM routine to display the character at (HL) until a 03H is found.
52BAH – MESSAGE and STORAGE AREA.
52BA
52BCH – Subroutine to convert the new record number to ASCII and put it into the message “COPYING RECORD nnnn“..
52BC
[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]
NOTE: 1034H is the Model III ROM routine to initialize the buffer for an ASCII conversion. It checks the edit flag (at 40D8H), sets HL to point to a buffer at 4130H, and puts a space there.
[0FD9H]
NOTE: 0FD9H is a routine which will convert the integer value in REG 1 (i.e., 4124H) to an ASCII string. Returns with register pair HL pointing to the result.
[52D6H]
[52CFH]
52DCH – MESSAGE and STORAGE AREA.
52DC
52F3H – Subroutine to display the message COPYING filespec 1 TO filespec 2.
52F3
[021BH]
NOTE: 021BH is the Model III ROM routine to display the character at (HL) until a 03H is found.
[021BH]
NOTE: 021BH is the Model III ROM routine to display the character at (HL) until a 03H is found.
[0033H]
NOTE: 0033H is the Model III ROM character print routine; displays the character held in Register A at the current cursor position. Since this was JUMPED to instead of CALLed, the RET at the end of this ROM routine will then RETurn to the caller of this subroutine instead of returning to this place.
5310H – Subroutine of the Subroutine to display the message COPYING filespec 1 TO filespec 2. Parse the characters in the filespecs and display them.
[0033H]
NOTE: 0033H is the Model III ROM character print routine; displays the character held in Register A at the current cursor position.
531AH – MESSAGE and STORAGE AREA.
531A
‘COPYING’ + 03H”.
5325
‘TO’ + 03H”.
532AH – Subroutine to display a flashing prompt of the message pointed to by Register Pair HL.
[021BH]
NOTE: 021BH is the Model III ROM routine to display the character at (HL) until a 03H is found.
[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.
[534DH]
533A
OR C
[5332H]
[532AH]
534DH – Jump point in the subroutine to display a flashing prompt of the message pointed to by Register Pair HL. Jumped here if we got a CARRIAGE RETURN from the user.
[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. Since this was JUMPED to instead of CALLed, the RET at the end of this ROM routine will then RETurn to the caller of this subroutine instead of returning to this place.
5357H – Single Drive, Single File Copy Routine.
This routine finds out how much user ram is available, and reads the first file until EOF or memory full. Ask to swap disks and write until the file is written; swapping back if memory ran out before EOF.
[5365H]
‘Insert SOURCE Disk (ENTER) ‘ + 03H”
Note: IX+09H = the position in the DCB for the LOGICAL RECORD LENGTH).
Note: IX+08H = the position in the DCB for the BYTE OFFSET IN THE SECTOR FOR LAST BYTE OF THE FILE).
Note: IX+0CH = the position in the DCB for the NMSB OF THE LAST SECTOR TO READ/EOF)
Note: IX+0DH = the position in the DCB for the MSB OF THE LAST SECTOR TO READ/EOF)
[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.
[5223H]
‘Insert SOURCE Disk (ENTER) ‘ + 03H”
[4436H]
NOTE: 4436H is the SYS00/SYS vector for ‘READ’, which reads the record that the disk drive is positioned over.
[540EH]
[540EH]
[5223H]
53D6H – Continuation of SINGLE FILE, SINGLE DRIVE Copy – Jumped here when a block as successfully been read into the READ FILE BUFFER.
53D6
[53C1H]
At this point, the READ RAM buffer has been filled, so now we need to write it to disk.
[443CH]
NOTE: 443CH is the SYS00/SYS vector for ‘WRITE with VERIFY’, which will write verify a write with a retry count of 3. DE must point to the buffer to write.
[5223H]
[53F5H]
540EH – Continuation of SINGLE FILE, SINGLE DRIVE Copy – Jumped here to write out what we have if we had a (harmless) EOF error or Records Out of Range error.
[443CH]
NOTE: 443CH is the SYS00/SYS vector for ‘WRITE with VERIFY’, which will write verify a write with a retry count of 3. DE must point to the buffer to write.
[5223H]
[5421H]
At this point, the buffers have been written, but the EOF cannot simply be transferred because of the EOF / RECORD OUT OF RANGE error on the read, so we need to recalculate and set the appropriate EOF.
Note: IX+09H = the position in the DCB for the LOGICAL RECORD LENGTH).
Note: IX+08H = the position in the DCB for the BYTE OFFSET IN THE SECTOR FOR LAST BYTE OF THE FILE).
Note: IX+0CH = the position in the DCB for the NMSB OF THE LAST SECTOR TO READ/EOF)
Note: IX+0DH = the position in the DCB for the MSB OF THE LAST SECTOR TO READ/EOF)
[4428H]
NOTE: 4428H is the SYS00/SYS routine to CLOSE A DISK FILE. This RST 28H’s with a value of 93H so as to call ROUTINE 1 in OVERLAY 3.
‘Insert SOURCE Disk (ENTER) ‘ + 03H”
5463H – MESSAGE and STORAGE AREA.
54B9H – SINGLE DRIVE COPY ROUTINE – See if the user has selected the drives to make this a single drive copy. This portion parses both for a drive number, and defaults to “0” if none.
[54B9H]
[54ADH]
[54BAH]
54B9H – Continuation of the routine to see if the user has selected the drives to make this a single drive copy; jumped here if a we got a “:” in the SOURCE FILE DCB.
[54CBH]
[54BFH]
[54CCH]
54CBH – Continuation of the routine to see if the user has selected the drives to make this a single drive copy; check the two drive numbers (held in A and C) to see if they match.
[5357H]
54D0H – Dual Drive copy roputine.
54D0
[52F3H]
[5223H]
[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.
[5223H]
[4436H]
NOTE: 4436H is the SYS00/SYS vector for ‘READ’, which reads the record that the disk drive is positioned over.
[5506H]
[5525H]
[5525H]
[5223H]
5506H – Copy the READ FILE BUFFER to the DESTINATION FILE BUFFER, and WRITE.
[5517H]
[54EDH]
5525H – The copy routine has completed but with a (harmless) EOF or RECORD OUT OF RANGE ERROR.
[5542H]
[5542H]
If we are here then we need to specially calculate the EOF.
Note: IX+0CH = the position in the DCB for the LSB OF THE LAST SECTOR TO READ/EOF)
Note: IX+0DH = the position in the DCB for the MSB OF THE LAST SECTOR TO READ/EOF)
Note: IX+0CH = the position in the DCB for the NMSB OF THE LAST SECTOR TO READ/EOF)
Note: IX+0DH = the position in the DCB for the MSB OF THE LAST SECTOR TO READ/EOF)
[4428H]
NOTE: 4428H is the SYS00/SYS routine to CLOSE A DISK FILE. This RST 28H’s with a value of 93H so as to call ROUTINE 1 in OVERLAY 3.
[5223H]
[4428H]
NOTE: 4428H is the SYS00/SYS routine to CLOSE A DISK FILE. This RST 28H’s with a value of 93H so as to call ROUTINE 1 in OVERLAY 3.
[5223H]
555BH – MESSAGE and STORAGE AREA.
531A
555E
5561
5562
5565
5567
5568H – Read the Directory Track into a Buffer at 4300H.
[4B3EH]
NOTE: 4B3EH is the SYS00/SYS routine to identify the track number of the directory. Routine exits with the director track number in Register D.
[4675H]
557CH – Routine to transfer B number of characters from (DE) to (IX), aborting if a SPACE is found.
[5219H]
Note: IX+00H = the position in the DCB for the TYPE of FCB byte. Bit 0: 1=Read Only, Bit 1: 1=Write Only, Bit 4: 1=The next 2 bytes are simply the address of another FCB, Bit 7=1: Then the next 50 bytes are the description of an open file.
[557CH]
558FH – Routine to copy a filename from the directory entry (pointed to by DE) into the DCB (pointed to HL); returns with Register C containing the number of characters in the filename.
[5591H]
559CH – Routine to copy an extension from the directory entry (pointed to by DE) into the DCB (pointed to HL); returns with Register C containing the number of characters in the extension.
[559EH]
55A6H – Routine to the drivespec from the directory entry (pointed to by DE) into the DCB (pointed to HL).
[55A8H]
55AFH – Routine to Skip Spaces in DE and Point to the next Non-Blank Character.
55B6H – This routine gets called if the user entered a wildcard copy command such as “COPY /EXT:x :x”.
[557CH]
[5219H]
[557CH]
[55AFH]
[5219H]
[557CH]
- If Register A equals 4, the Z FLAG is set.
- If A < 4, the CARRY FLAG will be set.
- if A >= 4, the NO CARRY FLAG will be set.
[5221H]
55E8H – Common Routine for COPY and KILL – Wild Card Search Routine.
55E8
- If Register A equals 4, the Z FLAG is set.
- If A < 4, the CARRY FLAG will be set.
- if A >= 4, the NO CARRY FLAG will be set.
[5221H]
[564EH]
If we are here, then the file CAN be copied or killed, next we need to see if the user supplied extension matches the filename’s extension.
[564EH]
[5610H]
[558FH]
5653
5654
ADD A,30H
LD E,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.
[5602H]
[55F7H]
5669H – “KILL” Routine.
5669
566A
LD E,L
[5697H]
If we are here, then the user requested to KILL based on a WILDCARD.
[557CH]
[5219H]
[557CH]
5692H – Continuation of the KILL ROUTINE.
5692
[59ADH]
5697H – Continuation of the KILL ROUTINE; display the KILLING message and kill the file.
[59BCH]
[521DH]
[021BH]
NOTE: 021BH is the Model III ROM routine to display the character at (HL) until a 03H is found.
[5310H]
[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.
[5223H]
[5223H]
56BAH – MESSAGE and STORAGE AREA for KILL.
56BA
56BAH – MESSAGE and STORAGE AREA for PATCH.
571BH – PATCH Main Routine.
571B
[58FEH]
[59BCH]
[521DH]
[521DH]
[5219H]
573A
LD B,00H
[5B70H]
[5219H]
Note: IX+00H = the position in the DCB for the TYPE of FCB byte. Bit 0: 1=Read Only, Bit 1: 1=Write Only, Bit 4: 1=The next 2 bytes are simply the address of another FCB, Bit 7=1: Then the next 50 bytes are the description of an open file.
The next few instructions compare the character to 0, : (i.e., 1 above 9), A, and G (i.e., 1 above F) to make sure that it is in the range of a valid hex character.
- 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.
[5771H]
- 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.
[575DH]
- 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.
[5771H]
- If Register A equals G, the Z FLAG is set.
- If A < G, the CARRY FLAG will be set.
- if A >= G, the NO CARRY FLAG will be set.
[5771H]
The next few instructions turn the validated hex character into decimal.
ADD HL,HL
ADD HL,HL
ADD HL,HL
- If Register A equals 10, the Z FLAG is set.
- If A < 10, the CARRY FLAG will be set.
- if A >= 10, the NO CARRY FLAG will be set.
[5769H]
The parameter character is now a decimal number held in Register A.
5771H – Continuation of the PATCH command. Jumped here if we were given an invalid hex character on the ADD= portion of the command line. A is holding the character from the COMMAND LINE which we know is NOT a valid hex character.
[5219H]
POP HL
5783
LD B,00H
[5B70H]
[5219H]
[58C0H]
[5219H]
57A2
LD B,00H
[5B70H]
[5219H]
[58C0H]
[5219H]
If we are here, then we have the FIND field and the CHANGE fields stored and they are of matching length.
[57D8H]
57CC
LD IYH, 42H
[5223H]
[57F3H]
[57F3H]
Next, we need to get a block of data from the file.
[5897H]
[5897H]
- If Register A equals 21H, the Z FLAG is set.
- If A < 21H, the CARRY FLAG will be set.
- if A >= 21H, the NO CARRY FLAG will be set.
[5888H]
5816H – Continuation of the PATCH command. Read a CODE BLOCK from the file
[5825H]
5825H – Continuation of the PATCH command read a CODE BLOCK routine; jumped here if there is more data to read in the code block than just the 3 bytes comprising the field size and data address.
The next few instructions are to set DE to be DE + the length of the field. This requires some math. First, work the LSB of Register Pair DE.
ADD A,B
LD E,A
ADC A,00H
LD D,A
[588AH]
[588AH]
[5851H]
[58B3H]
[584BH]
[59C2H]
[5897H]
[5963H]
[5897H]
If we are here, then we just patched a non-SYSTEM file.
[59ADH]
[59ADH]
[443CH]
NOTE: 443CH is the SYS00/SYS vector for ‘WRITE with VERIFY’, which will write verify a write with a retry count of 3. DE must point to the buffer to write.
5888H – Continuation of the PATCH command to deal with a COMMENT BLOCK.
[58B3H]
[588AH]
[58B3H]
5897H – Continuation of the PATCH command to display the results of the Patch and exit.
[58A3H]
[021BH]
NOTE: 021BH is the Model III ROM routine to display the character at (HL) until a 03H is found. Since this was JUMPED to instead of CALLed, the RET at the end of this ROM routine will then RETurn to the caller of this subroutine instead of returning to this place.
58A3H – Continuation of the PATCH command to display the results of the Patch if we have a match.
58A3
[58AEH]
58AEH – Continuation of the PATCH command to display the results of a successful Patch.
58B3H – Continuation of the PATCH command. Subroutine to read a sector.
[59ADH]
[4436H]
NOTE: 4436H is the SYS00/SYS vector for ‘READ’, which reads the record that the disk drive is positioned over.
58BC
58C0H – Part of the PATCH routine. This routine decodes an abitrary length hexadecimal field. It is called related to the FIND and CHG fields given by the user. HL points to the source, and DE points to the destination.
58C0
- If Register A equals 30H, the Z FLAG is set.
- If A < 30H, the CARRY FLAG will be set.
- if A >= 30H, the NO CARRY FLAG will be set.
[58D7H]
[58DDH]
[58E9H]
58D7H – Part of the PATCH routine’s subroutine which decodes an abitrary length hexadecimal field. Jumped here when we hit the END OF STRING (by virtue of a character below “0” being found).
[521DH]
58DDH – Convert a Byte Contaning a Hex Character to the High Nybble.
58E2
58E4
58E6
SLA A
SLA A
SLA A
58E9H – Convert a Byte Contaning a Hex Character to the Low Nybble a/k/a get the value of an ASCII character.
58E9
[5219H]
- If Register A equals 10, the Z FLAG is set.
- If A < 10, the CARRY FLAG will be set.
- if A >= 10, the NO CARRY FLAG will be set.
- If Register A equals 10, the Z FLAG is set.
- If A < 10, the CARRY FLAG will be set.
- if A >= 10, the NO CARRY FLAG will be set.
[5219H]
- If Register A equals 16, the Z FLAG is set.
- If A < 16, the CARRY FLAG will be set.
- if A >= 16, the NO CARRY FLAG will be set.
58FEH – PATCH routine for a SYSTEM/OVERLAY File.
[597BH]
[5915H]
[5219H]
Note: IX+00H = the position in the DCB for the TYPE of FCB byte. Bit 0: 1=Read Only, Bit 1: 1=Write Only, Bit 4: 1=The next 2 bytes are simply the address of another FCB, Bit 7=1: Then the next 50 bytes are the description of an open file.
Note: IX+0CH = the position in the DCB for the NMSB OF THE LAST SECTOR TO READ/EOF)
Note: IX+0DH = the position in the DCB for the MSB OF THE LAST SECTOR TO READ/EOF)
Note: IX+03H = the position in the DCB for the LSB of the FILE BUFFER RAM ADDRESS).
Note: IX+04H = the position in the DCB for the MSB of the FILE BUFFER RAM ADDRESS).
Note: IX+06H = the position in the DCB for the DRIVE NUMBER).
Note: IX+07H = the position in the DCB for the LOGICAL FILE NUMBER [the directory entry number]).
[4ABAH]
NOTE: 4ABAH is the SYS00/SYS routine to read the HIT sector into RAM.
[4409H]
NOTE: 4409H is the SYS00/SYS routine to process DOS errors.
5951
LD H,43H
5963H – Patch File routine to update a system overlay file. The flags were preserved to the stack before this routine was called and are retrieved right after.
[4409H]
NOTE: 4409H is the SYS00/SYS routine to process DOS errors.
597BH – Evaluate the overlay number a/k/a Convert a Decimal String into a Binary Value.
[5996H]
- If Register A equals 10, the Z FLAG is set.
- If A < 10, the CARRY FLAG will be set.
- if A >= 10, the NO CARRY FLAG will be set.
[5996H]
598B
LD E,L
598D
598E
598F
ADD HL,HL
ADD HL,HL
ADD HL,HL
5991
LD D,00H
5996H – Continuation of the above evaluation routine when the number found is less than 0 or more than 9.
599AH – MESSAGE and STORAGE AREA.
599A
599BH – General Disk Routine. Open the disk file and preserve the LRL.
599B
[59ADH]
[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.
59ADH – General Disk Routine. Set up for full sector FILE I/O.
59AF
59B6H – General Disk Routine. Set up for full sector FILE I/O and Create A FiLE.
59B6
[59ADH]
[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.
59BCH – General Disk Routine. Set Register Pair DE to point to the SOURCE FILE DCB, check the syntax of the associated Filespec, and RETurn.
[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.
59C2H – Patch Error Routine. Display a STRING NOT FOUND message and ABORT.
[021BH]
NOTE: 021BH is the Model III ROM routine to display the character at (HL) until a 03H is found. Since this was JUMPED to instead of CALLed, the RET at the end of this ROM routine will then RETurn to the caller of this subroutine instead of returning to this place.
59C8H – MESSAGE and STORAGE AREA for the PATCH command.
59C8
59D3
59E4
5A01
5A14H – “RELO” Routine. This routine ONLY updates t he LOAD FILE FORMAT ADDRESS, it does not “renum” the file.
5A14
[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.
[521DH]
[4454H]
NOTE: 4454H is the DOS PARAMETER STRING PARSE routine. It decodes DOS LIBRARY parameters.
[5219H]
[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.
[5B04H]
[5AF3H]
[5A4FH]
5A4FH – Part of the RELO command. Jumped here if the character indicated a CODE BLOCK.
5A79
DEC B
[5A7CH]
[5AA9H]
[5A4AH]
5AA9H – Part of the RELO command. Jumped here if loop to read the characters in the prior routine hit an 02H to indicate END OF RECORD.
5AA9
[443FH]
NOTE: 443FH is the SYS00/SYS vector for ‘REWIND’, which will rewind the open file.
[5B04H]
5ADE
LD C,L
5AE9
OR C
[5AE3H]
[4428H]
NOTE: 4428H is the SYS00/SYS routine to CLOSE A DISK FILE. This RST 28H’s with a value of 93H so as to call ROUTINE 1 in OVERLAY 3.
5AF3H – Continuation of RELO Command. Jumped here if we need to skip over all the bytes in a COMMENT block. Requires Register B to contain the number of bytes in the COMMENT BLOCK to be skipped.
[5AF3H]
5AFBH – Continuation of RELO Command. Thgis routine reads a byte and puts it into Register A.
[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.
5B04H – Continuation of the RELO Command. Exit to the error handler.
5B07H – Continuation of the RELO Command. Write a byte out.
[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.
5B12H – MESSAGE and STORAGE AREA for the RELO COMMAND.
5B12
5B1FH – Main Routine – “FORMS”.
5B1F
[5B36H]
[003BH]
NOTE: 003BH is the Model III ROM routine to write the byte held in Register A to the printer, including waiting for the printer to be available OR getting a BREAK. Uses Register Pair DE. Since this was JUMPED to instead of CALLed, the RET at the end of this ROM routine will then RETurn to the caller of this subroutine instead of returning to this place.
5B36H – Continuation of the “FORMS” Routine. Jumped here if we determined that we actually got parameters on the COMMAND LINE.
[4454H]
NOTE: 4454H is the DOS PARAMETER STRING PARSE routine. It decodes DOS LIBRARY parameters.
[5219H]
5B3F
[6086H]
5B49
OR L
[5B50H]
Note: IX+06H = the position in the PRINTER DCB for LINE WIDTH.
[6086H]
5B56
OR L
Note: IX+03H = the position in the PRINTER DCB for LINES PER PAGE.
5B5FH – Continuation of the “FORMS” Routine. MESSAGE and BYTE STORAGE.
5B5F
5B70H – General Subroutine. Compare DE and HL Strings.
5B70
[5B7CH]
5B80H – Display “MESSAGE” + ” = “. HL must point to the message
[021BH]
NOTE: 021BH is the Model III ROM routine to display the character at (HL) until a 03H is found.
[021BH]
NOTE: 021BH is the Model III ROM routine to display the character at (HL) until a 03H is found. Since this was JUMPED to instead of CALLed, the RET at the end of this ROM routine will then RETurn to the caller of this subroutine instead of returning to this place.
5B89H – Display “MESSAGE” + “, “. HL must point to the message
[021BH]
NOTE: 021BH is the Model III ROM routine to display the character at (HL) until a 03H is found.
[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. Since this was JUMPED to instead of CALLed, the RET at the end of this ROM routine will then RETurn to the caller of this subroutine instead of returning to this place.
5B96H – MESSAGE AND STORAGE AREA.
5B9AH – NEW “ROUTE” COMMAND. This was deprecated, and the below 2 instructions just throw an error.
5B9A
5B9AH – OLD “ROUTE” COMMAND. Before the ROUTE command was deprecated, the code was …
[5BA5H]
[5C3AH]
If we are here then neither the ROUTE nor DUAL was set, so we need to actually process the command.
- 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.
[0069H]
[521DH]
5BB8
LD B,00H
[5BF4H]
[5219H]
5BD3
INC HL
[5BF1H]
[5BF1H]
[5BE5H]
[5BB3H]
[5219H]
5BF1H – ROUTINE inside the ROUTE COMMAND. Move the pointer to the current character on the COMMAND LINE by 1 and then JUMP to 5BD4H.
5BF4H – ROUTINE inside the ROUTE COMMAND. Process the DESTINATION.
5BF9
LD B,00H
[5219H]
[5219H]
[5BCCH]
5C10H – Continuation of the ROUTE routine; process the actual source/destination device code.
5C3AH – Abort out of the ROUTE command via a “CAN’T ROUTE” Error.
[021BH]
NOTE: 021BH is the Model III ROM routine to display the character at (HL) until a 03H is found. Since this was JUMPED to instead of CALLed, the RET at the end of this ROM routine will then RETurn to the caller of this subroutine instead of returning to this place.
5C40H – MESSAGE and BYTE STORAGE AREA for the ROUTE COMMEND.
5C40
5C5D
5C64
5C6B
5C6D
5C6F
5C71
5C73
5C75H – “SETCOM” Command – Configure the RS-232.
- 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.
[5D1FH]
[5D09H]
5C91
LD B,00H
5CAA
5CAB
RLCA
RLCA
5CAE
LD B,00H
[5CCBH]
[0033H]
NOTE: 0033H is the Model III ROM character print routine; displays the character held in Register A at the current cursor position.
[5CECH]
5CE2
[5CECH]
[5B89H]
[5D00H]
5D09H – SETCOM Routine – Turn the RS-232 Off.
5D17
[005AH]
[021BH]
NOTE: 021BH is the Model III ROM routine to display the character at (HL) until a 03H is found. Since this was JUMPED to instead of CALLed, the RET at the end of this ROM routine will then RETurn to the caller of this subroutine instead of returning to this place.
5D1FH – SETCOM Routine – Set up the RS-232 Channel.
[5219H]
[5D3DH]
[005AH]
5D3DH – SETCOM Routine – Set up the RS-232 Channel – Jumped to if we didn’t get an OPEN PARENTHESIS when we expected it.
[4454H]
NOTE: 4454H is the DOS PARAMETER STRING PARSE routine. It decodes DOS LIBRARY parameters.
[5219H]
5D4A
OR L
[5D09H]
5D51
OR L
[5D5AH]
5D5AH – SETCOM Routine – Reset WAIT Mode.
5D5D
OR L
5D64H – SETCOM Routine – Set the Baud Rate and Stop Bits.
5D68
OR C
[5219H]
[5D6FH]
5D89
OR L
[5D96H]
[5DFAH]
[5DF1H]
5D99
OR L
[5DA9H]
5DA9H – SETCOM Routine – Set the Parity and Word Length.
[5DF1H]
5DB8
OR L
[5219H]
[5DD1H]
5DD1H – SETCOM Routine – Set the Word Length if 7 Bits.
[5DD8H]
5DD8H – SETCOM Routine – Set the Word Length if 8 Bits.
[5219H]
[005AH]
5DF1H – SETCOM Routine – Set the configuration bits of the RS-232 based on the mask held in Register B.
5DFAH – SETCOM Routine – Reset the configuration bits of the RS-232 based on the mask held in Register B.
5E03H – MESSAGE and BYTE STORAGE for SETCOM.
5E11H – PARSER TABLE for SETCOM.
5E4AH – BAUD RATE TABLE for SETCOM.
5E4A
5E79H – Word Length Text Pointer Table.
5E79
5E81H – Baud Rate Text Pointer Table.
5E81
5E9FH – MESSAGE DISPLAY for SETCOM CONFIGURATION.
5F34H – “DUAL” Routine – Output to BOTH the Printer and the Display
First, check to see if ROUTE is on.
5F34
[5F88H]
[5F64H]
Next, check to see if DUAL is already on.
[5F5FH]
If we’re here, then we actually need to process the DUAL command.
5F64H – “DUAL” Routine – Restore
[5F7AH]
If we are here, then we need to process a DUAL OFF command.
[021BH]
NOTE: 021BH is the Model III ROM routine to display the character at (HL) until a 03H is found.
[021BH]
NOTE: 021BH is the Model III ROM routine to display the character at (HL) until a 03H is found. Since this was JUMPED to instead of CALLed, the RET at the end of this ROM routine will then RETurn to the caller of this subroutine instead of returning to this place.
5F88H – “DUAL” Routine – Abort if DUAL is engaged while ROUTE is engaged.
[021BH]
NOTE: 021BH is the Model III ROM routine to display the character at (HL) until a 03H is found. Since this was JUMPED to instead of CALLed, the RET at the end of this ROM routine will then RETurn to the caller of this subroutine instead of returning to this place.
5F8EH – Get the next COMMAND LINE character.
5F92
5F95H – MESSAGE and BYTE STORAGE for DUAL.
5F95
5FC5
5FD2
5FD5
5FD9H – “WP” Routine – Set a drive as write protected.
[5FE4H]
[600CH]
5FE4H – “WP” Routine – Jumped here if there were parameters given.
[4454H]
NOTE: 4454H is the DOS PARAMETER STRING PARSE routine. It decodes DOS LIBRARY parameters.
[5219H]
- If Register A equals the value held in Register C, the Z FLAG is set.
- If A < C, the CARRY FLAG will be set.
- if A >= C, the NO CARRY FLAG will be set.
[5221H]
[021BH]
NOTE: 021BH is the Model III ROM routine to display the character at (HL) until a 03H is found.
[021BH]
NOTE: 021BH is the Model III ROM routine to display the character at (HL) until a 03H is found.
6010H – PARSER TABLE for WP COMMAND.
6010
6019
602E
603EH – “MASTER” Routine. This routine re-assigns the master drive number.
[6048H]
[6071H]
6048H – “MASTER” Routine – Jumped here if there were parameters given.
[4454H]
NOTE: 4454H is the DOS PARAMETER STRING PARSE routine. It decodes DOS LIBRARY parameters.
[5219H]
- If Register A equals the value held in Register C, the Z FLAG is set.
- If A < C, the CARRY FLAG will be set.
- if A >= C, the NO CARRY FLAG will be set.
[5221H]
[021BH]
NOTE: 021BH is the Model III ROM routine to display the character at (HL) until a 03H is found.
[021BH]
NOTE: 021BH is the Model III ROM routine to display the character at (HL) until a 03H is found.
6075H – MESSAGE and BYTE STORAGE for MASTER.
6075
6086H – Convert Binary Coded Decimal into a Binary Value. On Entry HL = a hex value and On Exit HL = the decimal value.
6086
608C
LD H,00H
608F
POP BC
Now the high nybble of the MSB has been shifted over to the 10’s spot, so that the low nybble of the MSB can occupy the 1’s spot.
6099
POP BC
Now the converted MSB has been shifted over to the 10’s spot, so that the LSB can occupy the 1’s spot.
60A2
LD B,00H
60A6
POP BC
Now the high nybble of the LSB has been added to the converted MSB.
Now everything has been pushed over one level, leaving just the 1’s spot empty.
60B0H – Routine to Multiply HL by 10. Requires HL = BC.
60B5H – Get the high nybble.
MISC – STORAGE BYTES.
6130
6162
6194
6300
6400