mirror of
https://github.com/bobbimanners/Applecorn.git
synced 2025-01-03 22:30:09 +00:00
First implementation of *SPOOL.
This commit is contained in:
parent
421b3bc8ce
commit
0a2b891b7c
BIN
applecorn.po
BIN
applecorn.po
Binary file not shown.
@ -56,7 +56,7 @@ WRCHHND PHA
|
||||
PHX
|
||||
PHY
|
||||
* TO DO Check any output redirections
|
||||
* PHA
|
||||
PHA
|
||||
|
||||
JSR OUTCHAR
|
||||
* TO DO Check any printer output
|
||||
@ -67,14 +67,13 @@ WRCHHND PHA
|
||||
* WRCHHND3
|
||||
|
||||
* TO DO Check any spool output
|
||||
* LDY FXSPOOL
|
||||
* BEQ WRCHHND4
|
||||
* PLA
|
||||
* PHA
|
||||
* JSR OSBPUT
|
||||
* WRCHHND4
|
||||
* PLA
|
||||
*
|
||||
LDY FXSPOOL
|
||||
BEQ WRCHHND4
|
||||
PLA
|
||||
PHA
|
||||
JSR OSBPUT
|
||||
WRCHHND4 PLA
|
||||
|
||||
PLY
|
||||
PLX
|
||||
PLA
|
||||
|
@ -310,12 +310,15 @@ FSCCOMMAND ASC 'CHDIR'
|
||||
ASC 'COPY'
|
||||
DB $80
|
||||
DW FSCCOPY-1 ; COPY <listspec> <*objspec*>, LPTR=>params
|
||||
ASC 'XEXEC'
|
||||
DB $80
|
||||
DW FSCEXEC-1 ; EXEC <*objspec*>, LPTR=>params
|
||||
ASC 'TYPE'
|
||||
DB $80
|
||||
DW FSCTYPE-1 ; TYPE <*objspec*>, LPTR=>params
|
||||
ASC 'SPOOL'
|
||||
DB $80
|
||||
DW FSCSPOOL-1 ; SPOOL <*objspec*>, LPTR=>params
|
||||
ASC 'XEXEC'
|
||||
DB $80
|
||||
DW FSCEXEC-1 ; EXEC <*objspec*>, LPTR=>params
|
||||
*
|
||||
DB $FF ; Terminator
|
||||
|
||||
@ -855,7 +858,7 @@ FSCTYPE JSR LPTRtoXY
|
||||
BEQ :SYNTAX ; No filename
|
||||
PLY
|
||||
PLX
|
||||
LDA #$FF
|
||||
LDA #$40 ; Open for input
|
||||
JSR FINDHND ; Try to open file
|
||||
CMP #$00 ; Was file opened?
|
||||
BEQ :NOTFOUND
|
||||
@ -885,6 +888,36 @@ FSCTYPE JSR LPTRtoXY
|
||||
BRK
|
||||
|
||||
|
||||
* Handle *SPOOL command
|
||||
* LPTR=>parameters string
|
||||
*
|
||||
FSCSPOOL JSR LPTRtoXY
|
||||
PHX
|
||||
PHY
|
||||
JSR XYtoLPTR
|
||||
JSR PARSLPTR ; Just for error handling
|
||||
BEQ :CLOSE ; No filename - stop spooling
|
||||
PLY
|
||||
PLX
|
||||
LDA FXSPOOL
|
||||
BNE :NOTTWICE
|
||||
LDA #$80 ; Open for writing
|
||||
JSR FINDHND ; Try to open file
|
||||
STA FXSPOOL ; Store SPOOL file handle
|
||||
RTS
|
||||
:CLOSE LDY FXSPOOL
|
||||
CPY #$00
|
||||
BEQ :DONE
|
||||
LDA #$00
|
||||
JSR FINDHND ; Close file
|
||||
STZ FXSPOOL
|
||||
:DONE RTS
|
||||
:NOTTWICE BRK
|
||||
DB $D6
|
||||
ASC 'Already spooling'
|
||||
BRK
|
||||
|
||||
|
||||
* Handle *EXEC command
|
||||
* LPTR=>parameters string
|
||||
*
|
||||
@ -896,7 +929,7 @@ FSCEXEC JSR LPTRtoXY
|
||||
BEQ :SYNTAX ; No filename
|
||||
PLY
|
||||
PLX
|
||||
LDA #$FF
|
||||
LDA #$40 ; Open for input
|
||||
JSR FINDHND ; Try to open file
|
||||
CMP #$00 ; Was file opened?
|
||||
BEQ :NOTFOUND
|
||||
|
Loading…
Reference in New Issue
Block a user