Kernel version 0.9 :

-TCP, bugfix (#8) ...nearly working!!!
-MKNod API implementation for stream SOCKET
-Bugfix in Smartort controller/device detection
-Memory leak in CP/MV/RM
This commit is contained in:
Rémy GIBERT 2017-04-10 08:07:14 +02:00
parent 3903a2001f
commit e4f2c60ada
13 changed files with 138 additions and 104 deletions

View File

@ -628,7 +628,7 @@ CS.QUIT jsr LeaveSubDir
.2 ldy #hFilter .2 ldy #hFilter
lda (pData),y lda (pData),y
beq .8 beq .8
* >SYSCALL FreeMemA >SYSCALL FreeMemA
.8 clc .8 clc
rts rts

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -176,17 +176,18 @@ S.TCB.INFREE .EQ 4
S.TCB.INUSED .EQ 6 S.TCB.INUSED .EQ 6
* *
S.TCB.OUTTAIL .EQ 8 S.TCB.OUTTAIL .EQ 8
S.TCB.NEXTOUTTAIL .EQ 10 S.TCB.OUTTAILNEXT .EQ 10
S.TCB.OUTHEAD .EQ 12 S.TCB.OUTHEAD .EQ 12
S.TCB.OUTFREE .EQ 14 S.TCB.OUTFREE .EQ 14
S.TCB.TOSEND .EQ 16 S.TCB.OUTTOSEND .EQ 16
S.TCB.OUTUSED .EQ 18 S.TCB.OUTUSED .EQ 18
* *
S.TCB.SEQNUM .EQ 20 Send:SEQ not yet ACKed S.TCB.INLASTSEQNUM .EQ 20 Rcvd:Last SEQ recieved from remote
S.TCB.ACKNUM .EQ 24 Rcvd:Last ACK recieved from remote S.TCB.OUTSEQNUM .EQ 24 Send:SEQ sent not yet ACKed (retransmit)
S.TCB.NEXTSEQ .EQ 28 Rcvd:Next SEQ accepted data from remote S.TCB.OUTNEXTSEQ .EQ 28 Send:Next SEQ to send
S.TCB.OUTACKNUM .EQ 32 Send:ACK to send to remote
* *
S.TCB .EQ 32 S.TCB .EQ 36
*-------------------------------------- *--------------------------------------
S.ETH.FRAMELEN .EQ 0 S.ETH.FRAMELEN .EQ 0
S.ETH.DSTMAC .EQ 2 S.ETH.DSTMAC .EQ 2
@ -246,8 +247,8 @@ S.UDP .EQ S.IP+8
*-------------------------------------- *--------------------------------------
S.TCP.SRCPORT .EQ S.IP+0 S.TCP.SRCPORT .EQ S.IP+0
S.TCP.DSTPORT .EQ S.IP+2 S.TCP.DSTPORT .EQ S.IP+2
S.TCP.SEQ.NUMBER .EQ S.IP+4 S.TCP.SEQNUM .EQ S.IP+4
S.TCP.ACK.NUMBER .EQ S.IP+8 S.TCP.ACKNUM .EQ S.IP+8
S.TCP.DATAOFFSET .EQ S.IP+12 S.TCP.DATAOFFSET .EQ S.IP+12
S.TCP.OPTIONS .EQ S.IP+13 S.TCP.OPTIONS .EQ S.IP+13
S.TCP.OPTIONS.URG .EQ %00100000 S.TCP.OPTIONS.URG .EQ %00100000

View File

@ -104,7 +104,7 @@ SKT.New.Listen sec
>LDYA ZPTmpPtr3 >LDYA ZPTmpPtr3
>STYA ZPPtrSKT >STYA ZPPtrSKT
lda #S.TCP.OPTIONS.SYN lda #S.TCP.OPTIONS.SYN
jsr TCP.OUT.SendOpt Only for CLIENT conn!!!! jsr TCP.OUT.SendOptA Send SYN,Only for CLIENT conn!!!!
bcs .99 bcs .99
ldy #S.SOCKET.TCP.STATUS ldy #S.SOCKET.TCP.STATUS
@ -155,7 +155,7 @@ SKT.CloseA and #$7f
ora #S.TCP.OPTIONS.FIN ora #S.TCP.OPTIONS.FIN
sta (ZPPtrSKT),y sta (ZPPtrSKT),y
jsr TCP.OUT Try to push FIN jsr TCP.OUT SKT.Close, Try to push FIN
clc clc
rts rts
@ -309,10 +309,22 @@ SKT.AcceptA jsr SKT.GetA.I
* ## Out : * ## Out :
* A = hFile * A = hFile
*\-------------------------------------- *\--------------------------------------
SKT.MkNodA SKT.MkNodA sta NODE.SSOCK+S.NODE.SSOCK.HSKT
>SYSCALL MkNodA
bcs .9
sec >STYA ZPTmpPtr1
rts
ldy #S.NODE.SSOCK-1
.1 lda NODE.SSOCK,y
sta (ZPTmpPtr1),y
dey
bpl .1
txa
* clc
.9 rts
*/-------------------------------------- */--------------------------------------
* # SKT.Write (DGRAM,STREAM,RAW) * # SKT.Write (DGRAM,STREAM,RAW)
* Send block of data * Send block of data
@ -630,11 +642,11 @@ SKT.AddDataToSktIn
sbc ZPDataInLen+1 sbc ZPDataInLen+1
bcc .9 Not enough room in Q bcc .9 Not enough room in Q
ldy #S.TCP.SEQ.NUMBER+3 ldy #S.TCP.SEQNUM+3
ldx #3 ldx #3
.10 lda (ZPFrameInPtr),y .10 lda (ZPFrameInPtr),y
eor SKT.TCBCache+S.TCB.NEXTSEQ,x eor SKT.TCBCache+S.TCB.INLASTSEQNUM,x
bne .9 bne .9
dey dey
dex dex
@ -719,19 +731,20 @@ SKT.AddDataToSktIn
clc clc
lda SKT.TCBCache+S.TCB.NEXTSEQ+3 lda SKT.TCBCache+S.TCB.INLASTSEQNUM+3
adc ZPDataInLen adc ZPDataInLen
sta SKT.TCBCache+S.TCB.NEXTSEQ+3 sta SKT.TCBCache+S.TCB.INLASTSEQNUM+3
lda SKT.TCBCache+S.TCB.NEXTSEQ+2 lda SKT.TCBCache+S.TCB.INLASTSEQNUM+2
adc ZPDataInLen+1 adc ZPDataInLen+1
sta SKT.TCBCache+S.TCB.NEXTSEQ+2 sta SKT.TCBCache+S.TCB.INLASTSEQNUM+2
bcc .80 bcc .80
inc SKT.TCBCache+S.TCB.NEXTSEQ+1 inc SKT.TCBCache+S.TCB.INLASTSEQNUM+1
bne .80 bne .80
inc SKT.TCBCache+S.TCB.NEXTSEQ inc SKT.TCBCache+S.TCB.INLASTSEQNUM
.80 jmp SKT.StoreTCB .80 clc
rts
*-------------------------------------- *--------------------------------------
* From SKT.Read * From SKT.Read
* In: * In:
@ -859,19 +872,19 @@ SKT.GetDataFromSktIn
sbc ZPTmpPtr3+1 sbc ZPTmpPtr3+1
sta SKT.TCBCache+S.TCB.INUSED+1 sta SKT.TCBCache+S.TCB.INUSED+1
lda SKT.TCBCache+S.TCB.ACKNUM+3 lda SKT.TCBCache+S.TCB.OUTACKNUM+3
clc clc
adc ZPTmpPtr3 adc ZPTmpPtr3
sta SKT.TCBCache+S.TCB.ACKNUM+3 sta SKT.TCBCache+S.TCB.OUTACKNUM+3
lda SKT.TCBCache+S.TCB.ACKNUM+2 lda SKT.TCBCache+S.TCB.OUTACKNUM+2
adc ZPTmpPtr3+1 adc ZPTmpPtr3+1
sta SKT.TCBCache+S.TCB.ACKNUM+2 sta SKT.TCBCache+S.TCB.OUTACKNUM+2
bcc .80 bcc .80
inc SKT.TCBCache+S.TCB.ACKNUM+1 inc SKT.TCBCache+S.TCB.OUTACKNUM+1
bne .80 bne .80
inc SKT.TCBCache+S.TCB.ACKNUM inc SKT.TCBCache+S.TCB.OUTACKNUM
.80 jsr SKT.StoreTCB .80 jsr SKT.StoreTCB
@ -977,13 +990,13 @@ SKT.AddDataToSktOut
adc ZPDataInLen+1 adc ZPDataInLen+1
sta SKT.TCBCache+S.TCB.OUTUSED+1 sta SKT.TCBCache+S.TCB.OUTUSED+1
lda SKT.TCBCache+S.TCB.TOSEND lda SKT.TCBCache+S.TCB.OUTTOSEND
clc clc
adc ZPDataInLen adc ZPDataInLen
sta SKT.TCBCache+S.TCB.TOSEND sta SKT.TCBCache+S.TCB.OUTTOSEND
lda SKT.TCBCache+S.TCB.TOSEND+1 lda SKT.TCBCache+S.TCB.OUTTOSEND+1
adc ZPDataInLen+1 adc ZPDataInLen+1
sta SKT.TCBCache+S.TCB.TOSEND+1 sta SKT.TCBCache+S.TCB.OUTTOSEND+1
jsr SKT.StoreTCB jsr SKT.StoreTCB
rts rts
*-------------------------------------- *--------------------------------------
@ -1000,11 +1013,11 @@ SKT.GetDataFromSktOut
lda ZPTmpPtr1 lda ZPTmpPtr1
clc clc
adc SKT.TCBCache+S.TCB.NEXTOUTTAIL adc SKT.TCBCache+S.TCB.OUTTAILNEXT
sta ZPTmpPtr2 Make ZPTmpPtr2=base+nexttail sta ZPTmpPtr2 Make ZPTmpPtr2=base+nexttail
lda ZPTmpPtr1+1 lda ZPTmpPtr1+1
adc SKT.TCBCache+S.TCB.NEXTOUTTAIL+1 adc SKT.TCBCache+S.TCB.OUTTAILNEXT+1
sta ZPTmpPtr2+1 sta ZPTmpPtr2+1
lda ZPDataOutLen lda ZPDataOutLen
@ -1035,13 +1048,13 @@ SKT.GetDataFromSktOut
bne .4 bne .4
inc ZPTmpPtr2+1 inc ZPTmpPtr2+1
.4 inc SKT.TCBCache+S.TCB.NEXTOUTTAIL .4 inc SKT.TCBCache+S.TCB.OUTTAILNEXT
bne .1 bne .1
inc SKT.TCBCache+S.TCB.NEXTOUTTAIL+1 inc SKT.TCBCache+S.TCB.OUTTAILNEXT+1
lda SKT.TCBCache+S.TCB.NEXTOUTTAIL+1 lda SKT.TCBCache+S.TCB.OUTTAILNEXT+1
cmp /K.TCP.WSIZE cmp /K.TCP.WSIZE
bne .1 bne .1
stz SKT.TCBCache+S.TCB.NEXTOUTTAIL+1 stz SKT.TCBCache+S.TCB.OUTTAILNEXT+1
lda ZPTmpPtr1 Dst Ptr=Buffer Base lda ZPTmpPtr1 Dst Ptr=Buffer Base
sta ZPTmpPtr2 sta ZPTmpPtr2
@ -1049,13 +1062,13 @@ SKT.GetDataFromSktOut
sta ZPTmpPtr2+1 sta ZPTmpPtr2+1
bra .1 bra .1
.8 lda SKT.TCBCache+S.TCB.TOSEND .8 lda SKT.TCBCache+S.TCB.OUTTOSEND
sec sec
sbc ZPDataOutLen sbc ZPDataOutLen
sta SKT.TCBCache+S.TCB.TOSEND sta SKT.TCBCache+S.TCB.OUTTOSEND
lda SKT.TCBCache+S.TCB.TOSEND+1 lda SKT.TCBCache+S.TCB.OUTTOSEND+1
sbc ZPDataOutLen+1 sbc ZPDataOutLen+1
sta SKT.TCBCache+S.TCB.TOSEND+1 sta SKT.TCBCache+S.TCB.OUTTOSEND+1
clc clc
rts rts
@ -1065,17 +1078,17 @@ SKT.GetDataFromSktOut
* Dst : hOutMem/OUTTAIL * Dst : hOutMem/OUTTAIL
*-------------------------------------- *--------------------------------------
SKT.AckDataToSktOut SKT.AckDataToSktOut
ldy #S.TCP.ACK.NUMBER+3 Get new ACK number from FrameIn... ldy #S.TCP.ACKNUM+3 Get new ACK number from FrameIn...
ldx #3 Substract old ACK from socket ldx #3 Substract old ACK from socket
sec sec
.1 lda (ZPFrameInPtr),y .1 lda (ZPFrameInPtr),y
pha pha
sbc SKT.TCBCache+S.TCB.SEQNUM,x sbc SKT.TCBCache+S.TCB.OUTSEQNUM,x
sta TmpDWord,x sta TmpDWord,x
pla ....and Set SEQ = new SEQ pla ....and Set SEQ = new SEQ
sta SKT.TCBCache+S.TCB.SEQNUM,x sta SKT.TCBCache+S.TCB.OUTSEQNUM,x
dey dey
dex dex
bpl .1 bpl .1
@ -1134,7 +1147,7 @@ SKT.NewTCB >PUSHWI S.TCB
ldx #3 ldx #3
.2 lda A2osX.TIMER16,x .2 lda A2osX.TIMER16,x
sta SKT.TCBCache+S.TCB.SEQNUM,x sta SKT.TCBCache+S.TCB.OUTNEXTSEQ,x
dex dex
bpl .2 bpl .2

View File

@ -100,7 +100,7 @@ TCP.IN.JMP.LISTEN
>PUSHW L.SKT.Template >PUSHW L.SKT.Template
jsr SKT.New.Listen Assign SEQNUM jsr SKT.New.Listen Assign OUTNEXTSEQ
bcs .99 bcs .99
sty .1+1 sty .1+1
@ -116,15 +116,15 @@ TCP.IN.JMP.LISTEN
.2 lda #$ff .2 lda #$ff
sta ZPPtrSKT+1 sta ZPPtrSKT+1
ldy #S.TCP.SEQ.NUMBER+3 Get Remote SEQ ldy #S.TCP.SEQNUM+3 Get Remote SEQ
ldx #3 ldx #3
sec sec
.3 lda (ZPFrameInPtr),y Set ACK=SEQ+1 for new socket... .3 lda (ZPFrameInPtr),y Set OUTACK=SEQ+1 for new socket...
adc #0 adc #0
sta SKT.TCBCache+S.TCB.ACKNUM,x sta SKT.TCBCache+S.TCB.INLASTSEQNUM,x
sta SKT.TCBCache+S.TCB.NEXTSEQ,x sta SKT.TCBCache+S.TCB.OUTACKNUM,x
dey dey
dex dex
bpl .3 bpl .3
@ -134,7 +134,7 @@ TCP.IN.JMP.LISTEN
jsr ARP.AddFromFrameInPtr jsr ARP.AddFromFrameInPtr
lda #S.TCP.OPTIONS.SYN+S.TCP.OPTIONS.ACK lda #S.TCP.OPTIONS.SYN+S.TCP.OPTIONS.ACK
jsr TCP.OUT.SendOpt Send SYN.ACK jsr TCP.OUT.SendOptA SYN recieved, Send SYN.ACK
bcs .9 bcs .9
ldy #S.SOCKET.TCP.STATUS ldy #S.SOCKET.TCP.STATUS
@ -158,13 +158,13 @@ TCP.IN.JMP.SYNSENT
jsr SKT.GetTCB jsr SKT.GetTCB
ldx #3 ldx #3
ldy #S.TCP.ACK.NUMBER+3 ldy #S.TCP.ACKNUM+3
sec Check if ACK=my SEQ+1 sec Check if ACK=OUTNEXTSEQ+1
.1 lda SKT.TCBCache+S.TCB.ACKNUM,x .1 lda SKT.TCBCache+S.TCB.OUTNEXTSEQ,x
adc #0 adc #0
sta SKT.TCBCache+S.TCB.ACKNUM,x sta SKT.TCBCache+S.TCB.OUTNEXTSEQ,x
eor (ZPFrameInPtr),y eor (ZPFrameInPtr),y
bne .8 bne .8
dey dey
@ -172,7 +172,7 @@ TCP.IN.JMP.SYNSENT
bpl .1 bpl .1
lda #S.TCP.OPTIONS.ACK lda #S.TCP.OPTIONS.ACK
jsr TCP.OUT.SendOpt jsr TCP.OUT.SendOptA SYN.ACK recieved, Send, ACK
bcs .9 bcs .9
ldy #S.SOCKET.TCP.STATUS ldy #S.SOCKET.TCP.STATUS
@ -191,13 +191,14 @@ TCP.IN.JMP.SYNRCVD
jsr SKT.GetTCB jsr SKT.GetTCB
ldx #3 ldx #3
ldy #S.TCP.ACK.NUMBER+3 ldy #S.TCP.ACKNUM+3
sec sec
.1 lda SKT.TCBCache+S.TCB.SEQNUM,x Check if ACK=my SEQ+1 .1 lda SKT.TCBCache+S.TCB.OUTNEXTSEQ,x Check if ACK=OUTNEXTSEQ+1
adc #0 adc #0
sta SKT.TCBCache+S.TCB.SEQNUM,x sta SKT.TCBCache+S.TCB.OUTSEQNUM,x setup SEQNUM
sta SKT.TCBCache+S.TCB.OUTNEXTSEQ,x ...and update NEXTSEQ
eor (ZPFrameInPtr),y eor (ZPFrameInPtr),y
bne .8 bne .8
dey dey
@ -232,6 +233,9 @@ TCP.IN.JMP.ESTBLSH
beq .2 No data, ... beq .2 No data, ...
jsr SKT.AddDataToSktIn yes, queue data if there is room for.... jsr SKT.AddDataToSktIn yes, queue data if there is room for....
bcs .2
jsr SKT.StoreTCB success, update socket
.2 ldy #S.TCP.OPTIONS .2 ldy #S.TCP.OPTIONS
lda (ZPFrameInPtr),y lda (ZPFrameInPtr),y
@ -288,7 +292,7 @@ TCP.IN.JMP.FINWT1
ora #S.TCP.OPTIONS.ACK ora #S.TCP.OPTIONS.ACK
sta (ZPPtrSKT),y sta (ZPPtrSKT),y
jsr TCP.OUT jsr TCP.OUT FINWT1, Ack the FIN
bcs .9 bcs .9
ldy #S.SOCKET.TCP.STATUS ldy #S.SOCKET.TCP.STATUS
@ -309,7 +313,7 @@ TCP.IN.JMP.FINWT2
ora #S.TCP.OPTIONS.ACK ora #S.TCP.OPTIONS.ACK
sta (ZPPtrSKT),y sta (ZPPtrSKT),y
jsr TCP.OUT jsr TCP.OUT ACK the FIN
bcs .9 bcs .9
ldy #S.SOCKET.TCP.STATUS ldy #S.SOCKET.TCP.STATUS
@ -387,8 +391,8 @@ TCP.IN.SetDataInPtrAndLen
*-------------------------------------- *--------------------------------------
TCP.OUT jsr SKT.GetTCB TCP.OUT jsr SKT.GetTCB
TCP.OUT.I lda SKT.TCBCache+S.TCB.TOSEND+1 TCP.OUT.I lda SKT.TCBCache+S.TCB.OUTTOSEND+1
ldy SKT.TCBCache+S.TCB.TOSEND ldy SKT.TCBCache+S.TCB.OUTTOSEND
bne .1 bne .1
@ -399,7 +403,7 @@ TCP.OUT.I lda SKT.TCBCache+S.TCB.TOSEND+1
ldy #S.SOCKET.TCP.OPTIONS ldy #S.SOCKET.TCP.OPTIONS
lda (ZPPtrSKT),y lda (ZPPtrSKT),y
bne TCP.OUT.SendOpt a least an option... bne TCP.OUT.SendOptA a least an option...
clc No, data, no flag....exit clc No, data, no flag....exit
rts rts
@ -409,7 +413,7 @@ TCP.OUT.I lda SKT.TCBCache+S.TCB.TOSEND+1
pla pla
bcc .2 no....keep data len bcc .2 no....keep data len
>LDYAI K.TCP.MSS yes get only MSS >LDYAI K.TCP.MSS yes send only MSS
.2 jsr TCP.NewFrame .2 jsr TCP.NewFrame
bcs TCP.OUT.9 bcs TCP.OUT.9
@ -418,62 +422,63 @@ TCP.OUT.I lda SKT.TCBCache+S.TCB.TOSEND+1
ldy #S.SOCKET.TCP.OPTIONS ldy #S.SOCKET.TCP.OPTIONS
lda (ZPPtrSKT),y lda (ZPPtrSKT),y
jsr TCP.OUT.Send jsr TCP.OUT.SendOptA.1
bcs TCP.OUT.9 bcs TCP.OUT.9
lda SKT.TCBCache+S.TCB.SEQNUM+3 lda SKT.TCBCache+S.TCB.OUTNEXTSEQ+3
clc clc
adc ZPDataOutLen adc ZPDataOutLen
sta SKT.TCBCache+S.TCB.SEQNUM+3 sta SKT.TCBCache+S.TCB.OUTNEXTSEQ+3
lda SKT.TCBCache+S.TCB.SEQNUM+2 lda SKT.TCBCache+S.TCB.OUTNEXTSEQ+2
adc ZPDataOutLen+1 adc ZPDataOutLen+1
sta SKT.TCBCache+S.TCB.SEQNUM+2 sta SKT.TCBCache+S.TCB.OUTNEXTSEQ+2
bcc .80 bcc .80
inc SKT.TCBCache+S.TCB.SEQNUM+1 inc SKT.TCBCache+S.TCB.OUTNEXTSEQ+1
bne .80 bne .80
inc SKT.TCBCache+S.TCB.SEQNUM inc SKT.TCBCache+S.TCB.OUTNEXTSEQ
.80 jmp SKT.StoreTCB .80 jmp SKT.StoreTCB
TCP.OUT.9 rts TCP.OUT.9 rts
*-------------------------------------- *--------------------------------------
TCP.OUT.SendOpt sta .1+1 TCP.OUT.SendOptA
sta .1+1
>LDYAI 0 >LDYAI 0
jsr TCP.NewFrame jsr TCP.NewFrame
bcs TCP.OUT.9 bcs TCP.OUT.9
.1 lda #$ff .1 lda #$ff
TCP.OUT.Send ldy #S.TCP.OPTIONS TCP.OUT.SendOptA.1
ldy #S.TCP.OPTIONS
sta (ZPFrameOutPtr),y sta (ZPFrameOutPtr),y
and #S.TCP.OPTIONS.ACK and #S.TCP.OPTIONS.ACK
beq .11 beq .11
ldx #3 ldx #3
ldy #S.TCP.ACK.NUMBER+3 ldy #S.TCP.ACKNUM+3
.10 lda SKT.TCBCache+S.TCB.ACKNUM,x .10 lda SKT.TCBCache+S.TCB.OUTACKNUM,x
sta (ZPFrameOutPtr),y sta (ZPFrameOutPtr),y
dey dey
dex dex
bpl .10 bpl .10
bra .1 bra .1
.11 ldy #S.TCP.ACK.NUMBER .11 ldy #S.TCP.ACKNUM
lda #0 lda #0
.12 sta (ZPFrameOutPtr),y .12 sta (ZPFrameOutPtr),y
iny iny
cpy #S.TCP.ACK.NUMBER+4 cpy #S.TCP.ACKNUM+4
bne .12 bne .12
.1 ldx #3 .1 ldx #3
ldy #S.TCP.SEQ.NUMBER+3 ldy #S.TCP.SEQNUM+3
.2 lda SKT.TCBCache+S.TCB.SEQNUM,x .2 lda SKT.TCBCache+S.TCB.OUTNEXTSEQ,x
sta (ZPFrameOutPtr),y sta (ZPFrameOutPtr),y
dey dey
dex dex

View File

@ -110,8 +110,9 @@ L.TCP.IN.JMP .DA TCP.IN.JMP.CLOSED
.DA TCP.IN.JMP.TIMEWT .DA TCP.IN.JMP.TIMEWT
.DA 0 .DA 0
*-------------------------------------- *--------------------------------------
LIB.LOAD lda bFirstLoad LIB.LOAD ldx bFirstLoad
bne .8 bne .8
sta NODE.SSOCK+S.NODE.HANDLER
jsr ARP.CLEAR jsr ARP.CLEAR
jsr DNS.CLEAR jsr DNS.CLEAR
@ -299,6 +300,14 @@ HST.DecStr .BS 4
HST.IP .BS 5 HST.IP .BS 5
IP.ID .BS 2 IP.ID .BS 2
IP.CHECKSUM .BS 4 IP.CHECKSUM .BS 4
NODE.SSOCK .BS 1 S.NODE.HANDLER
.DA #S.NODE.T.SSOCK
.BS 1 S.NODE.SSOCK.HSKT
.DA #0 S.NODE.SSOCK.OPEN
.DA #0 S.NODE.SSOCK.CLOSE
.DA LIBTCPIP.SKT.GetCA
.DA LIBTCPIP.SKT.PutC
.DA #0 S.NODE.SSOCK.STATUS
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE /A2OSX.SRC/LIB/LIBTCPIP.S SAVE /A2OSX.SRC/LIB/LIBTCPIP.S

View File

@ -58,7 +58,7 @@ A2osX.PrtDrv.GetParam
*-------------------------------------- *--------------------------------------
A2osX.PrtDrv.GetDev A2osX.PrtDrv.GetDev
txa txa
asl lsr
sta A2osX.PrtDrv.Go.Cmd sta A2osX.PrtDrv.Go.Cmd
tax tax
lda A2osX.PrtDrv.Cnt,x lda A2osX.PrtDrv.Cnt,x

View File

@ -154,7 +154,8 @@ K.MkNodYA jsr K.GetDevByNameYA Ptr1=NAME
* A=hSocket * A=hSocket
* ## OUT: * ## OUT:
* CC = OK, CS = ERROR * CC = OK, CS = ERROR
* A = hFILE * X = hFILE
* Y,A = pFILE
*\-------------------------------------- *\--------------------------------------
K.MkNodA sta .1+1 K.MkNodA sta .1+1
>PUSHWI S.NODE.SSOCK >PUSHWI S.NODE.SSOCK
@ -172,7 +173,7 @@ K.MkNodA sta .1+1
.1 lda #$ff .1 lda #$ff
sta (ZPPtr1),y sta (ZPPtr1),y
txa >LDYA ZPPtr1
.9 rts .9 rts
*/-------------------------------------- */--------------------------------------
* # MKFIFO * # MKFIFO

View File

@ -274,7 +274,7 @@ DevMgrInit stz ZPPtr1
bra .7 bra .7
.3 inc .3 inc
beq .7 $ff, Disk II 13 Sect, ingnore beq .7 $ff, Disk II 13 Sect, ignore
ldy #7 ldy #7
lda (ZPPtr1),y lda (ZPPtr1),y
@ -338,6 +338,9 @@ DevMgrInit.SP ldy #$ff
sta .3+2 sta .3+2
sta DEV.HEADER+S.DEV.ROM.JMP+1 sta DEV.HEADER+S.DEV.ROM.JMP+1
>LDYAI A2osX.PrtDrv
>STYA DEV.HEADER+S.DEV.DRV.JMP
.1 jsr $ffff Self Modified .1 jsr $ffff Self Modified
.DA #0 Status .DA #0 Status
.DA SP.CTRL.STATUS .DA SP.CTRL.STATUS
@ -345,8 +348,7 @@ DevMgrInit.SP ldy #$ff
lda SP.CTRL.STATUS.DATA lda SP.CTRL.STATUS.DATA
beq .9 no device beq .9 no device
.2 lda #'1' .2 lda #1
sta DEV.HEADER+S.DEV.DEVID
sta SP.DEV.STATUS.DEVID sta SP.DEV.STATUS.DEVID
.3 jsr $ffff Self Modified .3 jsr $ffff Self Modified
@ -358,7 +360,8 @@ DevMgrInit.SP ldy #$ff
jsr DevMgrInit.AddDev jsr DevMgrInit.AddDev
.7 inc DEV.HEADER+S.DEV.DEVID .7 inc SP.DEV.STATUS.DEVID
inc DEV.HEADER+S.DEV.DEVID
dec SP.CTRL.STATUS.DATA dec SP.CTRL.STATUS.DATA
bne .3 bne .3

View File

@ -1,6 +1,6 @@
PR#3 PR#3
PREFIX /A2OSX.BUILD PREFIX /A2OSX.BUILD
NEW LOMEM $A00
INC 1 INC 1
AUTO 6 AUTO 6
*-------------------------------------- *--------------------------------------
@ -10,7 +10,7 @@ AUTO 6
* out : * out :
* A = hMem To loaded LIB * A = hMem To loaded LIB
*-------------------------------------- *--------------------------------------
K.LoadLibYA >STYA K.LoadLib.Name SAVE /A2OSX.SRC/LIBname for K.FileSearch K.LoadLibYA >STYA K.LoadLib.Name SAVE LIBname for K.FileSearch
>LDYAI ENV.LIB push ENVNAME=LIB >LDYAI ENV.LIB push ENVNAME=LIB
>SYSCALL GetEnvYA get value for ENV=LIB >SYSCALL GetEnvYA get value for ENV=LIB
bcs .99 bcs .99
@ -30,6 +30,7 @@ K.LoadLibYA >STYA K.LoadLib.Name SAVE /A2OSX.SRC/LIBname for K.FileSearch
stx K.LoadLib.hMem stx K.LoadLib.hMem
>STYA LIB.Jump+1 >STYA LIB.Jump+1
txa Pass hLib to LibLoad
ldx #LIBMGR.LOAD ldx #LIBMGR.LOAD
jsr LIB.Jump Call LIB.LOAD function jsr LIB.Jump Call LIB.LOAD function

View File

@ -195,7 +195,8 @@ return a hFile for a given Socket
## OUT: ## OUT:
+ CC = OK, CS = ERROR + CC = OK, CS = ERROR
+ A = hFILE + X = hFILE
+ Y,A = pFILE
# MKFIFO # MKFIFO
return a S.FILE to a new FIFO return a S.FILE to a new FIFO
@ -455,26 +456,26 @@ And return, if found, the full path to it.
# ChTyp # ChTyp
## In: ## In:
+ PUSHB = TYPE ... + PUSHB = TYPE
+ PUSHW = PATH ...FOpen) + PUSHW = PATH
# ChMod # ChMod
## In: ## In:
+ PUSHW = MODE ... + PUSHW = MODE
+ PUSHW = PATH ...FOpen) + PUSHW = PATH
# ChOwn # ChOwn
## In: ## In:
+ PUSHW = UID ... + PUSHW = UID
+ PUSHW = PATH ...FOpen) + PUSHW = PATH
# ChGrp # ChGrp
## In: ## In:
+ PUSHW = GID ... + PUSHW = GID
+ PUSHW = PATH ...FOpen) + PUSHW = PATH
# GetMem # GetMem