KERNEL 0.94-2

This commit is contained in:
burniouf 2021-07-25 16:03:41 +02:00
parent 7fb016f47c
commit 631571cc6e
7 changed files with 756 additions and 734 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -124,27 +124,19 @@ CIFS2.MKDir jsr ReadSocket
*--------------------------------------
CIFS.OpenDir >STYA pPath resolved path
>LDYAI S.FD.DIR
>SYSCALL2 GetMem
jsr CIFS.NewFD
bcs .9
>STYA ZPPtr2
stx hFD
lda #S.FD.T.DIR
sta (ZPPtr2)
lda hHandler
ldy #S.FD.PFT
sta (ZPPtr2),y
sta (pFD)
lda #0
ldy #S.FD.DIR.EPB
sta (ZPPtr2),y EOF Flag
sta (pFD),y EOF Flag
iny
sta (ZPPtr2),y
sta (pFD),y
iny
sta (ZPPtr2),y
sta (pFD),y
>PUSHW pPath
>PUSHWZ
@ -153,6 +145,8 @@ CIFS.OpenDir >STYA pPath resolved path
bcc .9
jsr CIFS.FreeFD
stz CIFS.Status
sec
.9 rts
@ -161,7 +155,7 @@ CIFS2.OpenDir lda #MLI.E.BADCALL
sec
rts
*--------------------------------------
CIFS.ReadDir jsr GetPFD
CIFS.ReadDir jsr CIFS.GetFD
* jsr ClearSocket
@ -247,7 +241,7 @@ CIFS.ReadDir.Send
.9 rts
*--------------------------------------
CIFS2.ReadDir jsr GetPFD
CIFS2.ReadDir jsr CIFS.GetFD
jsr ReadSocket
bcs .9
@ -588,6 +582,9 @@ CIFS2.FOpen jsr ReadSocket
jsr CIFS.NewFD
bcs .91
lda #S.FD.T.REG
sta (pFD)
ldy #S.NETBIOS+S.SMB.H+6 FileID
lda (ZPRespPtr),y
@ -644,7 +641,7 @@ CIFS2.FOpen jsr ReadSocket
sec
.91 stz CIFS.Status
jmp FreeRespData
jsr FreeRespData
bra .90
.9 jsr Exit.NODATA
@ -654,7 +651,7 @@ CIFS2.FOpen jsr ReadSocket
.99 rts
*--------------------------------------
CIFS.FClose jsr GetPFD
CIFS.FClose jsr CIFS.GetFD
jsr GetCtx
@ -713,10 +710,10 @@ CIFS2.FClose sta hFILE
.99 rts
*--------------------------------------
CIFS.FRead ldy #4 hNod
CIFS.FRead ldy #4 hFILE
lda (pStack),y
jsr GetPFD
jsr CIFS.GetFD
jsr GetCtx
@ -856,10 +853,10 @@ CIFS2.FRead jsr ReadSocket
.90 >POP 5
.99 rts
*--------------------------------------
CIFS.FWrite ldy #4 hNod
CIFS.FWrite ldy #4 hFILE
lda (pStack),y
jsr GetPFD
jsr CIFS.GetFD
jsr GetCtx
@ -1006,14 +1003,14 @@ CIFS.FFlush clc Nothing to do
*--------------------------------------
CIFS2.FFlush
*--------------------------------------
CIFS.FSeek ldy #5 hNod
CIFS.FSeek ldy #5 hFILE
lda (pStack),y
jsr GetPFD
jsr CIFS.GetFD
>PULLA
tax whence
>PULLL DWORD
>PULLL ZPPtr1 ZPPtr2
inc pStack
@ -1165,16 +1162,34 @@ CIFS2.Rename jsr ReadSocket
.99 >RET 4
*--------------------------------------
CIFS.NewFD >LDYAI S.FD.REG
CIFS.NewFD ldx #1
.1 lda hFDs-1,x
beq .2
inx
cpx #K.hFD.MAX+1
bne .1
lda #E.OOH
* sec
rts
.2 stx hFILE
>LDYAI 16 S.FD.REG = S.FD.DIR = 16
>SYSCALL2 GetMem
bcs .9
>STYA pFD
stx hFD
lda #S.FD.T.REG
sta (pFD)
txa
ldx hFILE
sta hFDs-1,x
stz hFDs.hName-1,x
lda hHandler
ldy #S.FD.PFT
sta (pFD),y
@ -1183,9 +1198,28 @@ CIFS.NewFD >LDYAI S.FD.REG
.9 rts
*--------------------------------------
CIFS.GetFD sta hFILE
tax
phx
lda hFDs.hName-1,x
>SYSCALL2 GetMemPtr
>STYA pPath
plx
lda hFDs-1,x
>SYSCALL2 GetMemPtr
>STYA pFD
rts
*--------------------------------------
CIFS.FreeFD pha
lda hFD
>SYSCALL2 FreeMem
ldx hFILE
stz hFDs-1,x
pla
rts
*--------------------------------------
@ -1212,10 +1246,10 @@ CIFS.RWGetFidOfs
*--------------------------------------
CIFS2.RWSetOfsY phy
ldy #4 hNod
ldy #4 hFILE
lda (pStack),y
jsr GetPFD
jsr CIFS.GetFD
ply Count LO
phy

View File

@ -19,7 +19,7 @@ ZS.START
ZPReqPtr .BS 2
ZPReqLen .BS 2
ZPCtxPtr .BS 2
pFD .BS 2
ZPRespPtr .BS 2
ZPPtr1 .BS 2
ZPPtr2 .BS 2
@ -31,11 +31,10 @@ pPath .BS 2
flags .BS 1
ftype .BS 1
auxtype .BS 2
ZPRespPtr .BS 2
pFD .BS 2
bFlag .BS 1
ByteCountOfs .BS 1
DWORD .BS 4
ZS.END .ED
*--------------------------------------
@ -521,19 +520,6 @@ CIFS.CallBack bit CIFS.Status
ply
jmp (J.CIFS2,x)
*--------------------------------------
GetPFD tax
phx
lda hFDs.hName-1,x
>SYSCALL2 GetMemPtr
>STYA pPath
plx
lda hFDs-1,x
>SYSCALL2 GetMemPtr
>STYA pFD
rts
*--------------------------------------
GetCTX lda MountTable+2
>SYSCALL2 GetMemPtr
>STYA ZPCtxPtr

View File

@ -356,10 +356,10 @@ DS1216E.DATA2 .EQ A1L
*--------------------------------------
LDR.ClkDevScan php
sei
lda RDCXROM
php
sta SETCXROM
* sta $C100
@ -387,9 +387,9 @@ LDR.ClkDevScan php
.3 lda DS1216E.SIG-1,y
phy
ldy #8 ....of 8 bits
.4 ldx #0
lsr
bcc .5
@ -420,7 +420,7 @@ LDR.ClkDevScan php
plp
bmi .8
sta CLRCXROM
.8 plp
@ -444,7 +444,7 @@ LDR.ClkDevScan php
LDR.ClkDevTCLK stz idxl
lda #$C1
sta idxl+1
lda #1
sta LDR.SlotIdx
@ -615,7 +615,7 @@ LDR.BlkDevScan stz idxl
cpx #2 CS if 2 devs or more
jsr LDR.AddBlkDevs install 1 or 2 devices from this slot.
.7
.7
.8 dec idxl+1 next lower slot.
dec LDR.SlotIdx have all slots been checked ?
@ -875,7 +875,7 @@ LDR.CheckDiskID ldy #5
clc
php
.8 ldx LDR.SlotIdx
lda sltbit-1,x
@ -883,18 +883,18 @@ LDR.CheckDiskID ldy #5
.9 plp
rts
.3 sec
php
ldx #0
ldx #0
.4 cmp (idxl),y
bne .9
inx
bne .4
bra .8
*--------------------------------------
LDR.SetDevID ldy #$FE check attributes byte.
@ -907,34 +907,37 @@ LDR.SetDevID ldy #$FE check attributes byte.
sta devid
rts
*--------------------------------------
LDR.Scr80Select php
LDR.Scr80Select jsr LDR.IsIIc
bcs .99
php
sei
sta SETC3ROM
ldx #COL80IDX.Cnt-1
.1 ldy COL80IDX,x
.1 ldy COL80IDX,x
lda $C300,y
cmp COL80VAL,x
bne .9
dex
bpl .1
lda $C30C is it an apple 80 col compatible card?
and #$F0
cmp #$80
bne .9
plp
rts
.9 sta CLRC3ROM
plp
rts
.99 rts
*--------------------------------------
LDR.Scr80Init lda #$8C Reset 80 col screen ($0C:HOME)
jsr $C300
@ -965,6 +968,7 @@ LDR.Scr80Init lda #$8C Reset 80 col screen ($0C:HOME)
sta SETIOUDIS
sta SETDHIRES
bmi .10
sta CLRIOUDIS
.10 sta CLRTEXT
@ -1088,6 +1092,15 @@ LDR.PrintX bit RROMBNK2
sta CLRPAGE2 for screen holes proper access
rts
*--------------------------------------
LDR.IsIIc lda MACHID
and #MACHID.T
cmp #MACHID.T.IIc
beq .9
clc
.9 rts
*--------------------------------------
PALETTE.MAIN .HS 00.02.04.06.08.0A.0C.0E
.HS 01.03.05.07.09.0B.0D.0F
PALETTE.AUX .HS 00.01.02.03.04.05.06.07

View File

@ -190,7 +190,7 @@ InitSrcDirYA >PUSHYA
bne .2
.3 txa
beq .91 no wc, file not found....
beq .90 no wc, file not found....
.4 jsr GetPtr1Len Search end of string.....
@ -253,8 +253,8 @@ InitSrcDirYA >PUSHYA
clc
rts
.91 lda #MLI.E.FNOTFND
.90 lda #MLI.E.FNOTFND
.9 pha
>LDA.G hFullPath
@ -357,7 +357,7 @@ InitDstDirYA >PUSHYA
.7 jsr .9 Cleanup
clc
.99 rts
rts
.9 pha
>LDA.G hFullPath
@ -551,43 +551,47 @@ EnterSubDirY lda (pData),y
.8 rts
*--------------------------------------
LeaveSubDir >LDA.G index
beq .9
beq .7
jsr GethDIRENT.A
jsr LeaveSubDir.free
jsr GethDIR
beq .1
pha
lda #0
sta (pData),y
pla
>SYSCALL FreeMem
.1 jsr GethDIR
pha
lda #0
sta (pData),y
pla
>SYSCALL CloseDir
>DEC.G index
.1 >DEC.G index
bne .8
ldy #hSrcBasePath
lda (pData),y
>SYSCALL FreeMem
.7 >LDA.G hSrcBasePath
jsr LeaveSubDir.free
.DO X.COPY.TO.DEST=1
ldy #hDstBasePath
lda (pData),y
>SYSCALL FreeMem
>LDA.G hDstBasePath
jsr LeaveSubDir.free
.FIN
.9 sec
sec
rts
.8 clc
rts
*--------------------------------------
LeaveSubDir.free
tax
beq .8
lda #0
sta (pData),y
txa
>SYSCALL FreeMem
.8 rts
*--------------------------------------
BasePath.. .DO X.COPY.TO.DEST=1

View File

@ -142,11 +142,6 @@ DEV.WRITE ldx #IOCTL.WRITE
*\--------------------------------------
K.MKDev jsr SHARED.PullP2P1 ptr2=name,tr1=fd
jsr DEV.GetFreeFD
bcs .9
stx IO.hFILE
ldy #$ff
ldx #S.FD.DEV
@ -157,22 +152,13 @@ K.MKDev jsr SHARED.PullP2P1 ptr2=name,tr1=fd
txa
tay
lda #0
lda #S.FD.T.CDEV
jsr K.GetMem
jsr DEV.MkFDy
bcs .9
>STYA pFD
>STYA .4+1
stx IO.hFD
txa
ldx IO.hFILE
sta hFDs-1,x
stz hFDs.hName-1,x
ldy #S.FD.DEV-1
.2 lda (ZPPtr1),y
@ -267,15 +253,25 @@ DEV.GetPDrv ldy #S.FD.DEV.DRVPTR
rts
*--------------------------------------
DEV.MkFD sta .8+1 S.FD.T
jsr DEV.GetFreeFD
bcs .9
stx IO.hFILE
ldy #16 MAX=16 for S.FD.DIR
DEV.MkFD ldy #16 Y = Size, MAX=16 for S.FD.DIR
DEV.MkFDy sta .8+1 A = S.FD.T
ldx #1
.1 lda hFDs-1,x
beq .2
inx
cpx #K.hFD.MAX+1
bne .1
lda #E.OOH
* sec
rts
.2 stx IO.hFILE
lda #0
ldx #S.MEM.F.INIT0+S.MEM.F.FD
jsr MEM.GetMem.YAX
@ -284,6 +280,8 @@ DEV.MkFD sta .8+1 S.FD.T
>STYA pFD
stx IO.hFD
pha
txa
.7 ldx IO.hFILE
@ -292,27 +290,13 @@ DEV.MkFD sta .8+1 S.FD.T
stz hFDs.hName-1,x
.8 lda #$ff SELF MODIFIED
sta (pFD) X = hFD, A = T
sta (pFD)
pla Y,A = pFD, X = hFILE
* clc
.9 rts
*--------------------------------------
DEV.GetFreeFD ldx #1
clc
.1 lda hFDs-1,x
beq .8
inx
cpx #K.hFD.MAX+1
bne .1
lda #E.OOH
* sec
.8 rts
*--------------------------------------
DEV.hFDFree lda IO.hFD
beq .8