Fixed #131: Pascal compilation to/from disk file.

This commit is contained in:
Bobbi Webber-Manners 2022-09-17 15:19:55 -04:00
parent 914ba2d4ba
commit 58bd4f2167
2 changed files with 13 additions and 0 deletions

Binary file not shown.

View File

@ -78,6 +78,7 @@ PREPATH LDX MOSFILE ; Length
:APPEND JSR APFXMF ; Append MOSFILE->PREFIX
JSR PFXtoMF ; Copy back to MOSFILE
:EXIT JSR DIGCONV ; Handle initial digits
JSR USCONV ; Handle any underscores
CLC
RTS
:ERR LDA #$40 ; $40=Bad filename
@ -158,6 +159,18 @@ APFXMF LDY PREFIX ; Length of PREFIX
:DONE STY PREFIX ; Update length PREFIX
RTS
* Scan pathname in MOSFILE converting '_' to '.'
USCONV LDX MOSFILE ; Length
BEQ :EXIT ; Nothing to replace
:L1 LDA MOSFILE,X
CMP #'_'
BNE :S1
LDA #'.'
STA MOSFILE,X
:S1 DEX
BNE :L1
:EXIT RTS
* Scan pathname in MOSFILE converting files/dirs
* starting with digit by adding 'N' before.
DIGCONV LDY #$01 ; First char