mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-29 17:50:18 +00:00
Kernel version 0.8 : TYPE command removed from SHELL
This commit is contained in:
parent
2e3705aa63
commit
105617950d
@ -430,77 +430,6 @@ Cmd.Exec.ECHO.SYN
|
||||
Cmd.Exec.ECHO.RTS
|
||||
rts
|
||||
*--------------------------------------
|
||||
Cmd.Exec.TYPE lda ARGS
|
||||
beq Cmd.Exec.ECHO.SYN
|
||||
>LDYA L.ARGS
|
||||
>SYSCALL GetFullPathYA
|
||||
bcs Cmd.Exec.ECHO.RTS
|
||||
|
||||
>STYA ZPPTR1
|
||||
stx hFullPath
|
||||
|
||||
>PUSHWI 0 Aux type
|
||||
>PUSHBI 4 S.FILEINFO.TYPE.TXT
|
||||
>PUSHBI SYS.FOPEN.R
|
||||
>PUSHW ZPPTR1
|
||||
>SYSCALL LoadFile
|
||||
bcs .98
|
||||
stx hTextFile
|
||||
|
||||
eor #$ff
|
||||
sta ZPPTR2+1
|
||||
tya
|
||||
eor #$ff
|
||||
sta ZPPTR2 store file !len
|
||||
|
||||
txa
|
||||
>SYSCALL GetMemPtrA
|
||||
|
||||
>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
|
||||
bcs .97
|
||||
|
||||
lda (ZPPTR1) get last char in A
|
||||
|
||||
inc ZPPTR1
|
||||
bne .1
|
||||
inc ZPPTR1+1
|
||||
bra .1
|
||||
|
||||
.8 cmp #13 is last char printed a CR ?
|
||||
beq .81
|
||||
lda #13
|
||||
>SYSCALL COutA no, add one
|
||||
bcs .97
|
||||
|
||||
.81 jsr .97 cleanup...
|
||||
|
||||
clc
|
||||
rts
|
||||
|
||||
.97 pha
|
||||
lda hTextFile
|
||||
>SYSCALL FreeMemA
|
||||
pla
|
||||
|
||||
.98 pha
|
||||
lda hFullPath
|
||||
>SYSCALL FreeMemA
|
||||
pla
|
||||
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
Cmd.Exec.READ
|
||||
clc
|
||||
rts
|
||||
|
@ -63,7 +63,6 @@ J.INTCMDS .DA Cmd.Exec.CD
|
||||
.DA Cmd.Exec.SET
|
||||
.DA Cmd.Exec.STARTPROC
|
||||
.DA Cmd.Exec.TIME
|
||||
.DA Cmd.Exec.TYPE
|
||||
L.ERR.Codes .DA ERR.Codes
|
||||
L.ERR.Messages .DA ERR.Messages
|
||||
.DA 0
|
||||
@ -453,7 +452,6 @@ CMDS >PSTR "CD"
|
||||
>PSTR "SET"
|
||||
>PSTR "STARTPROC"
|
||||
>PSTR "TIME"
|
||||
>PSTR "TYPE"
|
||||
.HS 00
|
||||
*--------------------------------------
|
||||
MSG.GREETINGS >CSTR "\nA2osX-Shell on Dev=%h\n\n"
|
||||
|
Loading…
Reference in New Issue
Block a user