.DELT JSR CATS \ Call CATS to ask for a drive number (or a directory \ name on the Master Compact) and catalogue that disc \ or directory BCS SVE \ If the C flag is set then an invalid drive number was \ entered as part of the catalogue process, so jump to \ SVE to display the disc access menu \ --- Mod: Code removed for Elite-A: ------------------> \LDA CTLI+1 \ The call to CATS above put the drive number into \STA DELI+4 \ CTLI+1, so copy the drive number into DELI+4 so that \ \ the drive number in the "DE.:0.E.1234567" string \ \ gets updated (i.e. the number after the colon) \ --- And replaced by: --------------------------------> LDA CTLI+2 \ The call to CATS above put the drive number into STA DELI+5 \ CTLI+2, so copy the drive number into DELI+5 so that \ the drive number in the "DEL.:0.E.1234567" string \ gets updated (i.e. the number after the colon) \ --- End of replacement ------------------------------> LDA #9 \ Print extended token 9 ("{clear bottom of screen}FILE JSR DETOK \ TO DELETE?") JSR MT26 \ Call MT26 to fetch a line of text from the keyboard \ to INWK+5, with the text length in Y TYA \ If no text was entered (Y = 0) then jump to SVE to BEQ SVE \ display the disc access menu \ We now copy the entered filename from INWK to DELI, so \ that it overwrites the filename part of the string, \ i.e. the "E.1234567" part of "DEL.:0.E.1234567" LDX #9 \ Set up a counter in X to count from 9 to 1, so that we \ copy the string starting at INWK+4+1 (i.e. INWK+5) to \ DELI+5+1 (i.e. DELI+6 onwards, or "E.1234567") .DELL1 \ --- Mod: Code removed for Elite-A: ------------------> \LDA INWK+4,X \ Copy the X-th byte of INWK+4 to the X-th byte of \STA DELI+5,X \ DELI+5 \ --- And replaced by: --------------------------------> LDA INWK+4,X \ Copy the X-th byte of INWK+4 to the X-th byte of STA DELI+6,X \ DELI+6 \ --- End of replacement ------------------------------> DEX \ Decrement the loop counter BNE DELL1 \ Loop back to DELL1 to copy the next character until we \ have copied the whole filename LDX #LO(DELI) \ Set (Y X) to point to the OS command at DELI, which LDY #HI(DELI) \ contains the DFS command for deleting this file JSR OSCLI \ Call OSCLI to execute the OS command at (Y X), which \ catalogues the disc JMP SVE \ Jump to SVE to display the disc access menu and return \ from the subroutine using a tail callName: DELT [Show more] Type: Subroutine Category: Save and load Summary: Catalogue a disc, ask for a filename to delete, and delete the fileContext: See this subroutine in context in the source code References: This subroutine is called as follows: * SVE calls DELT * CATS calls via DELT-1
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 then asks for a filename to delete, updates the OS command at DELI so that when that command is run, it deletes the correct file, and then it does the deletion.
Other entry points: DELT-1 Contains an RTS
[X]
Subroutine CATS (category: Save and load)
Ask for a disc drive number and print a catalogue of that drive
[X]
Variable CTLI (category: Save and load)
The OS command string for cataloguing a disc
[X]
Variable DELI (category: Save and load)
The OS command string for deleting a file
[X]
Label DELL1 is local to this routine
[X]
Subroutine DETOK (category: Text)
Print an extended recursive token from the TKN1 token table
[X]
Subroutine MT26 (category: Text)
Fetch a line of text from the keyboard
[X]
Configuration variable OSCLI = &FFF7
The address for the OSCLI routine
[X]
Subroutine SVE (category: Save and load)
Save the commander file