5C6FH – DIR Command
				5C6F
LD BC,0000H
We are going to need to clear a bunch of memory locations, so fill BC with 0’s
5C72
LD (5D9BH),BC
Put a zero in the “A” option flag (i.e., not selected)
5C76
LD (5D0BH),BC
Put a zero in the “I” option flag (i.e., not selected)
5C7A
LD (5CFDH),BC
Put a zero in the “S” option flag (i.e., not selected)
5C7E
LD C,00H
Put a default drive number of 0 into Register C
5C80
LD A,(HL)
Put the next character from the command line into Register A
5C81
CP ‘:’
Check to see if that character is a “:”
5C83
If it is not a colon, then we have no drive specified, so no need to process a drive number.  Skip down to 5C8BH
5C85
INC HL
BUMP HL to point to the next character from the command line
5C86
LD A,(HL)
Put the next character from the command line into Register A
5C87
INC HL
BUMP HL to point to the next character from the command line
5C88
SUB ‘0’
SUBtract 30H from A to convert the drive number from the command line to binary
5C8A
LD C,A
Replace the default drive number with the one provided, held in A
5C8B
PUSH BC
Save the drive number to the stack
5C8C
LD A,C
Put the drive number to be used into Register A
5C8D
ADD A,’0′
ADD a “0” to Register A to effectively convert it from binary to ASCII
5C8F
LD (5E9EH),A
Put the drive number (in ASCII) into 5E9EH, which is the title message
5C92
LD DE,5E6AH
Put the address of the DIR options I,S, and A into DE
5C95
GOSUB to 4476H in SYS1/SYS to compare the rest of the command line to the option list pointed to by DE
5C98
LD HL,5E83H
Put the address of the DIR title line into DE
5C9B
GOSUB to 4467H display the title line pointed to by DE
5C9E
POP BC
Restore the Stack into Register BC
5C9F
PUSH BC
Save the contents of Register BC to the stack
5CA0
GOSUB to 4B55H to get the directory track number for the disk drive pointed to by Register C
5CA3
LD E,00H
Register E will hold the sector number, so put a 00H into Register E
5CA5
LD HL,4200H
Point Register Pair HL to a buffer starting at 4200H
5CA8
Read the sector held in Register E of track 11 into the buffer pointed to by HL
5CAB
If NZ is set, then there was an error in that diskette I/O, so JUMP to the general purpose Disk I/O error routine at 554CH
5CAE
LD HL,42D0H
Point HL to the address of the disk name in the GAT sector buffer
5CB1
LD DE,5EA1H
Point DE to the address of the disk name in third title line (i.e., “NNNNNNNN — MM/DD/YY”)
5CB4
LD BC,0008H
Set BC to the number of bytes in a diskette name
5CB7
LDIR
Move the disk name from the GAT buffer to the third title line (i.e., “NNNNNNNN — MM/DD/YY”).  LDIR moves BC number of bytes from the memory location held in HL into the memory location held in DE
5CB9
LD DE,5EADH
Point DE to the address of the date in the third title line (i.e., “NNNNNNNN — MM/DD/YY”)
5CBC
LD BC,0008H
Set BC to the number of bytes in a date
5CBF
LDIR
Move the date from the GAT buffer to the third title line (i.e., “NNNNNNNN — MM/DD/YY”).  LDIR moves BC number of bytes from the memory location held in HL into the memory location held in DE
5CC1
LD HL,5EA1H
Point HL to the address of the third  title line (i.e., “NNNNNNNN — MM/DD/YY”)
5CC4
GOSUB to 4467H display the third title line (i.e., “NNNNNNNN — MM/DD/YY”)
5CC7
POP BC
Restore the stack to Register Pair BC
5CC8
LD B,00H
Setup for reading the first directory sector
5CCA
LD DE,6100H
Point DE to a buffer starting at 6100H
5CCD
Read a sector of the directory file into 4200H
5CD0
If NZ is set, then there was an error in that diskette I/O, so JUMP to the general purpose Disk I/O error routine at 554CH
5CD3
LD L,00H
Force HL to 4200H, which is the sector buffer start address
5CD5
PUSH BC
Save the contents of Register Pair BC to the stack
5CD6
LD BC,0100H
Load BC with the number of bytes to move (here, 256)
5CD9
LDIR
Copy the buffer at 4200H to the buffer at 6100H.  The LDIR command moves BC number of bytes from the memory location held in HL into the memory location held in DE
5CDB
POP BC
Restore the sector/drive number from the stack into Register Pair BC
5CDC
INC B
Bump the sector number by 1
5CDD
LD A,B
Put the bumped sector number into Register A for processing
5CDE
CP 08H
Compare Register A (the bumped sector number) against 08H to see if we read the last directory sector or not
5CE0
If NZ is set, then we did NOT reach the end, so JUMP back to 5CCDH
5CE2
LD HL,6100H
If we are here then all sectors have been read, so now we need to display them.  First, point HL to a buffer starting at 6100H
5CE5
LD A,0CH
Set Register A to the number of lines to display before it pauses
5CE7
LD (5DABH),A
Put that maximum line count into 5DABH (which is the line counter)
5CEA
LD B,03H
Set Register B to the number of files to display per line (i.e., 3)
5CEC
LD A,(HL)
Get the access control byte from the directory
5CED
PUSH HL
Save the directory address for the current file to the stack
5CEE
BIT 4,A
Test Bit 4 of Register A (the access control byte) to see if the entry is occupied
5CF0
If the Z Flag is SET then the entry is NOT occupied, so JUMP to 5DBFH to move to the next entry
5CF3
BIT 7,A
If we are here, then the entry is occuped so we now test Bit 7 of Register A (the access control byte) to see if it is a primary entry or an overflow entry
5CF5
If NZ is set then this is an overflow entry, so JUMP to 5DBFH to move to the next entry
5CF8
BIT 6,A
If we are here then the entry is occupied and it is not an overflow entry, so now we test Bit 6 of Register A (the access control byte) to see if it is a USER or SYSTEM file
5CFA
If the Z Flag is SET then it is a SYSTEM file, so JUMP to 5D06H
5CFC
LD DE,0000H
If we are here then the file is a USER file, so set DE to 0000H in preparation for testing to see if S option was specified or not
5CFF
5D00
LD A,D
OR E
Standard Z-80 combination to test DE against 00
5D01
If the Z Flag is SET then DE was 0000H and the S option was NOT selected, so JUMP to 5DBFH
5D04
If we are here, then DE was FFFF and the “S” option was selected, so JUMP to 5D12H to display the file
5D06
BIT 3,A
Test Bit 3 of Register A (the access control byte) to see if the file is INVISIBLE
5D08
If the Z Flag is SET then it is not invisible and can be displayed so JUMP to 5D12H
5D0A
LD DE,0000H
Begin the test to see if the user selected “I”.  First, set DE to 0000H.  This value (5D0B-5D0C) will be modified by SYS1/SYS if the user selected “I”
5D0D
5D0E
LD A,D
OR E
Standard Z-80 combination to test DE against 00
5D0F
If the Z Flag is SET then I was not selected so JUMP to 5DBFH
5D12
PUSH BC
If we are here then we haven invisible file AND the “I” option was chosen,Save the file’s line count and drive number to the stack
5D13
LD A,L
Put the LSB of the current entries address into Register A
5D14
ADD A,05H
Add 5 to that address to now point to the filename address
5D16
LD L,A
Put the address of the filename into Register L
5D17
LD C,11H
Set Register C to the maximum number of characters in a filename/EXT (i.e., 17)
5D19
LD B,08H
Set Register B to the maximum number of characters in a filename (i.e., 8)
5D1B
LD A,(HL)
Get a character from the filename pointed to by Register Pair HL
5D1C
INC HL
BUMP Register Pair HL to point to the next character of the filename
5D1D
CP ‘ ‘
Check to see if the filename character is a ” “
5D1F
If the Z Flag is SET then it is a space and we have run out of letters so then JUMP to 5D29H to process the extension
5D21
GOSUB to 0033H in the ROM to send the character held in Register A to the current device
5D24
DEC C
Reduce the number of characters to display by 1
5D25
LOOP back to 5D1BH until B (maximum number of characters in a filename) is zero
5D27
If we are here, then we have displayed as much of the filename as we have, so JUMP to 5D2DH to process the display of the extension
If we are here then we have run out of letters in the filename before we hit 8.
				5D29
LD A,L
Put the LSB of the current address in the directory buffer into Register A
5D2A
ADD A,B
Add the remaining number of bytes in the filename to get to the extension + 1
5D2B
DEC A
Subtract 1 from A to now point to the extension
5D2C
LD L,A
Put the modified Register L (held in A) back into Register L so that L now points to the extension
Now we process the filename’s extension
				5D2D
LD A,(HL)
Put the character pointed to by HL into Register A
5D2E
CP ‘ ‘
Compare the character held in Register A against a space
5D30
If the Z Flag is SET then we have no extension, so JUMP to 5D46H
5D32
LD A,’/’
If we are here, then we have an extension so load up the “/” into Register A since that has to be next character displayed
5D34
GOSUB to 0033H in the ROM to send the character held in Register A to the current device
5D37
DEC C
DECrement Register C by 1 (the maximum number of characters we should display for a given filename + extension) to reflect that we just displayed a character (in this case “/”)
5D38
LD B,03H
Set Register B to the maximum length of an extension (i.e., 3 characters)
5D3A
LD A,(HL)
Put the character pointed to by HL into Register A – in this case, one of the extension characters
5D3B
INC HL
Bump HL to point to the next character in the extension
5D3C
CP ‘ ‘
Compare the character held in Register A against a space to see if we have run out of characters
5D3E
If the Z Flag is SET then we have run out of characters before we hit 3 so then JUMP to 5D46H
5D40
If we are here, then we have a non-blank extension character so GOSUB to 0033H in the ROM to send the character held in Register A to the current device
5D43
DEC C
DECrement Register C by 1 to indicate that we have just displayed a character
5D44
LOOP back to 5D3AH until B is zero
If we are here, then we have finished displaying the extension (including if there was no extension at all, we ran out of characters before 3, or we displayed 3)
				5D46
LD A,’ ‘
Put a ” ” into Register A
5D48
Display the ” ” by GOSUB to 0033H in the ROM to send the character held in Register A to the current device
5D4B
DEC C
DECrement Register C (the maximum number of characters we should display for a given filename + extension) by 1 since we just displayed a ” “
5D4C
LD A,L
Put Register L (the LSB of current file entry) into Register A for processing
5D4D
AND 0E0H
MASK Register A against 1110 0000 to keep only bits 5-7.  This forces the LSB to be the beginning of a file
5D4F
LD L,A
Put the modified Register L (held in A) back into Register L
5D50
LD B,(HL)
Put the access flag for the file into Register B
5D51
LD A,’S’
Put a “S” into Register A for displaying
5D53
BIT 6,B
 Test Bit 6 of Register B to see if the file is a SYSTEM file
5D55
If the file is a SYSTEM file then JUMP to 5D59H
5D57
LD A,’ ‘
Swap out the “S” for a ” ” since it isn’t a SYSTEM file
5D59
GOSUB to 0033H in the ROM to send the character held in Register A to the current device
5D5C
LD A,’I’
Put a “I” into Register A for displaying
5D5E
BIT 3,B
 Test Bit 3 of Register B to see if the file is INVISIBLE
5D60
If the file is an INVISIBLE file then JUMP to 5D64H
5D62
LD A,’ ‘
Swap out the “I” for a ” ” since it isn’t an INVISIBLE file
If we are here, then we have determined that the file is invisible.
				5D64
GOSUB to 0033H in the ROM to send the character held in Register A to the current device
5D67
PUSH HL
Save Register Pair HL (currently holding the beginning address of the file entry) to the Stack
5D68
LD A,L
Put Register L (currently the LSB of the file’s entry address) into Register A for processing
5D69
ADD A,10H
Move down 16 characters to now point to the UPDATE password
5D6B
LD L,A
Put the modified Register L (held in A) back into Register L
5D6C
LD E,(HL)
Put the LSB of the UPDATE PASSWORD into Register E
5D6D
INC L
BUMP L by 1 to point to the next byte in the password
5D6E
LD D,(HL)
Put the MSB of the UPDATE PASSWORD into Register D
5D6F
PUSH HL
Save Register Pair HL (the address of the UPDATE PASSWORD) to the Stack
5D70
LD HL,4296H
Set HL to 4296H which is the value of a universal password
5D73
SBC HL,DE
Test to see if the file is password protected or not
5D75
POP HL
Restore the address of the UPDATE PASSWORD from the Stack to Register Pair HL
5D76
If the Z Flag is SET then the file has no password so JUMP to 5D8CH
5D78
LD A,B
If we are here then the file has a password, so get the access flags (currently held in Register B) and put them into Register A for processing
5D79
AND 07H
MASK Register A against 0000 0111 to keep only bits 0-2, thus isolating the access control flags 
5D7B
LD A,’P’
Put a “P” into Register A
5D7D
If the mask results in NZ being set, then we do not have unrestricted access to the file and JUMP to 5D8EH
5D7F
INC L
BUMP L by 1 to point to the LSB of the ACCESS password
5D80
LD E,(HL)
Put the LSB of the ACCESS PASSWORD into Register E
5D81
INC L
BUMP L by 1 to point to the MSB of the ACCESS password
5D82
LD D,(HL)
Put the MSB of the ACCESS PASSWORD into Register E
5D83
LD HL,4296H
Set HL to 4296H which is the value of a universal password
5D86
SBC HL,DE
Test to see if the file has an ACCESS PASSWORD or not
5D88
LD A,’P’
Put a “P” into Register A
5D8A
If that test shows that the file has an ACCESS PASSWORD, then JUMP to 4D8EH to display the “P” and continue processing
If we are here, then it has been determined that the file has no password.
				5D8C
LD A,’ ‘
Put a ” ” into Register A to overwrite the “P” that may already be there
5D8E
GOSUB to 0033H in the ROM to send the character held in Register A (which may be a “P” or a ” “) to the current device
5D91
POP HL
Restore the beginning address of the file entry into Register Pair HL
Fill in the remainder of the field
				5D92
LD A,’ ‘
Put a ” ” into A since we are going to pad the rest of the field
5D94
GOSUB to 0033H in the ROM to send the character held in Register A to the current device
5D97
DEC C
DECrement Register C (the maximum number of characters we should display for a given filename + extension) by 1 since we just displayed a ” “
5D98
LOOP back to 4D92H until we have padded out to reach 17 characters per filename
5D9A
LD DE,0000H
Set Register Pair DE to 0000H.  If the user had included an “A” option, then SYS1/SYS will have filled bytes 5D9B-5D9C with “FFFF” instead
5D9D
5D9E
LD A,D
OR E
Common set of instructions to test DE against 0
5D9F
POP BC
Restore the files/line count and drive number from the stack into Register Pair BC
5DA0
If DE is NOT zero, then “A” was chosen as an option, so JUMP to 5DF1H to display the file size
5DA3
Reduce B by 1 (as we just displayed a file), and JUMP back to 5DBFH if there is room for more files to be displayed on this line
5DA5
LD A,0DH
If we are here, then we have displayed enough files on a line to merit a new line.  Put a CARRIAGE RETURN into Register A
5DA7
GOSUB to 0033H in the ROM to send the character held in Register A to the current device
5DAA
LD A,00H
Put a 0 into Register A to set the maximum number of lines per screen
Check to see if we have hit the maximum number of lines per screen and if so, wait for user key press
				5DAC
DEC A
DECrement that line count by 1
5DAD
JUMP back to 5DB4H to put up another line until the maximum number of lines per screen has been exhausted
5DAF
If we are here, then the screen is full, so GOSUB to 0049H to the ROM to wait for a key press
5DB2
LD A,0CH
Put the maximum number of lines per screen into Register A (i.e., 17) 
5DB4
LD (5DABH),A
… and put that into the line/screen counter held at 5DABH
5DB7
GOSUB to 5515H to read the keyboard and test for SHIFT + @ and BREAK
5DBA
If NZ is set, then the BREAK key was pressed, so JUMP to 5DDBH to zero out the buffer (for security) and return to DOS
5DBD
LD B,03H
Set Register B to the number of files per line (i.e., 3)
5DBF
POP HL
Restore the beginning address of the current directory entry into Register Pair HL
5DC0
INC H
BUMP Register H by 1 to point to the next sector
5DC1
LD A,H
Put the contents of Register H into Register A for processing/testing
5DC2
CP 69H
Compare Register A against 105 to see if 8 sectors have been processed
5DC4
If 8 sectors have NOT been processed (i.e., NZ is set) then JUMP to 4CECH to process the next entry from the next sector
5DC8
LD H,61H
Prepare HL to point to a buffer at 61xxH by setting the MSB (H) to 61H
5DC9
LD A,L
Put Register L (the beginning address for the last entry) into Register A for processing
5DCA
ADD A,20H
Bump 20 bytes forward to as to calculate the beginning address
5DCC
LD L,A
Put the modified Register L (held in A) back into Register L
5DCD
If NC is set, then all entries have NOT been processed, so JUMP back to 4CECH to process the next entry
5DD0
GOSUB to 5DE1H to zero out the sector buffers.  This is done to protect passwords
5DD3
LD A,0DH
Put a CARRIAGE RETURN into Register A
5DD5
GOSUB to 0033H in the ROM to send the character held in Register A to the current device
5DD8
JUMP back to SYS1/SYS for the next command
If the BREAK key was pressed, we jump here to zero out the buffer (for security) and return to DOS with OPTION 2
				5DDB
GOSUB to 5DE1H to zero out the sector buffers.  This is done to protect passwords
5DDE
JUMP to 4030H to go back to SYS1/SYS with an OPTION 2 set
This routine in the DIR function zeroes out the 8 sector buffers (6100H, 6200H … 6800H) to protect the passwords
				5DE1
LD HL,6100H
Point HL to a buffer starting at 6100H
5DE4
LD B,00H
Set B to 00H (the fill character to zero out a memory byte))
5DE6
LD (HL),B
Put a 00H into the buffer pointed at by HL
5DE7
INC L
BUMP L by 1 to point to the next character in the buffer
5DE8
Jump back to 5DE6H to keep zeroing out bytes until the count rolls over (i.e., 256)
5DEA
INC H
At this point, we looped to fill a sector worth of buffer, so BUMP Register H by 1 to point to the next sector in the buffer
5DEB
LD A,H
Put the contents of Register H into Register A for processing/testing
5DEC
CP 69H
Compare Register A against 105 to see if 8 sectors have been processed
5DEE
If 8 sectors have NOT been processed (i.e., NZ is set), then JUMP back to 5DE6H to erase 256 bytes
This routine is called from 5DA0H if “A” was chosen as an option so as to display the file size
				5DF1
PUSH HL
Save Register Pair HL (holding the beginning address of the file entry) to the Stack
5DF2
5DF3
5DF4
INC L
INC L
INC L
BUMP L by 3 so as to point to the address of the EOF sector
5DF5
LD A,(HL)
Put the character pointed to by HL (the EOF byte offset) into Register A
5DF6
LD (5E69H),A
Put the the EOF byte offset into 5E69H for temporary storage
5DF9
INC L
BUMP L by 1 to so that L now points to the logical record length (LRL) in the directory
5DFA
PUSH HL
Save Register Pair HL (the address of the LRL) to the Stack
5DFB
LD L,(HL)
Put the logical record length into Register L
5DFC
LD A,L
Put Register L (the logical record length) into Register A for processing
5DFD
LD (5E1FH),A
Put the logical record length into 5E1FH for temporary storage
5DF0
SUB 01H
Subtract 1 from the logical record length to set the CARRY FLAG if the LRL was 256
5DF2
LD A,00H
Put a 0 into Register A, maintaining the CARRY FLAG
5DF4
ADC A,00H
Add with carry to 00H again.  We now have A set as zeros with CARRY maintained
5DF6
LD H,A
Put that into Register H
5DF7
LD DE,5EBBH
Load Register Pair DE with 5EBBH (the address of th LRL in the display line)
5DFA
GOSUB to 606CH to convert Register DEs contents (the LRL) to ASCII and display it
5E0A
POP HL
Restore the address of the LRL from the stack into Register Pair HL
5E0D
LD A,L
Put Register L (the LSB of the address of the LRL) into Register A for processing
5E0E
ADD A,10H
Set A to be 16 bytes past the LSB of the address of the LRL so as to point to the byte containing the EOF sector number
5E0F
LD L,A
Put the modified Register L (held in A) back into Register L so that HL will point to the EOF sector
5E11
LD A,(HL)
Put the character pointed to by HL (the LSB of ending sector number) into Register A
5E12
LD (5E68H),A
Put the the LSB of ending sector number into 5E68H for temporary storage
5E13
INC L
BUMP L by 1 to point to the MSB of ending sector number
5E16
LD A,(HL)
Put the character pointed to by HL (the MSB of ending sector number) into Register A
5E17
LD (5E67H),A
Put the the MSB of ending sector number into 5E67H for temporary storage
5E18
LD HL,5E67H
Set HL to point to the address of the ending sector number in binary
5E1B
LD C,00H
Set Register C to the LRL.  This may be 00H here, but the instruction at 5DFDH modifies it
5E20
GOSUB to 60A7H to divide the number of records by record size
5E23
EX DE,HL
Swap DE and HL so that the quotient of that division is now in Register Pair HL
5E24
LD DE,5EC7H
Load DE with the address of the ending sector number in display
5E27
GOSUB to 606CH to convert Register DEs contents (the ending sector number) to ASCII and display it
5E2A
POP HL
Restore the address of the LRL into Register Pair HL
5E2B
GOSUB to 5E3EH to compute the number of granules assigned to the file.  Results stored in DE
5E2E
EX DE,HL
Swap DE and HL so that HL holds the number of granules assigned to the file
5E2F
LD DE,5ED4H
Load DE with the address of the number of granules assigned to the file in the display line
5E32
GOSUB to 606CH to convert Register DEs contents (the number of granules assigned to the file) to ASCII and display it
5E35
LD HL,5EB7H
Load HL with the address of the LRL of the file in the display line
5E38
GOSUB to 4467H to display the message pointed to by HL
5E3B
LD B,01H
Set B (the line counter) to 1, as there is only one file/line to display if we are here
Routine inside DIR to compute the number of granules assigned to the file.  Results stored in DE.
				5E3E
LD DE,0000H
Zero up Register Pair DE since it will be the accumulator for the math
5E41
LD A,L
Put Register L (the LSB of LRL) into Register A for processing
5E42
ADD A,16H
Set A to be 32 bytes later than the the LSB of LRL so as to point to the GAP
5E44
LD L,A
Put the modified Register L (held in A) back into Register L, so that HL points to the GAP’s address
5E45
LD A,(HL)
Put the character pointed to by HL (a byte of the GAP) into Register A
5E46
INC L
BUMP L by 1 to point to the next character, which is the granule count
5E47
CP 0FEH
Compare Register A against 0FEH to see if we have either the end of the GAP or there is an overflow entry
5E49
If NC is set, then we have an end of the gap or there is an overflow entry, so JUMP out of this LOOP to the next routine.  This is the LOOP exit
5E4B
LD A,(HL)
Put the character pointed to by HL (the granule count) into Register A
5E4C
INC L
BUMP L by 1 to point to the next GAP
5E4D
AND 1FH
AND the granule count by 1FH to isolate the granule count – 1
5E4F
INC A
BUMP Register A by 1 to get to the true granule count
5E50
ADD A,E
Add Register E to Register A
5E51
LD E,A
Copy the result of that math back into Register E because DE is tracking the math
5E52
If the NC is set, then the LSB has not yet overflowed, so skip the next instruction
5E54
INC D
If we are here, then the LSB overflowed, so we need to BUMP Register D (the MSB of the granule count) by 1
5E55
LOOP back to the top of this routine (5E45H).  This LOOP will keep going until 5E49 exits the loop because FF (end of GAP) was found
If the above routine (computing the number of granules) hits an end of the gap or there is an overflow entry, it jumps here
				5E57
RET NZ
If the NZ flag is set then it found an END OF GAP, so RETURN to the caller
5E58
LD B,(HL)
If we are here, then we hit an overflow entry, so put the memory contents of HL, which is the pointer to the overflow entry, into Register B
5E59
LD A,B
Put the pointer to the overflow entry held in Register B into Register A for processing/testing
5E5A
AND 07H
MASK Register A against 0000 0111 to keep only bits 0-2, which is the sector number
5E5C
ADD A,61H
Form the address of the sector buffer by prepending with “61xxH”
5E5E
LD H,A
Put the 61H into the MSB of the sector buffer
5E5F
LD A,B
Put the pointer to the overflow entry into Register A
5E60
AND 0E0H
MASK Register A against 1110 0000 to keep only bits 5-7, which form the offset to the file entry
5E62
ADD A,16H
Add an offset of 32 bytes to offset to the GAP’s
5E64
LD L,A
Put the modified Register L (held in A) back into Register L
5E65
JUMP back to 5E45H to continue counting grans until the end of the GAP’s are found
Next is storage
				5E67
DEFB 0
Memory location to hold the MSB of the EOF Sector
5E68
DEFB 0
Memory location to hold the LSB of the EOF Sector
5E69
DEFB 0
Memory location to hold the EOF byte offset
… DIR Option Text List (A, I, and S)
				
				5E71
DEFW 5D9BH
Code address for the “A” Option
5E78
DEFW 5D0BH
Code address for the “I” Option
5E81
DEFW 5CFDH
Code address for the “S” Option
… DIR Screen Displays
				5E83
DEFB 1CH
ASCII character value to clear the screen
5E84
DEFB 1FH
ASCII character value to home the cursor
5E85
.text
“FILE DIRECTORY — DRIVE X”
5E9F
DEFB C5H
ASCII Compression Code for 5 Blanks
5EA0
DEFB 03H
Message Terminator
5EA1
.text
“NNNNNNNN — MM/DD/YY”
5EB5
DEFB 0AH
ASCII character value for LINE FEED
5EB6
DEFB 0DH
ASCII character value for CARRIAGE RETURN / Message Terminator
5EB7
.text
“LRL=      / EOF=      / SIZE=      GRANS”
5EDF
DEFB 03H
Message Terminator