mirror of
https://github.com/bobbimanners/Applecorn.git
synced 2024-05-28 09:41:35 +00:00
Fixed PREPATH so '.' works like '@'.
This commit is contained in:
parent
f3a742aed1
commit
e54197dc21
BIN
applecorn.po
BIN
applecorn.po
Binary file not shown.
|
@ -47,12 +47,12 @@ IOBUF3 EQU $1800
|
|||
IOBUF4 EQU $1C00
|
||||
|
||||
* 512 byte buffer sufficient for one disk block
|
||||
BLKBUF EQU $5000 ; Can't use $400 as ProDOS uses
|
||||
BLKBUFEND EQU $5200 ; 'hidden' bytes within screen
|
||||
BLKBUF EQU $6000 ; Can't use $400 as ProDOS uses
|
||||
BLKBUFEND EQU $6200 ; 'hidden' bytes within screen
|
||||
|
||||
* 512 byte buffer for file copy (*COPY)
|
||||
COPYBUF EQU $5200 ; File copy needs separate buffer
|
||||
*COPYBUFEND EQU $5400
|
||||
COPYBUF EQU $6200 ; File copy needs separate buffer
|
||||
*COPYBUFEND EQU $6400
|
||||
|
||||
* Address in aux memory where ROM will be loaded
|
||||
AUXADDR EQU $8000
|
||||
|
|
|
@ -10,13 +10,15 @@
|
|||
* 3) '..' or '^' for parent directory
|
||||
* Carry set on error, clear otherwise
|
||||
PREPATH LDX MOSFILE ; Length
|
||||
BEQ :EXIT ; If zero length
|
||||
LDA MOSFILE+1 ; 1st char of pathname
|
||||
BNE :S1
|
||||
JMP :EXIT ; If zero length
|
||||
:S1 LDA MOSFILE+1 ; 1st char of pathname
|
||||
CMP #':'
|
||||
BNE :NOTCOLN ; Not colon
|
||||
CPX #$03 ; Length >= 3?
|
||||
BCC :ERR ; If not
|
||||
LDA MOSFILE+3 ; Drive
|
||||
BCS :S2
|
||||
JMP :ERR ; If not
|
||||
:S2 LDA MOSFILE+3 ; Drive
|
||||
SEC
|
||||
SBC #'1'
|
||||
TAX
|
||||
|
@ -47,10 +49,16 @@ PREPATH LDX MOSFILE ; Length
|
|||
CMP #'.' ; ...
|
||||
BEQ :UPDIR1
|
||||
BRA :APPEND
|
||||
:UPDIR1 LDA MOSFILE+2
|
||||
:UPDIR1 LDA MOSFILE ; Length
|
||||
CMP #$01
|
||||
BEQ :CWD ; '.' on its own
|
||||
LDA MOSFILE+2
|
||||
CMP #'.' ; '..'
|
||||
BNE :EXIT
|
||||
JSR DEL1CHAR ; Delete first char of MOSFILE
|
||||
BEQ :DOTDOT
|
||||
CMP #'/' ; './'
|
||||
BEQ :CWD
|
||||
BRA :ERR
|
||||
:DOTDOT JSR DEL1CHAR ; Delete first char of MOSFILE
|
||||
:CARET JSR PARENT ; Parent dir -> PREFIX
|
||||
:CWD JSR DEL1CHAR ; Delete first char of MOSFILE
|
||||
LDA MOSFILE ; Is there more?
|
||||
|
|
Loading…
Reference in New Issue
Block a user