Added *CLOSE command.

This commit is contained in:
Bobbi Webber-Manners 2022-09-21 16:51:51 -04:00
parent f71cebd4d1
commit a30a164b5e
2 changed files with 17 additions and 0 deletions

Binary file not shown.

View File

@ -310,6 +310,9 @@ FSCCOMMAND ASC 'CHDIR'
ASC 'COPY'
DB $80
DW FSCCOPY-1 ; COPY <listspec> <*objspec*>, LPTR=>params
ASC 'CLOSE'
DB $80
DW FSCCLOSE-1 ; CLOSE
*
DB $FF ; Terminator
@ -838,6 +841,20 @@ DESTROY JSR PARSLPTR ; Copy filename->MOSFILE
FSCTITLE RTS
* Handle *CLOSE command
*
FSCCLOSE JSR PARSLPTR
BNE :SYNTAX ; Trailing junk
LDA #$00 ; Close all open files
LDY #$00
JSR FINDHND
STZ FXSPOOL ; Also, stop spooling
RTS
:SYNTAX BRK
DB $DC
ASC 'Syntax: CLOSE'
BRK
* Parse filename pointed to by XY
* Write filename to MOSFILE in main memory
* Returns length in A with EQ/NE set