mirror of
https://github.com/A2osX/A2osX.git
synced 2024-06-26 09:29:30 +00:00
Kernel version 0.8 : CP,MV and Error Codes...work in progress
This commit is contained in:
parent
2bc7a49825
commit
0a08b4c0b7
BIN
A2OSX.BOOT.po
BIN
A2OSX.BOOT.po
Binary file not shown.
BIN
A2OSX.SRC.po
BIN
A2OSX.SRC.po
Binary file not shown.
11
BIN/CP.S.txt
11
BIN/CP.S.txt
|
@ -11,6 +11,8 @@ AUTO 6
|
||||||
.INB /A2OSX.DEV/INC/MACROS.I
|
.INB /A2OSX.DEV/INC/MACROS.I
|
||||||
.INB /A2OSX.DEV/INC/A2OSX.I
|
.INB /A2OSX.DEV/INC/A2OSX.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
X.MAX.RECURSE .EQ 8
|
||||||
|
X.DST.BASE.PATH .EQ 1
|
||||||
X.DELETE.SOURCE .EQ 0
|
X.DELETE.SOURCE .EQ 0
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB BIN/X.CPMV.S
|
.INB BIN/X.CPMV.S
|
||||||
|
@ -35,10 +37,11 @@ ArgCount .BS 1
|
||||||
.OR 0
|
.OR 0
|
||||||
DS.START
|
DS.START
|
||||||
Index .BS 1
|
Index .BS 1
|
||||||
hDIRs .BS MAX.RECURSE
|
hDIRs .BS X.MAX.RECURSE
|
||||||
hDIRENTs .BS MAX.RECURSE
|
hDIRENTs .BS X.MAX.RECURSE
|
||||||
oDIRENTs .BS MAX.RECURSE*2
|
oDIRENTs .BS X.MAX.RECURSE*2
|
||||||
hBasePath .BS 1
|
hSrcBasePath .BS 1
|
||||||
|
hDstBasePath .BS 1
|
||||||
hFilter .BS 1
|
hFilter .BS 1
|
||||||
bCANCEL .BS 1
|
bCANCEL .BS 1
|
||||||
bSTOP .BS 1
|
bSTOP .BS 1
|
||||||
|
|
15
BIN/LS.S.txt
15
BIN/LS.S.txt
|
@ -11,8 +11,11 @@ AUTO 6
|
||||||
.INB /A2OSX.DEV/INC/MACROS.I
|
.INB /A2OSX.DEV/INC/MACROS.I
|
||||||
.INB /A2OSX.DEV/INC/A2OSX.I
|
.INB /A2OSX.DEV/INC/A2OSX.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
X.MAX.RECURSE .EQ 8
|
||||||
|
X.DST.BASE.PATH .EQ 0
|
||||||
|
X.DELETE.SOURCE .EQ 0
|
||||||
|
*--------------------------------------
|
||||||
MAX.COL .EQ 4
|
MAX.COL .EQ 4
|
||||||
MAX.RECURSE .EQ 8
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
ZPPtr1 .EQ ZPBIN
|
ZPPtr1 .EQ ZPBIN
|
||||||
ZPPtr2 .EQ ZPBIN+2
|
ZPPtr2 .EQ ZPBIN+2
|
||||||
|
@ -365,7 +368,7 @@ CS.RUN.NewLine.8
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN.ENTER.MSG
|
CS.RUN.ENTER.MSG
|
||||||
ldy #hBasePath
|
ldy #hSrcBasePath
|
||||||
lda (pData),y
|
lda (pData),y
|
||||||
>SYSCALL GetMemPtrA
|
>SYSCALL GetMemPtrA
|
||||||
>PUSHYA
|
>PUSHYA
|
||||||
|
@ -489,10 +492,10 @@ ArgCount .BS 1
|
||||||
.OR 0
|
.OR 0
|
||||||
DS.START
|
DS.START
|
||||||
Index .BS 1
|
Index .BS 1
|
||||||
hDIRs .BS MAX.RECURSE
|
hDIRs .BS X.MAX.RECURSE
|
||||||
hDIRENTs .BS MAX.RECURSE
|
hDIRENTs .BS X.MAX.RECURSE
|
||||||
oDIRENTs .BS MAX.RECURSE*2
|
oDIRENTs .BS X.MAX.RECURSE*2
|
||||||
hBasePath .BS 1
|
hSrcBasePath .BS 1
|
||||||
hFilter .BS 1
|
hFilter .BS 1
|
||||||
bSTOP .BS 1
|
bSTOP .BS 1
|
||||||
bCANCEL .BS 1
|
bCANCEL .BS 1
|
||||||
|
|
11
BIN/MV.S.txt
11
BIN/MV.S.txt
|
@ -11,6 +11,8 @@ AUTO 6
|
||||||
.INB /A2OSX.DEV/INC/MACROS.I
|
.INB /A2OSX.DEV/INC/MACROS.I
|
||||||
.INB /A2OSX.DEV/INC/A2OSX.I
|
.INB /A2OSX.DEV/INC/A2OSX.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
X.MAX.RECURSE .EQ 8
|
||||||
|
X.DST.BASE.PATH .EQ 1
|
||||||
X.DELETE.SOURCE .EQ 1
|
X.DELETE.SOURCE .EQ 1
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB BIN/X.CPMV.S
|
.INB BIN/X.CPMV.S
|
||||||
|
@ -35,10 +37,11 @@ ArgCount .BS 1
|
||||||
.OR 0
|
.OR 0
|
||||||
DS.START
|
DS.START
|
||||||
Index .BS 1
|
Index .BS 1
|
||||||
hDIRs .BS MAX.RECURSE
|
hDIRs .BS X.MAX.RECURSE
|
||||||
hDIRENTs .BS MAX.RECURSE
|
hDIRENTs .BS X.MAX.RECURSE
|
||||||
oDIRENTs .BS MAX.RECURSE*2
|
oDIRENTs .BS X.MAX.RECURSE*2
|
||||||
hBasePath .BS 1
|
hSrcBasePath .BS 1
|
||||||
|
hDstBasePath .BS 1
|
||||||
hFilter .BS 1
|
hFilter .BS 1
|
||||||
bCANCEL .BS 1
|
bCANCEL .BS 1
|
||||||
bSTOP .BS 1
|
bSTOP .BS 1
|
||||||
|
|
18
BIN/RM.S.txt
18
BIN/RM.S.txt
|
@ -11,7 +11,9 @@ AUTO 6
|
||||||
.INB /A2OSX.DEV/INC/MACROS.I
|
.INB /A2OSX.DEV/INC/MACROS.I
|
||||||
.INB /A2OSX.DEV/INC/A2OSX.I
|
.INB /A2OSX.DEV/INC/A2OSX.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MAX.RECURSE .EQ 8
|
X.MAX.RECURSE .EQ 8
|
||||||
|
X.DST.BASE.PATH .EQ 0
|
||||||
|
X.DELETE.SOURCE .EQ 0
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
ZPPtr1 .EQ ZPBIN
|
ZPPtr1 .EQ ZPBIN
|
||||||
ZPPtr2 .EQ ZPBIN+2
|
ZPPtr2 .EQ ZPBIN+2
|
||||||
|
@ -146,7 +148,7 @@ CS.RUN ldy #bCANCEL
|
||||||
lda (pData),y
|
lda (pData),y
|
||||||
bpl .8
|
bpl .8
|
||||||
|
|
||||||
ldy #hBasePath
|
ldy #hSrcBasePath
|
||||||
lda (pData),y
|
lda (pData),y
|
||||||
>SYSCALL GetMemPtrA
|
>SYSCALL GetMemPtrA
|
||||||
>PUSHYA
|
>PUSHYA
|
||||||
|
@ -210,7 +212,7 @@ CS.RUN.FILE jsr CS.RUN.PRINT.FILE
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN.PRINT.FILE
|
CS.RUN.PRINT.FILE
|
||||||
>PUSHW ZPPtr1
|
>PUSHW ZPPtr1
|
||||||
ldy #hBasePath
|
ldy #hSrcBasePath
|
||||||
lda (pData),y
|
lda (pData),y
|
||||||
>SYSCALL GetMemPtrA
|
>SYSCALL GetMemPtrA
|
||||||
>PUSHYA
|
>PUSHYA
|
||||||
|
@ -234,7 +236,7 @@ CS.RUN.DELETE >LDYAI UsrBuf256
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN.GET.BASE.PATH
|
CS.RUN.GET.BASE.PATH
|
||||||
ldy #hBasePath
|
ldy #hSrcBasePath
|
||||||
lda (pData),y
|
lda (pData),y
|
||||||
>SYSCALL GetMemPtrA
|
>SYSCALL GetMemPtrA
|
||||||
>PUSHYA
|
>PUSHYA
|
||||||
|
@ -334,10 +336,10 @@ ArgCount .BS 1
|
||||||
.OR 0
|
.OR 0
|
||||||
DS.START
|
DS.START
|
||||||
Index .BS 1
|
Index .BS 1
|
||||||
hDIRs .BS MAX.RECURSE
|
hDIRs .BS X.MAX.RECURSE
|
||||||
hDIRENTs .BS MAX.RECURSE
|
hDIRENTs .BS X.MAX.RECURSE
|
||||||
oDIRENTs .BS MAX.RECURSE*2
|
oDIRENTs .BS X.MAX.RECURSE*2
|
||||||
hBasePath .BS 1
|
hSrcBasePath .BS 1
|
||||||
hFilter .BS 1
|
hFilter .BS 1
|
||||||
bCANCEL .BS 1
|
bCANCEL .BS 1
|
||||||
bSTOP .BS 1
|
bSTOP .BS 1
|
||||||
|
|
|
@ -5,8 +5,6 @@ INC 1
|
||||||
AUTO 6
|
AUTO 6
|
||||||
.LIST OFF
|
.LIST OFF
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MAX.RECURSE .EQ 8
|
|
||||||
*--------------------------------------
|
|
||||||
ZPPtr1 .EQ ZPBIN
|
ZPPtr1 .EQ ZPBIN
|
||||||
ZPPtr2 .EQ ZPBIN+2
|
ZPPtr2 .EQ ZPBIN+2
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -42,7 +40,7 @@ CS.INIT >SYSCALL GetArgC
|
||||||
beq .99
|
beq .99
|
||||||
|
|
||||||
.1 dec ArgCount
|
.1 dec ArgCount
|
||||||
beq .5
|
beq .7
|
||||||
|
|
||||||
lda ArgCount
|
lda ArgCount
|
||||||
>SYSCALL GetArgA
|
>SYSCALL GetArgA
|
||||||
|
@ -76,15 +74,37 @@ CS.INIT >SYSCALL GetArgC
|
||||||
sta (pData),y
|
sta (pData),y
|
||||||
bra .1
|
bra .1
|
||||||
|
|
||||||
.4 >LDYA ZPPtr1
|
.4 ldy #index
|
||||||
jsr InitSrcDirYA
|
|
||||||
bcs .9
|
|
||||||
|
|
||||||
bra .1 scan for any other args
|
|
||||||
|
|
||||||
.5 ldy #index
|
|
||||||
lda (pData),y
|
lda (pData),y
|
||||||
beq .99
|
bne .5 Already have a Src dir...
|
||||||
|
|
||||||
|
>LDYA ZPPtr1
|
||||||
|
jsr InitSrcDirYA
|
||||||
|
bcc .1 success, scan for any other args
|
||||||
|
rts
|
||||||
|
|
||||||
|
.5 ldy #hDstBasePath
|
||||||
|
lda (pData),y
|
||||||
|
bne .99 we already have a second arg....error!
|
||||||
|
|
||||||
|
>LDYA ZPPtr1
|
||||||
|
jsr InitDstDirYA
|
||||||
|
bcc .1 success, scan for any other args
|
||||||
|
rts
|
||||||
|
|
||||||
|
.7 ldy #index processed all args
|
||||||
|
lda (pData),y
|
||||||
|
beq .99 , no src ? ERROR
|
||||||
|
|
||||||
|
ldy #hDstBasePath
|
||||||
|
lda (pData),y
|
||||||
|
bne .8 we also have a Dst folder
|
||||||
|
|
||||||
|
ldy #S.PS.hPREFIX no dst folder, use actual prefix
|
||||||
|
lda (pPs),y
|
||||||
|
>SYSCALL GetMemPtrA
|
||||||
|
jsr InitDstDirYA
|
||||||
|
bcs .99
|
||||||
|
|
||||||
.8 lda (pPs)
|
.8 lda (pPs)
|
||||||
ora #S.PS.F.EVENT Now accept events
|
ora #S.PS.F.EVENT Now accept events
|
||||||
|
@ -140,8 +160,7 @@ CS.RUN ldy #bCANCEL
|
||||||
lda (pData),y
|
lda (pData),y
|
||||||
bpl .8
|
bpl .8
|
||||||
|
|
||||||
|
ldy #hSrcBasePath
|
||||||
ldy #hBasePath
|
|
||||||
lda (pData),y
|
lda (pData),y
|
||||||
>SYSCALL GetMemPtrA
|
>SYSCALL GetMemPtrA
|
||||||
>PUSHYA
|
>PUSHYA
|
||||||
|
@ -204,8 +223,14 @@ CS.RUN.FILE jsr CS.RUN.PRINT.FILE
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN.PRINT.FILE
|
CS.RUN.PRINT.FILE
|
||||||
|
ldy #hDstBasePath
|
||||||
|
lda (pData),y
|
||||||
|
>SYSCALL GetMemPtrA
|
||||||
|
>PUSHYA
|
||||||
|
|
||||||
>PUSHW ZPPtr1
|
>PUSHW ZPPtr1
|
||||||
ldy #hBasePath
|
|
||||||
|
ldy #hSrcBasePath
|
||||||
lda (pData),y
|
lda (pData),y
|
||||||
>SYSCALL GetMemPtrA
|
>SYSCALL GetMemPtrA
|
||||||
>PUSHYA
|
>PUSHYA
|
||||||
|
@ -225,11 +250,12 @@ CS.RUN.DELETE.FILE
|
||||||
>SYSCALL PStrCat
|
>SYSCALL PStrCat
|
||||||
|
|
||||||
CS.RUN.DELETE >LDYAI UsrBuf256
|
CS.RUN.DELETE >LDYAI UsrBuf256
|
||||||
>SYSCALL RemoveYA
|
* >SYSCALL RemoveYA
|
||||||
|
clc
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN.GET.BASE.PATH
|
CS.RUN.GET.BASE.PATH
|
||||||
ldy #hBasePath
|
ldy #hSrcBasePath
|
||||||
lda (pData),y
|
lda (pData),y
|
||||||
>SYSCALL GetMemPtrA
|
>SYSCALL GetMemPtrA
|
||||||
>PUSHYA
|
>PUSHYA
|
||||||
|
@ -311,3 +337,5 @@ CS.QUIT jsr LeaveSubDir
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MAN
|
MAN
|
||||||
SAVE BIN/X.CPMV.S
|
SAVE BIN/X.CPMV.S
|
||||||
|
LOAD BIN/CP.S
|
||||||
|
ASM
|
||||||
|
|
|
@ -6,9 +6,50 @@ AUTO 6
|
||||||
.LIST OFF
|
.LIST OFF
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* Uses: (pData)
|
* Uses: (pData)
|
||||||
* hDIRs .BS MAX.RECURSE+1
|
* hDIRs .BS X.MAX.RECURSE+1
|
||||||
* hDIRENTs .BS MAX.RECURSE+1
|
* hDIRENTs .BS X.MAX.RECURSE+1
|
||||||
* hBasePath .BS 1
|
* hSrcBasePath .BS 1
|
||||||
|
* hDstBasePath .BS 1 (optional)
|
||||||
|
*--------------------------------------
|
||||||
|
.DO X.DST.BASE.PATH=1
|
||||||
|
InitDstDirYA >SYSCALL GetFullPathYA
|
||||||
|
bcs .99
|
||||||
|
|
||||||
|
stx .90+1
|
||||||
|
>STYA ZPPtr1
|
||||||
|
|
||||||
|
.5 >PUSHWI 256
|
||||||
|
>PUSHBI 0
|
||||||
|
>SYSCALL GetMem Get a 256 buffer to store DstBasePath
|
||||||
|
bcs .9
|
||||||
|
|
||||||
|
>STYA ZPPtr2
|
||||||
|
txa
|
||||||
|
ldy #hDstBasePath
|
||||||
|
sta (pData),y
|
||||||
|
|
||||||
|
lda (ZPPtr1)
|
||||||
|
sta (ZPPtr2)
|
||||||
|
tay
|
||||||
|
|
||||||
|
.6 lda (ZPPtr1),y
|
||||||
|
sta (ZPPtr2),y
|
||||||
|
dey
|
||||||
|
bne .6
|
||||||
|
|
||||||
|
jsr .9 Cleanup
|
||||||
|
|
||||||
|
clc
|
||||||
|
.99 rts
|
||||||
|
|
||||||
|
.9 pha
|
||||||
|
.90 lda #$ff self modified
|
||||||
|
>SYSCALL FreeMemA
|
||||||
|
pla
|
||||||
|
sec
|
||||||
|
rts
|
||||||
|
|
||||||
|
.FIN
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
InitSrcDirPatYA ldx #$80
|
InitSrcDirPatYA ldx #$80
|
||||||
.HS 2C bit abs
|
.HS 2C bit abs
|
||||||
|
@ -80,7 +121,7 @@ InitSrcDirYA ldx #0
|
||||||
|
|
||||||
>STYA ZPPtr2
|
>STYA ZPPtr2
|
||||||
txa
|
txa
|
||||||
ldy #hBasePath
|
ldy #hSrcBasePath
|
||||||
sta (pData),y
|
sta (pData),y
|
||||||
|
|
||||||
lda (ZPPtr1)
|
lda (ZPPtr1)
|
||||||
|
@ -229,10 +270,10 @@ EnterSubDirYA >STYA ZPPtr2 save SUBDIR for StrCat
|
||||||
|
|
||||||
ldy #index
|
ldy #index
|
||||||
lda (pData),y
|
lda (pData),y
|
||||||
cmp #MAX.RECURSE
|
cmp #X.MAX.RECURSE
|
||||||
beq .9
|
beq .9
|
||||||
|
|
||||||
ldy #hBasePath
|
ldy #hSrcBasePath
|
||||||
lda (pData),y
|
lda (pData),y
|
||||||
>SYSCALL GetMemPtrA
|
>SYSCALL GetMemPtrA
|
||||||
|
|
||||||
|
@ -293,7 +334,7 @@ LeaveSubDir ldy #index
|
||||||
sta (pData),y
|
sta (pData),y
|
||||||
bne .8
|
bne .8
|
||||||
|
|
||||||
ldy #hBasePath
|
ldy #hSrcBasePath
|
||||||
lda (pData),y
|
lda (pData),y
|
||||||
>SYSCALL FreeMemA
|
>SYSCALL FreeMemA
|
||||||
.9 sec
|
.9 sec
|
||||||
|
@ -302,7 +343,7 @@ LeaveSubDir ldy #index
|
||||||
.8 clc
|
.8 clc
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
BasePath.. ldy #hBasePath
|
BasePath.. ldy #hSrcBasePath
|
||||||
lda (pData),y
|
lda (pData),y
|
||||||
>SYSCALL GetMemPtrA
|
>SYSCALL GetMemPtrA
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,12 @@ Cmd.ExecYA.1 >SYSCALL ExpandPStrYA
|
||||||
dey
|
dey
|
||||||
bne .2
|
bne .2
|
||||||
|
|
||||||
jmp (J.INTCMDS,x) Found an internal Cmd...
|
jsr .5 Found an internal Cmd...
|
||||||
|
bcs .31
|
||||||
|
lda #0
|
||||||
|
.31 ldy #S.PS.RC
|
||||||
|
sta (pPS),y
|
||||||
|
rts
|
||||||
|
|
||||||
.4 inx
|
.4 inx
|
||||||
inx
|
inx
|
||||||
|
@ -81,6 +86,9 @@ Cmd.ExecYA.1 >SYSCALL ExpandPStrYA
|
||||||
bcc .1
|
bcc .1
|
||||||
inc ZPPtr2+1
|
inc ZPPtr2+1
|
||||||
bra .1
|
bra .1
|
||||||
|
|
||||||
|
.5 jmp (J.INTCMDS,x)
|
||||||
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
Cmd.Exec.EXT ldy #1
|
Cmd.Exec.EXT ldy #1
|
||||||
lda CMD,y
|
lda CMD,y
|
||||||
|
|
|
@ -110,7 +110,13 @@ CS.RUN lda #0
|
||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.10 ldy #hInputFile batch mode ?
|
.10 ldy #S.PS.RC
|
||||||
|
lda (pPs),y
|
||||||
|
beq .12
|
||||||
|
|
||||||
|
jsr ERR.Print
|
||||||
|
|
||||||
|
.12 ldy #hInputFile batch mode ?
|
||||||
lda (pData),y
|
lda (pData),y
|
||||||
bne .2
|
bne .2
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user