Kernel 0.9.2

This commit is contained in:
Rémy GIBERT 2018-07-25 17:26:14 +02:00
parent 92922a9308
commit b9b4618770
22 changed files with 68 additions and 65 deletions

Binary file not shown.

Binary file not shown.

View File

@ -60,7 +60,7 @@ FIO.LOAD.ASM.T >STYA ZPPtr2
>PUSHWI 0 Aux type
>PUSHBI 6 S.FI.T.BIN
>PUSHBI SYS.FOpen.R
>PUSHW L.ASM.T.FILENAME
>LDYA L.ASM.T.FILENAME
>SYSCALL LoadFile
bcs .9
@ -139,7 +139,7 @@ FIO.OpenFile >STYA ZPPtr1
>PUSHBI $FA
>PUSHBI SYS.FOpen.R
.3 >PUSHW ZPPtr1
.3 >LDYA ZPPtr1
>SYSCALL FOpen
bcs .99
@ -229,9 +229,9 @@ FIO.ReadLine >LDYA ZPLineBuf
bcc .9 LEN should be at least 3
tay
>PUSHW ZPTmpBuf
lda #0
>PUSHYA
>PUSHW ZPTmpBuf
jsr FIO.ReadFromFile
bcs .9

View File

@ -132,8 +132,8 @@ CS.RUN >SYSCALL GetChar
rts
.2 pha
>PUSHW ZPBufPtr
>PUSHWI 256
>PUSHW ZPBufPtr
pla
>SYSCALL FRead
@ -254,7 +254,7 @@ CS.RUN.OPEN >SYSCALL RealPath
>PUSHBI SYS.FOpen.R+SYS.FOpen.T
pla
>PUSHYA
>SYSCALL FOpen
bcs .99

View File

@ -8,6 +8,7 @@ AUTO 4,1
*--------------------------------------
.INB INC/MACROS.I
.INB INC/A2OSX.I
.INB INC/ETH.I
.INB INC/LIBTCPIP.I
*--------------------------------------
ZPPTR1 .EQ ZPBIN

View File

@ -346,7 +346,6 @@ LoadFile >PUSHWI 0 Aux type
>SYSCALL GetMemPtr
>PUSHYA
>SYSCALL LoadFile
bcs .9
@ -415,18 +414,18 @@ SaveFile >PUSHWI 0 Aux type
>PUSHBI SYS.FOpen.X+SYS.FOpen.W
>LDA.G hFileName
>SYSCALL GetMemPtr
>PUSHYA
>SYSCALL FOpen
bcs .9
pha
>PUSHW.G FileLen
>LDA.G hBuffer
>SYSCALL GetMemPtr
>PUSHYA
>PUSHW.G FileLen
pla
pha

View File

@ -144,9 +144,6 @@ CS.RUN.FILE >LDA.G Arg
>LDA.G hFullPath
>SYSCALL GetMemPtr
>PUSHYA
>SYSCALL FOpen
bcs .9
>STA.G hFile
@ -156,8 +153,8 @@ CS.RUN.FILE >LDA.G Arg
>STA.G hMD5Ctx
.1 >PUSHW ZPDataBufPtr Dst Ptr
>PUSHWI FILEBUF.SIZE Bytes To Read
.1 >PUSHWI FILEBUF.SIZE Bytes To Read
>PUSHW ZPDataBufPtr Dst Ptr
>LDA.G hFile
>SYSCALL FRead

View File

@ -608,7 +608,6 @@ CS.RUN.Open phy Save Filename
ply
jsr CS.RUN.GetPathY
>PUSHYA
>SYSCALL FOpen
rts
*--------------------------------------
@ -620,8 +619,8 @@ CS.RUN.Copy stz .90+1
>STYA ZPPtr1
stx .90+1
>PUSHW ZPPtr1 Dst Ptr
>PUSHWI X.COPY.BUF.SIZE Bytes To Read
>PUSHW ZPPtr1 Dst Ptr
>LDA.G hSrcFile
>SYSCALL FRead
bcc .1
@ -632,8 +631,8 @@ CS.RUN.Copy stz .90+1
.1 >STYA ZPPtr2
>PUSHW ZPPtr1 Src Ptr
>PUSHW ZPPtr2 Bytes To Write
>PUSHW ZPPtr1 Src Ptr
>LDA.G hDstFile
>SYSCALL FWrite
bcs .9

View File

@ -108,7 +108,7 @@ CS.INIT.OPENINPUT
>PUSHWI 0 Aux type
>PUSHBI 0 Type
>PUSHBI SYS.FOpen.R
>PUSHW ZPPtr1
>LDYA ZPPtr1
>SYSCALL LoadFile
bcs CS.INIT.RTS
@ -184,7 +184,7 @@ CS.INIT.CREATEOUTPUT
>PUSHWI 0 Aux type
>PUSHBI $CB PIX Type
>PUSHBI SYS.FOpen.W+SYS.FOpen.X
>PUSHW ZPPtr1
>LDYA ZPPtr1
>SYSCALL FOpen
bcs .9
>STA.G hOutputFile
@ -249,8 +249,8 @@ CS.RUN lda #S.BM.F.BBP1
adc ZPInputBufLen+1
sta ZPInputDataPtr+1
>PUSHEA.G PIX.Header
>PUSHWI S.BM
>PUSHEA.G PIX.Header
>LDA.G hOutputFile
>SYSCALL FWrite
bcs CS.RUN.RTS
@ -286,8 +286,8 @@ CS.RUN.LOOP inc ZPLineCount
cpy ZPPIXRowBytes
bne .2
>PUSHW ZPBufPtr
>PUSHW ZPPIXRowBytes
>PUSHW ZPBufPtr
>LDA.G hOutputFile
>SYSCALL FWrite
bcs CS.RUN.RTS

View File

@ -111,7 +111,7 @@ CS.INIT.OPENINPUT
>PUSHWI 0 Aux type
>PUSHBI 0 Type
>PUSHBI SYS.FOpen.R
>PUSHW ZPPtr1
>LDYA ZPPtr1
>SYSCALL LoadFile
bcs CS.INIT.RTS
@ -174,7 +174,7 @@ CS.INIT.CREATEOUTPUT
>PUSHWI 0 Aux type
>PUSHBI $CC FON Type
>PUSHBI SYS.FOpen.W+SYS.FOpen.X
>PUSHW ZPPtr1
>LDYA ZPPtr1
>SYSCALL FOpen
bcs .9
>STA.G hOutputFile
@ -700,8 +700,8 @@ CS.RUN.WriteByte
clc
bne .8
>PUSHW ZPOutPutBufPtr
>PUSHWI 256
>PUSHW ZPOutPutBufPtr
>LDA.G hOutputFile
>SYSCALL FWrite
bcs .9
@ -718,12 +718,12 @@ CS.RUN.FlushOutPutBuf
clc
>LDA.G OutPutPtr
beq .8
pha
>PUSHW ZPOutPutBufPtr
ply
tay
lda #0
>PUSHYA
>PUSHW ZPOutPutBufPtr
>LDA.G hOutputFile
>SYSCALL FWrite
@ -748,17 +748,12 @@ CS.RUN.WriteBMAndTbl
>SYSCALL FSeek
bcs .9
>LEA.G FON.Header
>PUSHYA
>PUSHWI S.FON
>PUSHEA.G FON.Header
>LDA.G hOutputFile
>SYSCALL FWrite
bcs .9
>LDA.G hTblBuf
>SYSCALL GetMemPtr
>PUSHYA
>LDA.G FON.Header+S.FON.Last
sec
>SBC.G FON.Header+S.FON.First
@ -770,6 +765,11 @@ CS.RUN.WriteBMAndTbl
rol
ply
>PUSHYA
>LDA.G hTblBuf
>SYSCALL GetMemPtr
>PUSHYA
>LDA.G hOutputFile
>SYSCALL FWrite

View File

@ -293,11 +293,9 @@ FRM.Retry ldx FRM.QUEUE.Tail
.8 rts
*--------------------------------------
FRM.Send.Out >DEBUG
>LDYA ZPDataOutPtr
FRM.Send.Out >LDYA ZPFrameOutPtr
>STYA IOCTL+S.IOCTL.BUFPTR
>LDYA ZPDataOutLen
>LDYA ZPFrameOutLen
>STYA IOCTL+S.IOCTL.BYTECNT
FRM.Send.IOCTL >PUSHW L.IOCTL

View File

@ -248,7 +248,7 @@ OApple+1,OApple+2,OApple+3 to switch between screens : Kernel Log, text, DHGR.
| KCONFIG | Working | Kernel Configuration Utility | 0.92 |
| ---- | ------ | ------- | ----- |
| TCPIPD | Working | Socket API.ARP,IP,ICMP,UDP & TCP ok | 0.92 |
| DHCPCLNT| Working | rewritten to use new Socket API | 0.9.1 |
| DHCPCLNT| Working | rewritten to use new Socket API | 0.92 |
| TELNETD | In Progress | | 0.9 |
| HTTPD | In Progress | | 0.9 |
@ -344,9 +344,9 @@ note : '$VAR' does NOT expand Variable
| ---- | ------ | ------- | ----- |
| IPCONFIG | Working | renamed from NETINFO | 0.92 |
| NETSTAT | Working | | 0.92 |
| ARP | Working | dump ARP cache, setup a static ARP entry | 0.9.1 |
| DNSINFO | Working | dump DNS cache, setup a static DNS entry | 0.9.1 |
| PING | Working | | 0.9.1 |
| ARP | Working | dump ARP cache, setup a static ARP entry | 0.92 |
| DNSINFO | Working | dump DNS cache, setup a static DNS entry | 0.92 |
| PING | Working | | 0.92 |
## DEV tools:
| Name | Status | Comment | K.Ver |

View File

@ -27,7 +27,7 @@ CS.START cld
.DA 0
.DA CS.END-CS.START CS
.DA DS.END-DS.START DS
.DA #16 SS
.DA #64 SS
.DA #6 ZP
.DA 0
*--------------------------------------
@ -212,7 +212,7 @@ CS.RUN.KO pha
*--------------------------------------
CS.RUN.SKT.RCVD ldy #hSocket
lda (pData),y
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.ReadA
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.ReadFrame
bcs .9
ldy #hFrame
sta (pData),y

View File

@ -184,11 +184,8 @@ CS.RUN.Load >PUSHEA.G StatBuf
>PUSHWI 0 Aux type
>PUSHBI 6 S.FI.T.BIN
>PUSHBI SYS.FOpen.R
>LDA.G hFileName
>LDA.G hFileName
>SYSCALL GetMemPtr
>PUSHYA
>SYSCALL LoadFile
bcs .99
txa
@ -219,15 +216,14 @@ CS.RUN.Save >PUSHWI 0 AUXTYPE
>LDA.G hFileName
>SYSCALL GetMemPtr
>PUSHYA
>SYSCALL FOpen
bcs .9
pha save hFile
>PUSHW ZPCfgPtr
>PUSHWI 16 LEN
>PUSHW ZPCfgPtr
pla
pha

View File

@ -76,9 +76,12 @@ Cmd.Exec lda #0
>STA.G CMD.hFullpath
* SET +X
* >LDYA ZPCMDBuf
* >SYSCALL puts
>LDYA ZPCMDBuf
>SYSCALL puts
sta $C055
>DEBUG
>LDYA ZPCMDBuf
>SYSCALL ExpandStr
>STYA ZPPtr1 Ptr to CMD ARGS

View File

@ -152,7 +152,10 @@ CFG.Read.HOSTS >LDYA L.HOSTS
jsr CFG.Read.LoadFile
bcs .9
.8 jsr CFG.Read.CleanUp
clc
rts
.9 jsr CFG.Read.CleanUp
sec
@ -172,7 +175,6 @@ CFG.Read.LoadFile
>PUSHBI 4 S.FI.T.TXT
>PUSHBI SYS.FOpen.R
pla
>PUSHYA
>SYSCALL LoadFile
bcs .9

View File

@ -24,7 +24,7 @@ CS.START cld
.DA 0
.DA CS.END-CS.START CS
.DA DS.END-DS.START DS
.DA #16 SS
.DA #64 SS
.DA #4 ZP
.DA 0
*--------------------------------------

View File

@ -207,7 +207,7 @@ BIN.Load.1 >PUSHWI K.S.STAT
>PUSHYA Push AUXTYPE
>PUSHBI S.FI.T.BIN
>PUSHBI SYS.FOpen.R
>PUSHW BIN.CmdLine
>LDYA BIN.CmdLine
>SYSCALL LoadFile BANK1!!!
.9 bcs .99 Error Loading file

View File

@ -15,7 +15,6 @@ K.LoadTxtFile pha
>PUSHBI 4 S.FI.T.TXT
>PUSHBI SYS.FOpen.R
pla
>PUSHYA
sec
.HS 90 BCC
*/--------------------------------------
@ -25,7 +24,7 @@ K.LoadTxtFile pha
* PUSHW = AUXTYPE (Handled by....
* PUSHB = TYPE ...
* PUSHB = MODE ...
* PUSHW = PATH ...FOpen)
* LDYA = PATH ...FOpen)
* **Out:**
* Y,A = File Length
* X = hMem of Loaded File
@ -56,8 +55,8 @@ K.LoadFile clc
>STYA FIO.Mem
stx .8+1
>PUSHW FIO.Mem
>PUSHW FIO.FSize
>PUSHW FIO.Mem
lda FIO.hFile
jsr K.FRead
bcs .98

View File

@ -142,8 +142,8 @@ IO.READ.REG clc
.HS B0 BCS
*--------------------------------------
IO.WRITE.REG sec
>PUSHW K.S.IOCTL+S.IOCTL.BUFPTR
>PUSHW K.S.IOCTL+S.IOCTL.BYTECNT
>PUSHW K.S.IOCTL+S.IOCTL.BUFPTR
ldy #S.FD.REG.REF
lda (pFD),y
bcs .1

View File

@ -23,8 +23,8 @@ K.IrqHAuxLC cld
pla
pha
and #$10 BRK?
bne K.IrqHAuxLC.BRK
* bne K.IrqHAuxLC.BRK
bne *
stx K.IrqHAuxLC.5+1
sty K.IrqHAuxLC.4+1

View File

@ -792,8 +792,8 @@ K.SScanF.GetVAL tya Y=char count parsed
* CC : A = hFILE
* CS : A = EC
*\--------------------------------------
K.FOpen jsr PFT.CheckPathSTK
jsr STDIO.PullMLIPath
K.FOpen jsr PFT.CheckPathYA
jsr STDIO.SetMLIPathYA
>PULLB K.FOpen.MODE
>PULLB K.FOpen.TYPE
>PULLW K.FOpen.AUXTYPE
@ -953,8 +953,8 @@ K.FRead jsr PFT.CheckNodeA
K.FWrite jsr PFT.CheckNodeA
ldx #MLIWRITE
K.FReadWrite.1 jsr STDIO.GetRefNum
>PULLW K.MLI.PARAMS+4
>PULLW K.MLI.PARAMS+2
>PULLW K.MLI.PARAMS+4
lda #4 Param Count = 4 for MLIREAD & MLIWRITE
jsr GP.MLICall
@ -963,6 +963,9 @@ K.FReadWrite.1 jsr STDIO.GetRefNum
.9 rts
*/--------------------------------------
* # FFlush
* ## C
* int fflush(hFILE stream);
* ## ASM
* **In:**
* A = hFILE
*\--------------------------------------
@ -973,6 +976,9 @@ K.FFlush jsr PFT.CheckNodeA
*/-------------------------------------
* # FSeek
* Set the file-position indicator for hFILE
* ## C
* `int fseek(hFILE stream, long offset, int whence);`
* ## ASM
* **In:**
* PUSHW = Ptr to Offset (DWORD)
* PUSHB = From
@ -1081,6 +1087,9 @@ K.FEOF.MARK .BS 3
*/--------------------------------------
* # FTell
* Return the current value of the file-position indicator
* ## C
* `long ftell(hFILE stream);`
* ## ASM
* **In:**
* PUSHW = Ptr to Offset (DWORD)
* PUSHB = hFILE