This code appears in the following versions (click to see it in the source code):
Code variations between these versions are shown below.
.CATSName: CATS Type: Subroutine Category: Save and load Summary: Ask for a disc drive number and print a catalogue of that drive
This routine asks for a disc drive number, and if it is a valid number (0-3) it displays a catalogue of the disc in that drive. It also updates the OS command at CTLI so that when that command is run, it catalogues the correct drive.
Returns: C flag Clear if a valid drive number was entered (0-3), set otherwise
The Master Compact only has one disc drive, and it uses ADFS rather than DFS, so instead of asking for a drive number, it asks for a directory name.
Tap on a block to expand it, and tap it again to revert.
STA XC \ Move the text cursor to column 1
As the Master Compact uses ADFS, this release has to claim and release the NMI workspace when accessing the disc, in order to prevent ADFS from corrupting that part of zero page. It does this by calling the NMICLAIM and NMIRELEASE routines at the appropriate time.
This variation is blank in the Disc (docked) and 6502 Second Processor versions.
IF _SNG47 JSR getzp \ Call getzp to store the top part of zero page in the \ the buffer at &3000, as it gets corrupted by the MOS \ during disc access ELIF _COMPACT JSR NMIRELEASE \ Release the NMI workspace (&00A0 to &00A7) so the MOS \ can use it, and store the top part of zero page in the \ the buffer at &3000, as it gets corrupted by the MOS \ during disc access ENDIF
LDX #LO(CTLI) \ Set (Y X) to point to the OS command at CTLI, which LDY #HI(CTLI) \ contains a dot and the drive number, which is the \ DFS command for cataloguing that drive (*. being short \ for *CAT)
This variation is blank in the Disc (docked) and 6502 Second Processor versions.
JSR getzp \ Call getzp to restore the top part of zero page from \ the buffer at &3000
CLC \ Clear the C flag RTS \ Return from the subroutine