Kernel version 0.9 : new NET.I.txt file, now A2osX.I.txt smaller, opt & fix in TCP

This commit is contained in:
Rémy GIBERT 2017-03-21 22:54:59 +01:00
parent cbe573c5fa
commit c851c10d52
12 changed files with 49 additions and 26 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -10,6 +10,7 @@ AUTO 6
*--------------------------------------
.INB /A2OSX.DEV/INC/MACROS.I
.INB /A2OSX.DEV/INC/A2OSX.I
.INB /A2OSX.DEV/INC/NET.I
.INB /A2OSX.DEV/INC/LIBTCPIP.I
*--------------------------------------
ZPIPCfgPtr .EQ ZPBIN

View File

@ -11,6 +11,7 @@ AUTO 6
.INB /A2OSX.DEV/INC/MACROS.I
.INB /A2OSX.DEV/INC/A2OSX.I
.INB /A2OSX.DEV/INC/MLI.ERR.I
.INB /A2OSX.DEV/INC/NET.I
.INB /A2OSX.DEV/INC/NET.8900A.I
.INB /A2OSX.DEV/INC/LIBTCPIP.I
*--------------------------------------

View File

@ -10,6 +10,7 @@ AUTO 6
*--------------------------------------
.INB /A2OSX.DEV/INC/MACROS.I
.INB /A2OSX.DEV/INC/A2OSX.I
.INB /A2OSX.DEV/INC/NET.I
.INB /A2OSX.DEV/INC/NET.W5100.I
.INB /A2OSX.DEV/INC/LIBTCPIP.I
*--------------------------------------

View File

@ -404,9 +404,11 @@ S.DEVSTAT.TYPE.5.25 .EQ $0A 5-1/4" disk
S.DEVSTAT.TYPE.PRINTER .EQ $0D Printer
S.DEVSTAT.TYPE.CLOCK .EQ $0E Clock
S.DEVSTAT.TYPE.MODEM .EQ $0F Modem
S.DEVSTAT.TYPE.NET .EQ $10 Network board
S.DEVSTAT.TYPE.XY .EQ $11 X,Y Pointing Device
S.DEVSTAT.TYPE.CHAR .EQ $12
S.DEVSTAT.TYPE.DISKII .EQ $10
S.DEVSTAT.TYPE.PRODOS .EQ $11
S.DEVSTAT.TYPE.NET .EQ $12 Network board
S.DEVSTAT.TYPE.XY .EQ $13 X,Y Pointing Device
S.DEVSTAT.TYPE.CHAR .EQ $14
S.DEVSTAT.SUBTYPE .EQ 22
S.DEVSTAT.SUBTYPE.EXT .EQ $80
S.DEVSTAT.SUBTYPE.DSKSW .EQ $40
@ -414,18 +416,6 @@ S.DEVSTAT.SUBTYPE.NOREM .EQ $20
S.DEVSTAT.VERSION .EQ 23
S.DEVSTAT .EQ 25
*--------------------------------------
S.DEVSTAT.NET.FLAGS .EQ 25
S.DEVSTAT.NET.FLAGS.ARPOFFLOAD .EQ %00000001
S.DEVSTAT.NET.FLAGS.IPOFFLOAD .EQ %00000010
S.DEVSTAT.NET.STATUS .EQ 26
S.DEVSTAT.NET.STATUS.OK .EQ $80
S.DEVSTAT.NET.STATUS.FD .EQ $40
S.DEVSTAT.NET.STATUS.10 .EQ $01
S.DEVSTAT.NET.STATUS.100 .EQ $02
S.DEVSTAT.NET.STATUS.1000 .EQ $03
S.DEVSTAT.NET.MAC .EQ 27
S.DEVSTAT.NET .EQ 33
*--------------------------------------
* PS STRUCT
*--------------------------------------
S.PS.F .EQ 0

23
INC/NET.I.txt Normal file
View File

@ -0,0 +1,23 @@
PR#3
PREFIX /A2OSX.SRC
NEW
INC 1
AUTO 6
.LIST OFF
*--------------------------------------
* NET Devices
*--------------------------------------
S.DEVSTAT.NET.FLAGS .EQ S.DEVSTAT
S.DEVSTAT.NET.FLAGS.ARPOFFLOAD .EQ %00000001
S.DEVSTAT.NET.FLAGS.IPOFFLOAD .EQ %00000010
S.DEVSTAT.NET.STATUS .EQ S.DEVSTAT+1
S.DEVSTAT.NET.STATUS.OK .EQ $80
S.DEVSTAT.NET.STATUS.FD .EQ $40
S.DEVSTAT.NET.STATUS.10 .EQ $01
S.DEVSTAT.NET.STATUS.100 .EQ $02
S.DEVSTAT.NET.STATUS.1000 .EQ $03
S.DEVSTAT.NET.MAC .EQ S.DEVSTAT+2
S.DEVSTAT.NET .EQ S.DEVSTAT+8
*--------------------------------------
MAN
SAVE /A2OSX.DEV/INC/NET.I

View File

@ -620,7 +620,8 @@ SKT.Read.I jsr SKT.GetA.I
ldy #S.SOCKET.TCP.STATUS
lda (ZPPtrSKT),y
cmp #S.SOCKET.TCP.STATUS.ESTBLSH
bne .91 IO err
bcc .92 Not yet established...no data
bne .91 closing...IO err
jsr SKT.GetDataFromSktIn
rts if CS, No data...
@ -631,6 +632,10 @@ SKT.Read.I jsr SKT.GetA.I
.91 lda #MLI.ERR.IO
sec
rts
.92 lda #0
sec
.99 rts
*--------------------------------------
* PRIVATE
@ -1151,7 +1156,7 @@ SKT.GetDataFromSktIn
SKT.GetTCB ldy #S.SOCKET.SQ.hTCB
lda (ZPPtrSKT),y
>SYSCALL GetMemPtrA
bcs *
>STYA .1+1
ldx #S.TCB-1
@ -1165,7 +1170,7 @@ SKT.GetTCB ldy #S.SOCKET.SQ.hTCB
SKT.StoreTCB ldy #S.SOCKET.SQ.hTCB
lda (ZPPtrSKT),y
>SYSCALL GetMemPtrA
bcs *
>STYA .2+1
ldx #S.TCB-1

View File

@ -243,7 +243,7 @@ TCP.IN.JMP.ESTBLSH
ldy #S.SOCKET.TCP.STATUS
lda #S.SOCKET.TCP.STATUS.CLWAIT
sta (ZPPtrSKT),y
.8 jmp TCP.OUT.I
.9 rts
*--------------------------------------
@ -321,21 +321,22 @@ TCP.IN.SetDataInPtrAndLen
.1 lda ZPFrameInPtr
clc
adc #S.IP
sta ZPDataInPtr
pha
lda ZPFrameInPtr+1
adc /S.IP
sta ZPDataInPtr+1
tax
lda ZPDataInPtr
pla
clc
adc TmpOffset
sta ZPDataInPtr
bcc .2
inc ZPDataInPtr+1
inx
.2 rts
.2 sta ZPDataInPtr
stx ZPDataInPtr+1
rts
*--------------------------------------
TCP.OUT.SYN >LDYAI 0
jsr TCP.NewFrame

View File

@ -11,6 +11,7 @@ AUTO 6
.INB /A2OSX.DEV/INC/MACROS.I
.INB /A2OSX.DEV/INC/A2OSX.I
.INB /A2OSX.DEV/INC/MLI.ERR.I
.INB /A2OSX.DEV/INC/NET.I
.INB /A2OSX.DEV/INC/LIBTCPIP.I
*--------------------------------------
ZPFrameInPtr .EQ ZPLIB

View File

@ -106,7 +106,7 @@ CS.RUN.INIT ldx #3
jsr CS.RUN.SERVER
bcs CS.RUN.ERR
jsr CS.RUN.CLIENT
* jsr CS.RUN.CLIENT
bra .2
.9 >LDYA L.MSG.SKTERR