Kernel version 0.9 : CP/LS Migration in progress

This commit is contained in:
Rémy GIBERT 2017-02-21 18:01:30 +01:00
parent d0da32942b
commit 44b6d67670
12 changed files with 145 additions and 72 deletions

Binary file not shown.

BIN
A2OSX.BUILD.po Normal file

Binary file not shown.

Binary file not shown.

View File

@ -10,9 +10,10 @@ AUTO 6
*--------------------------------------
.INB /A2OSX.DEV/INC/MACROS.I
.INB /A2OSX.DEV/INC/A2OSX.I
.INB /A2OSX.DEV/INC/MLI.ERR.I
*--------------------------------------
X.MAX.RECURSE .EQ 8
X.DST.BASE.PATH .EQ 1
X.COPY.TO.DEST .EQ 1
X.DELETE.SOURCE .EQ 0
*--------------------------------------
.INB BIN/X.CPMV.S
@ -47,6 +48,8 @@ hFilter .BS 1
hSrcFile .BS 1
hDstFile .BS 1
bPause .BS 1
bCopy .BS 1
CopyRC .BS 1
bContinue .BS 1
bRecurse .BS 1
bNoConfirm .BS 1

View File

@ -12,7 +12,7 @@ AUTO 6
.INB /A2OSX.DEV/INC/A2OSX.I
*--------------------------------------
X.MAX.RECURSE .EQ 8
X.DST.BASE.PATH .EQ 0
X.COPY.TO.DEST .EQ 0
X.DELETE.SOURCE .EQ 0
*--------------------------------------
MAX.COL .EQ 4

View File

@ -10,6 +10,7 @@ AUTO 6
*--------------------------------------
.INB /A2OSX.DEV/INC/MACROS.I
.INB /A2OSX.DEV/INC/A2OSX.I
.INB /A2OSX.DEV/INC/MLI.ERR.I
*--------------------------------------
ZPPtr1 .EQ ZPBIN
*--------------------------------------
@ -40,11 +41,14 @@ L.MSG.READ.OK4 .DA MSG.READ.OK4
L.MSG.USAGE .DA MSG.USAGE
.DA 0
*--------------------------------------
CS.INIT >SYSCALL GetArgC
CS.INIT clc
rts
*--------------------------------------
CS.RUN >SYSCALL GetArgC
cmp #1
bne CS.INIT.SET
bne CS.RUN.SET
CS.INIT.READ jsr NSC.Init
CS.RUN.READ jsr NSC.Init
jsr NSC.Read
ldx #7
@ -58,7 +62,7 @@ CS.INIT.READ jsr NSC.Init
>LDYA L.MSG.READ.KO
>SYSCALL CPrintFYA
lda #DEVMGR.ERRNOHW
lda #MLI.ERR.NODEV
sec
rts
@ -71,7 +75,7 @@ CS.INIT.READ jsr NSC.Init
sec we do not want to stay in memory
rts
CS.INIT.SET lda #1
CS.RUN.SET lda #1
>SYSCALL GetArgA
>STYA ZPPtr1
@ -143,8 +147,9 @@ CS.INIT.SET lda #1
sec
rts
*--------------------------------------
CS.RUN
CS.DOEVENT
CS.DOEVENT sec
rts
*--------------------------------------
CS.QUIT clc
rts
*--------------------------------------

View File

@ -12,7 +12,7 @@ AUTO 6
.INB /A2OSX.DEV/INC/A2OSX.I
*--------------------------------------
X.MAX.RECURSE .EQ 8
X.DST.BASE.PATH .EQ 0
X.COPY.TO.DEST .EQ 0
X.DELETE.SOURCE .EQ 0
*--------------------------------------
ZPPtr1 .EQ ZPBIN

View File

@ -5,6 +5,8 @@ INC 1
AUTO 6
.LIST OFF
*--------------------------------------
COPY.BUF.SIZE .EQ 4096
*--------------------------------------
ZPPtr1 .EQ ZPBIN
ZPPtr2 .EQ ZPBIN+2
*--------------------------------------
@ -133,7 +135,14 @@ CS.RUN >SYSCALL GetC
sta (pData),y
bne .8
.1 jsr GetNextEntry
.1 .DO X.COPY.TO.DEST=1
ldy #bCopy
lda (pData),y
bpl .2
jmp CS.RUN.Copy
.FIN
.2 jsr GetNextEntry Ptr1=NAME, Ptr2=STAT
bcs .9
ldy #hFilter
@ -217,27 +226,35 @@ CS.RUN.DIR ldy #bRecurse
jsr CS.RUN.PrintDir
bcs .9
jsr CS.RUN.CopyDir
bcs .9
.DO X.COPY.TO.DEST=1
ldy #hDstBasePath
jsr CS.RUN.GetFilePath
>LDYAI UsrBuf256
>SYSCALL MKDirYA
jsr CS.RUN.PrintErr
bcs .9
.FIN
>LDYA ZPPtr1
jmp EnterSubDirYA
.8 clc
rts
.9 jsr CS.RUN.PrintErr
rts
.9 rts
*--------------------------------------
CS.RUN.FILE jsr CS.RUN.PrintFile
bcs .9
jsr CS.RUN.CopyFile
jsr CS.RUN.CopyStart
bcs .9
rts
.DO X.DELETE.SOURCE=1
jsr CS.RUN.DelFile
bcs .9
.FIN
* .DO X.DELETE.SOURCE=1
* jsr CS.RUN.DelFile
* bcs .9
* .FIN
.9 jsr CS.RUN.PrintErr
rts
@ -275,14 +292,11 @@ CS.RUN.PrintFile
>SYSCALL CPrintFYA
rts
*--------------------------------------
CS.RUN.CopyDir ldy #hDstBasePath
jsr CS.RUN.GetFilePath
>LDYAI UsrBuf256
>SYSCALL MKDirYA
rts
.DO X.COPY.TO.DEST=1
*--------------------------------------
CS.RUN.CopyFile ldy #S.STAT.P.AUXTYPE
*--------------------------------------
CS.RUN.CopyStart
ldy #S.STAT.P.AUXTYPE
>PUSHB (ZPPtr2),y
iny
>PUSHB (ZPPtr2),y
@ -313,31 +327,106 @@ CS.RUN.CopyFile ldy #S.STAT.P.AUXTYPE
>PUSHWI UsrBuf256
>SYSCALL FOpen
bcs .9
ldy #hDstFile
sta (pData),y
bcc .1
ldy #hDstFile
pha
ldy #hSrcFile
lda (pData),y
>SYSCALL FCloseA
pla
sec
rts
.1 ldy #hDstFile
sta (pData),y
ldy #bCopy
lda #$ff
sta (pData),y
clc
.9 rts
*--------------------------------------
CS.RUN.Copy stz .90+1
>PUSHWI COPY.BUF.SIZE
>PUSHBI 0
>SYSCALL GetMem
bcs .9
>STYA ZPPtr1
stx .90+1
>PUSHW ZPPtr1 Dst Ptr
>PUSHWI COPY.BUF.SIZE Bytes To Read
ldy #hSrcFile
>PUSHB (pData),y
>SYSCALL FRead
bcc .1
eor #MLI.ERR.EOF
beq .9
.1 >STYA ZPPtr2
>PUSHW ZPPtr1 Src Ptr
>PUSHW ZPPtr2 Bytes To Write
ldy #hDstFile
>PUSHB (pData),y
>SYSCALL FWrite
bcs .9
lda #'.'
>SYSCALL PutCA
rts
.9 ldy #CopyRC
sta (pData),y
.90 lda #$00
beq CS.RUN.CopyEnd
>SYSCALL FreeMemA
*--------------------------------------
CS.RUN.CopyEnd ldy #hDstFile
lda (pData),y
>SYSCALL FCloseA
ldy #hSrcFile
lda (pData),y
>SYSCALL FCloseA
ldy #bCopy
lda #$0
sta (pData),y
clc
.9 rts
ldy #CopyRC
lda (pData),y
beq CS.RUN.PrintErr
sec
*--------------------------------------
.FIN
*--------------------------------------
CS.RUN.PrintErr pha
php
bcs .1
>LDYA L.MSG.OK
bra .8
.1 >PUSHA
>LDYA L.MSG.ERR
.8 >SYSCALL CPrintFYA
bcs .9
plp
bcc .81
ldy #bContinue
lda (pData),y
eor #$80
asl
.81 pla
rts
.9 plx
plx
rts
*--------------------------------------
.DO X.DELETE.SOURCE=1
*--------------------------------------
@ -369,30 +458,6 @@ CS.RUN.GetBasePath
>SYSCALL PStrCpy
rts
*--------------------------------------
CS.RUN.PrintErr pha
php
bcs .1
>LDYA L.MSG.OK
bra .8
.1 >PUSHA
>LDYA L.MSG.ERR
.8 >SYSCALL CPrintFYA
bcs .9
plp
bcc .81
ldy #bContinue
lda (pData),y
eor #$80
asl
.81 pla
rts
.9 plx
plx
rts
*--------------------------------------
CS.DOEVENT sec
rts
*--------------------------------------

View File

@ -11,7 +11,7 @@ AUTO 6
* hSrcBasePath .BS 1
* hDstBasePath .BS 1 (optional)
*--------------------------------------
.DO X.DST.BASE.PATH=1
.DO X.COPY.TO.DEST=1
InitDstDirYA >SYSCALL GetFullPathYA
bcs .99
@ -310,7 +310,7 @@ EnterSubDirYA >STYA ZPPtr2 save SUBDIR for StrCat
lda #0
sta (pData),y
.DO X.DST.BASE.PATH=1
.DO X.COPY.TO.DEST=1
ldy #hDstBasePath
jsr EnterSubDirYA.1
.FIN
@ -363,7 +363,7 @@ LeaveSubDir ldy #index
.8 clc
rts
*--------------------------------------
BasePath.. .DO X.DST.BASE.PATH=1
BasePath.. .DO X.COPY.TO.DEST=1
ldy #hDstBasePath
jsr BasePath..1
.FIN

View File

@ -147,7 +147,7 @@ note : '$VAR' does NOT expand Variable
| | | -N : Number all output lines | |
| | | -S : Suppress repeated empty output lines | |
| EDIT | Working | still missing : find/replace | 0.9 |
| NSCUTIL | Working | Tool for setting time in NSC/DL1216E | 0.8 |
| NSCUTIL | Working | Tool for setting time in NSC/DL1216E | 0.9 |
| ARP | Working | dump ARP cache, setup a static ARP entry | 0.9 |
| PING | Working | | 0.9 |
| DNSINFO | Working | dump DNS cache, setup a static DNS entry | 0.9 |

View File

@ -53,7 +53,7 @@ K.FOpen jsr PFT.CheckPathSTK
sta MLICALL.PARAMS+8,x
dex
bpl .1
>DEBUG
>MLICALL MLICREATE
bcc K.FOpen.10
K.FOpen.9 rts

View File

@ -1,6 +1,6 @@
PR#3
PREFIX /A2OSX.SRC
NEW
LOMEM $900
INC 1
AUTO 6
.LIST OFF