mirror of
https://github.com/A2osX/A2osX.git
synced 2025-02-26 08:29:46 +00:00
Kernel version 0.8 : added PWD alias in SHELL, modified LS to display DIR/ instead of /DIR
This commit is contained in:
parent
e5a43cdc22
commit
8b5d3696a3
BIN
A2OSX.BOOT.po
BIN
A2OSX.BOOT.po
Binary file not shown.
BIN
A2OSX.SRC.po
BIN
A2OSX.SRC.po
Binary file not shown.
19
BIN/LS.S.txt
19
BIN/LS.S.txt
@ -227,7 +227,20 @@ CS.RUN.DIR ldy #bLong
|
||||
>LDYA L.MSG.DIR
|
||||
>SYSCALL PrintFYA
|
||||
|
||||
ldy #ColCount
|
||||
lda #80/MAX.COL-3
|
||||
sec
|
||||
sbc (ZPPtr1)
|
||||
beq .2
|
||||
tax
|
||||
|
||||
.1 lda #' '
|
||||
phx
|
||||
>SYSCALL COutA
|
||||
plx
|
||||
dex
|
||||
bne .1
|
||||
|
||||
.2 ldy #ColCount
|
||||
lda (pData),y
|
||||
inc
|
||||
sta (pData),y
|
||||
@ -447,8 +460,8 @@ OptionList >PSTR "LR"
|
||||
OptionVars .DA #bLong,bRecurse
|
||||
*--------------------------------------
|
||||
MSG.DEV >CSTR "%15S S%d,D%d Blocks Used:%5D,Total:%5D\n"
|
||||
MSG.DIR >CSTR "/%18S"
|
||||
MSG.DIREXT >CSTR "/%15S <dir> %a %S %S\n"
|
||||
MSG.DIR >CSTR "%S/"
|
||||
MSG.DIREXT >CSTR "%16S <dir> %a %S %S\n"
|
||||
MSG.FILE >CSTR "%S.%S"
|
||||
MSG.FILEEXT >CSTR "%15S %S $%H %a %10u %S %S\n"
|
||||
*--------------------------------------
|
||||
|
@ -105,6 +105,17 @@ InitSrcDirYA >SYSCALL GetFullPathYA
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
GetNextEntry ldy #hDIRs
|
||||
lda (pData),y
|
||||
tay
|
||||
lda (pData),y
|
||||
|
||||
>SYSCALL READDIRA
|
||||
|
||||
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
EnterSubDirYA >STYA ZPPtr2 save SUBDIR for StrCat
|
||||
|
||||
ldy #hDIRs
|
||||
|
@ -186,7 +186,8 @@ Cmd.Exec.EXT.BIN
|
||||
*--------------------------------------
|
||||
Cmd.Exec.CD lda ARGS
|
||||
bne Cmd.Exec.CD1
|
||||
ldy #S.PS.hPREFIX
|
||||
|
||||
Cmd.Exec.PWD ldy #S.PS.hPREFIX
|
||||
lda (pPs),y
|
||||
>SYSCALL GetMemPtrA
|
||||
>PUSHYA
|
||||
|
@ -55,6 +55,7 @@ J.INTCMDS .DA Cmd.Exec.CD
|
||||
.DA Cmd.Exec.ECHO
|
||||
.DA Cmd.Exec.EXIT
|
||||
.DA Cmd.Exec.PAUSE
|
||||
.DA Cmd.Exec.PWD
|
||||
.DA Cmd.Exec.READ
|
||||
.DA Cmd.Exec.SET
|
||||
.DA Cmd.Exec.STARTPROC
|
||||
@ -428,6 +429,7 @@ CMDS >PSTR "CD"
|
||||
>PSTR "ECHO"
|
||||
>PSTR "EXIT"
|
||||
>PSTR "PAUSE"
|
||||
>PSTR "PWD"
|
||||
>PSTR "READ"
|
||||
>PSTR "SET"
|
||||
>PSTR "STARTPROC"
|
||||
|
@ -6,6 +6,7 @@ AUTO 6
|
||||
.LIST OFF
|
||||
*/--------------------------------------
|
||||
* #GetArgC
|
||||
* Returns argument count in the process command line.
|
||||
* ##In:
|
||||
* none.
|
||||
* ##Out:
|
||||
@ -28,7 +29,7 @@ K.GetArgC jsr ARG.InitArgPtr1
|
||||
*/--------------------------------------
|
||||
* #GetArgA
|
||||
* ##In:
|
||||
* none.
|
||||
* A = argument index.
|
||||
* ##Out:
|
||||
* CC : success
|
||||
* Y,A = PStr To Arg[A]
|
||||
|
@ -4,11 +4,16 @@ NEW
|
||||
INC 1
|
||||
AUTO 6
|
||||
.LIST OFF
|
||||
*--------------------------------------
|
||||
* PULLW PString to scan (ex: "192.168.1.5")
|
||||
* PULLW PString pattern (ex: "%d.%d.%d.%d")
|
||||
* PULLW PTR to target buffer
|
||||
*--------------------------------------
|
||||
*/--------------------------------------
|
||||
* #SScanF
|
||||
* Scan a PStr (in progress)
|
||||
* ##In:
|
||||
* PUSHW PTR to target buffer
|
||||
* PUSHW PString pattern (ex: "%d.%d.%d.%d")
|
||||
* %d : byte
|
||||
* PUSHW PString to scan (ex: "192.168.1.5")
|
||||
* ##Out:
|
||||
*\--------------------------------------
|
||||
K.SScanF jsr PullPtr1Ptr2Ptr3
|
||||
|
||||
ldy #0 Y = PTR in pattern
|
||||
@ -80,7 +85,6 @@ K.SScanF jsr PullPtr1Ptr2Ptr3
|
||||
|
||||
.9 sec
|
||||
rts
|
||||
|
||||
*--------------------------------------
|
||||
K.SScanF.IncPtr1 dex
|
||||
beq .1
|
||||
@ -97,7 +101,7 @@ K.SScanF.IsDigit cmp #'0'
|
||||
.1 sec
|
||||
rts
|
||||
*/--------------------------------------
|
||||
* #PrintFYA :
|
||||
* #PrintFYA
|
||||
* Prints C-Style String
|
||||
* ##In:
|
||||
* Y,A = PTR to CStr
|
||||
@ -129,6 +133,7 @@ K.SScanF.IsDigit cmp #'0'
|
||||
* %11s 'ABCDEFGH '
|
||||
* %011s 'ABCDEFGH000'
|
||||
* %2f '3.14'
|
||||
* ##Out:
|
||||
*\--------------------------------------
|
||||
K.PrintFYA >STYA ZPQuickPtr1
|
||||
|
||||
|
@ -22,16 +22,20 @@ MemMgr.ReqFlags .EQ ZPMEMMGR+10 store requested Flags
|
||||
* - mem.ID=0 always used! useful to test if hMem=0
|
||||
*--------------------------------------
|
||||
* PUBLIC
|
||||
*--------------------------------------
|
||||
* K.GetMem
|
||||
* In:
|
||||
* PULLB = FLAGS
|
||||
* PULLW = Size Requested
|
||||
* Out:
|
||||
*/--------------------------------------
|
||||
* #GetMem
|
||||
* ##In:
|
||||
* PUSHW = Size Requested
|
||||
* PUSHB = Options
|
||||
* S.MEM.F.INIT0 : init memory with 00
|
||||
* S.MEM.F.ALIGN : page aligned
|
||||
* ##Out:
|
||||
* CC : success
|
||||
* YA = PTR to Mem
|
||||
* X = S.MEM.ID
|
||||
* CS on err
|
||||
*--------------------------------------
|
||||
* X = hMem
|
||||
* CS :
|
||||
* A = EC
|
||||
*\--------------------------------------
|
||||
K.GetMem >PULLB MemMgr.ReqFlags store requested flags
|
||||
and #S.MEM.F.AUX
|
||||
beq .11
|
||||
@ -236,13 +240,14 @@ MemMgr.Init0 ldy #S.MEM.PTR
|
||||
bne .1
|
||||
|
||||
.8 rts
|
||||
*--------------------------------------
|
||||
* K.FreeMemA
|
||||
* In:
|
||||
*/--------------------------------------
|
||||
* #FreeMemA
|
||||
* ##In:
|
||||
* A = hMem To Free
|
||||
* Out:
|
||||
* X,Y unmodified
|
||||
*--------------------------------------
|
||||
* ##Out:
|
||||
* none.
|
||||
* (X,Y unmodified)
|
||||
*\--------------------------------------
|
||||
K.FreeMemA phy
|
||||
tay
|
||||
|
||||
@ -328,14 +333,14 @@ K.FreeMemA phy
|
||||
bra *
|
||||
*--------------------------------------
|
||||
K.FreeMemA.ERR >CSTR "***MemMgr:Attempt to Free an already freed hMem at $%H"
|
||||
*--------------------------------------
|
||||
* K.GetMemPtrA
|
||||
* In:
|
||||
* A = hMem
|
||||
* Out:
|
||||
* Y,A = PTR to MemBlock
|
||||
* X unmodified
|
||||
*--------------------------------------
|
||||
*/--------------------------------------
|
||||
* #GetMemPtrA
|
||||
* ##In:
|
||||
* A = hMem
|
||||
* ##Out:
|
||||
* Y,A = PTR to MemBlock
|
||||
* (X unmodified)
|
||||
*\--------------------------------------
|
||||
K.GetMemPtrA jsr K.GetMemByIDA
|
||||
ldy #S.MEM.PTR
|
||||
lda (ZPMemMgrSPtr),y
|
||||
@ -344,16 +349,17 @@ K.GetMemPtrA jsr K.GetMemByIDA
|
||||
lda (ZPMemMgrSPtr),y
|
||||
ply
|
||||
rts
|
||||
*--------------------------------------
|
||||
* K.GetMemByIDA
|
||||
* In:
|
||||
* A = hMem
|
||||
* Out:
|
||||
* Y,A = ZPMemMgrSPtr = PTR to S.MEM
|
||||
* X unmodified
|
||||
* *** Optimized for :
|
||||
* MemMgr.Table is page aligned at $1800
|
||||
* S.MEM is 8 bytes
|
||||
*/--------------------------------------
|
||||
* #GetMemByIDA
|
||||
* ##In:
|
||||
* A = hMem
|
||||
* ##Out:
|
||||
* Y,A = ZPMemMgrSPtr = PTR to S.MEM
|
||||
* X unmodified
|
||||
*\--------------------------------------
|
||||
* Optimized for :
|
||||
* MemMgr.Table is page aligned at $1800
|
||||
* S.MEM is 8 bytes
|
||||
*--------------------------------------
|
||||
.DO MemMgr.Table=$1800
|
||||
.ELSE
|
||||
|
Loading…
x
Reference in New Issue
Block a user