Kernel 0.9.2

This commit is contained in:
Rémy GIBERT 2018-07-26 08:03:49 +02:00
parent b9b4618770
commit 6e9fe36875
10 changed files with 34 additions and 36 deletions

Binary file not shown.

Binary file not shown.

View File

@ -9,8 +9,8 @@ SET.IPCFG >PULLW ZPTmpPtr1 IPCFG
>LDYA L.DCB.NIC
>STYA IOCTL+S.IOCTL.BUFPTR
lda S.IOCTL.STATCODE.GETDCB
sta S.IOCTL.STATCODE
lda #S.IOCTL.STATCODE.GETDCB
sta IOCTL+S.IOCTL.STATCODE
ldx #IOCTL.STATUS
jsr SET.IPCFG.IOCTL
@ -108,8 +108,7 @@ SET.IPCFG >PULLW ZPTmpPtr1 IPCFG
stx hDNSSocket2
.8 >LDYA ZPTmpPtr1
clc
.8 clc
.9 rts
SET.IPCFG.IOCTL >PUSHW L.IOCTL

View File

@ -129,11 +129,11 @@ FRM.SendIP ldx #3 Copy SRC.IP even if IP offload
ldy #S.IP.TOTAL.LENGTH+1
lda ZPFrameOutLen
sec
sbc #S.ETH-2
sbc #S.ETH
sta (ZPFrameOutPtr),y
dey
lda ZPFrameOutLen+1
sbc /S.ETH-2
sbc /S.ETH
sta (ZPFrameOutPtr),y
lda #0

View File

@ -131,7 +131,8 @@ SKT.Close jsr SKT.Get.I get SKT in ZPPtrSKT, S.SOCKET.SOCK in A
cmp #S.SOCKET.SOCK.STREAM
beq .10 TCP
bcc .9 no #S.SOCKET.SOCK.DGRAM, nor #S.SOCKET.SOCK.RAW
cmp #S.SOCKET.SOCK.RAW+1
bcs .9 no #S.SOCKET.SOCK.DGRAM, nor #S.SOCKET.SOCK.RAW
.1 ldy #S.SOCKET.HQ.TAIL
lda (ZPPtrSKT),y

View File

@ -551,11 +551,11 @@ TCP.ComputeChecksum
lda ZPFrameOutLen
sec
sbc #S.IP-2
sbc #S.IP
sta ZPDataInLen
lda ZPFrameOutLen+1
sbc /S.IP-2
sbc /S.IP
sta ZPDataInLen+1
clc

View File

@ -87,11 +87,11 @@ UDP.ComputeChecksum
lda ZPFrameOutLen
sec
sbc #S.IP-2
sbc #S.IP
sta ZPDataInLen
lda ZPFrameOutLen+1
sbc /S.IP-2
sbc /S.IP
sta ZPDataInLen+1
clc

View File

@ -56,23 +56,25 @@ CS.INIT >LDYA L.LIBTCPIP
>LIBCALL hLIBTCPIP,LIBTCPIP.GET.IPCFG
bcs .9
>STYA ZPIPCfgPtr
lda (ZPIPCfgPtr)
and #S.IPCFG.STATUS.OK
bne .99 Already Configured, exit
ldy #S.IPCFG.HDEV
lda (ZPIPCfgPtr),y
beq .98
ldy #S.IPCFG-1
.1 lda (ZPIPCfgPtr),y
sta IPCFG,y
dey
bne .1
stz IPCFG
stz IPCFG+S.IPCFG.STATUS
ldx #3
@ -82,7 +84,8 @@ CS.INIT >LDYA L.LIBTCPIP
dex
bpl .11
ldx #5
ldx #5
.2 lda IPCFG+S.IPCFG.MAC,x
sta DHCP.DISC.CHADDR,x
sta DHCP.REQ.CHADDR,x
@ -111,16 +114,14 @@ CS.RUN >PUSHW L.Socket
jmp CS.RUN.KO
.1 txa
ldy #hSocket
sta (pData),y
>STA.G hSocket
>LDYA L.MSG.CFG1
>SYSCALL printf
jsr Init.Timeout
CS.RUN.SDISC ldy #hSocket
>PUSHB (pData),y
CS.RUN.SDISC >PUSHB.G hSocket
>PUSHW L.DHCP.DISC
>PUSHWI DHCP.DISC.LEN
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.Write
@ -156,8 +157,7 @@ CS.RUN.SREQ ldx #3
>LDYA L.MSG.CFG2
>SYSCALL printf
ldy #hSocket
>PUSHB (pData),y
>PUSHB.G hSocket
>PUSHW L.DHCP.REQ
>PUSHWI DHCP.REQ.LEN
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.Write
@ -210,21 +210,15 @@ CS.RUN.KO pha
sec
rts
*--------------------------------------
CS.RUN.SKT.RCVD ldy #hSocket
lda (pData),y
CS.RUN.SKT.RCVD >LDA.G hSocket
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.ReadFrame
bcs .9
ldy #hFrame
sta (pData),y
>STA.G hFrame
>SYSCALL GetMemPtr
>STYA ZPFrameBase
.9 rts
*--------------------------------------
CS.RUN.DISCARD ldy #hFrame
lda (pData),y
>SYSCALL FreeMem
rts
*--------------------------------------
CS.DOEVENT lda (pEvent)
bpl .9 is it a TIMER event?
@ -238,10 +232,9 @@ CS.DOEVENT lda (pEvent)
.9 sec do not discard TIMER event
rts
*--------------------------------------
CS.QUIT ldy #hSocket
lda (pData),y
CS.QUIT >LDA.G hSocket
beq .1
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.Close
.1 lda hLIBTCPIP
@ -324,6 +317,10 @@ CheckDHCPOffer jsr CheckDHCPXID
sec
rts
*--------------------------------------
CS.RUN.DISCARD >LDA.G hFrame
>SYSCALL FreeMem
rts
*--------------------------------------
GetDHCPOption cmp #S.DHCP.OPTIONS.MASK
bne .1
ldx #S.IPCFG.MASK

View File

@ -76,11 +76,11 @@ Cmd.Exec lda #0
>STA.G CMD.hFullpath
* SET +X
>LDYA ZPCMDBuf
>SYSCALL puts
* >LDYA ZPCMDBuf
* >SYSCALL puts
sta $C055
>DEBUG
* sta $C055
* >DEBUG
>LDYA ZPCMDBuf
>SYSCALL ExpandStr

View File

@ -78,6 +78,7 @@ CORE.Run lda CORE.PSCount
ldy #S.PS.PID
lda (pPs),y
beq *
jsr CORE.PSFree.A
bra .8