mirror of
https://github.com/A2osX/A2osX.git
synced 2024-08-14 13:29:02 +00:00
BUGFIX #5 : TYPE not expanding to full path properly
This commit is contained in:
parent
89612444b8
commit
2e1283ddd2
BIN
A2OSX.BOOT.po
BIN
A2OSX.BOOT.po
Binary file not shown.
BIN
A2OSX.SRC.po
BIN
A2OSX.SRC.po
Binary file not shown.
@ -421,53 +421,89 @@ Cmd.Exec.TIME clc
|
|||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
Cmd.Exec.ECHO lda ARGS
|
Cmd.Exec.ECHO lda ARGS
|
||||||
beq .9
|
beq Cmd.Exec.ECHO.SYN
|
||||||
>PUSHW L.ARGS
|
>PUSHW L.ARGS
|
||||||
>LDYA L.MSG.PSTR
|
>LDYA L.MSG.PSTR
|
||||||
>SYSCALL PrintFYA
|
>SYSCALL PrintFYA
|
||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.9 lda #SYSMGR.ERRSYN
|
Cmd.Exec.ECHO.SYN
|
||||||
|
lda #SYSMGR.ERRSYN
|
||||||
sec
|
sec
|
||||||
|
Cmd.Exec.ECHO.RTS
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
Cmd.Exec.TYPE lda ARGS
|
Cmd.Exec.TYPE lda ARGS
|
||||||
beq .98
|
beq Cmd.Exec.ECHO.SYN
|
||||||
|
>LDYA L.ARGS
|
||||||
|
>SYSCALL GetFullPathYA
|
||||||
|
bcs Cmd.Exec.ECHO.RTS
|
||||||
|
|
||||||
|
>STYA ZPPTR1
|
||||||
|
stx hFullPath
|
||||||
|
|
||||||
>PUSHWI 0 Aux type
|
>PUSHWI 0 Aux type
|
||||||
>PUSHBI 4 S.FILEINFO.TYPE.TXT
|
>PUSHBI 4 S.FILEINFO.TYPE.TXT
|
||||||
>PUSHBI SYS.FOPEN.R
|
>PUSHBI SYS.FOPEN.R
|
||||||
>PUSHW L.ARGS
|
>PUSHW ZPPTR1
|
||||||
>SYSCALL LoadFile
|
>SYSCALL LoadFile
|
||||||
bcs .99
|
bcs .98
|
||||||
|
stx hTextFile
|
||||||
|
|
||||||
|
eor #$ff
|
||||||
|
sta ZPPTR2+1
|
||||||
|
tya
|
||||||
|
eor #$ff
|
||||||
|
sta ZPPTR2 store file !len
|
||||||
|
|
||||||
>STYA ZPPTR2 store file len
|
|
||||||
phx
|
|
||||||
txa
|
txa
|
||||||
>SYSCALL GetMemPtrA
|
>SYSCALL GetMemPtrA
|
||||||
>STYA ZPPTR1
|
|
||||||
.1 lda ZPPTR2
|
|
||||||
bne .2
|
|
||||||
lda ZPPTR2+1
|
|
||||||
beq .3
|
|
||||||
dec ZPPTR2+1
|
|
||||||
.2 dec ZPPTR2
|
|
||||||
|
|
||||||
lda (ZPPTR1)
|
>STYA ZPPTR1
|
||||||
|
|
||||||
|
ldy #0
|
||||||
|
lda #13 if len=0, exit print CR
|
||||||
|
|
||||||
|
.1 inc ZPPTR2
|
||||||
|
bne .2
|
||||||
|
inc ZPPTR2+1
|
||||||
|
beq .8
|
||||||
|
|
||||||
|
.2 lda (ZPPTR1)
|
||||||
>SYSCALL COutA
|
>SYSCALL COutA
|
||||||
|
bcs .97
|
||||||
|
|
||||||
|
lda (ZPPTR1) get last char in A
|
||||||
|
|
||||||
inc ZPPTR1
|
inc ZPPTR1
|
||||||
bne .1
|
bne .1
|
||||||
inc ZPPTR1+1
|
inc ZPPTR1+1
|
||||||
bra .1
|
bra .1
|
||||||
|
|
||||||
.3 pla
|
.8 cmp #13 is last char printed a CR ?
|
||||||
>SYSCALL FreeMemA
|
beq .81
|
||||||
|
lda #13
|
||||||
|
>SYSCALL COutA no, add one
|
||||||
|
bcs .97
|
||||||
|
|
||||||
|
.81 jsr .97 cleanup...
|
||||||
|
|
||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.98 lda #SYSMGR.ERRSYN
|
.97 pha
|
||||||
|
lda hTextFile
|
||||||
|
>SYSCALL FreeMemA
|
||||||
|
pla
|
||||||
|
|
||||||
|
.98 pha
|
||||||
|
lda hFullPath
|
||||||
|
>SYSCALL FreeMemA
|
||||||
|
pla
|
||||||
|
|
||||||
sec
|
sec
|
||||||
.99 rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
Cmd.Exec.READ
|
Cmd.Exec.READ
|
||||||
clc
|
clc
|
||||||
|
@ -454,6 +454,8 @@ STAT .BS S.STAT
|
|||||||
hNEWPATH .BS 1
|
hNEWPATH .BS 1
|
||||||
hCmdLine .BS 1
|
hCmdLine .BS 1
|
||||||
Cmd.Exec.Mode .BS 1
|
Cmd.Exec.Mode .BS 1
|
||||||
|
hFullPath .BS 1
|
||||||
|
hTextFile .BS 1
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.DUMMY
|
.DUMMY
|
||||||
.OR 0
|
.OR 0
|
||||||
|
Loading…
Reference in New Issue
Block a user