TCPIP:fixes for dual FIN/ACK transaction

DAN2ETH.DRV
This commit is contained in:
burniouf 2023-01-06 15:02:35 +01:00
parent 321b273a0f
commit 84d77aaf7f
18 changed files with 863 additions and 298 deletions

Binary file not shown.

Binary file not shown.

View File

@ -30,10 +30,10 @@ CODE.Quit >LDA.G CC.hOutFile
.8 clc
rts
*--------------------------------------
CODE.nAddLocal eor #$FF
CODE.AddLocal eor #$FF
inc
CODE.AddLocal jsr CODE.LDAI
CODE.RemLocal jsr CODE.LDAI
bcs .9
>LDYA L.PCC.ADDLOCAL

View File

@ -20,7 +20,7 @@ CORE.Init lda #SL._
>STA.G CC.hSyms
ldy #CC.ScopeIDs
sty ScopeIdx
sty ScopePtr
>LDYAI 256
>SYSCALL GetMem
@ -34,7 +34,7 @@ CORE.Init lda #SL._
>SYSCALL GetMem
bcs .9
>STYA ZPCCStack
>STYA StmtStk
txa
>STA.G CC.hStack
@ -329,13 +329,13 @@ CC.SListLookup >PUSHA hSList
*--------------------------------------
* CT Stack
*--------------------------------------
CC.Push ldy CStackPtr
CC.Push ldy StmtPtr
dey
beq .9
sty CStackPtr
sty StmtPtr
sta (ZPCCStack),y
sta (StmtStk),y
clc
rts

View File

@ -95,7 +95,7 @@ DECL.YAC ldx #SYM.SC.STATIC Y,A = Type/Qual
ldx #SYM.SC.AUTO
.22 jsr SYM.New Y,A=T/Q, X=SC, C=clear/reuse
bcs .98 OOM or DUP
bcs .99 OOM or DUP
jsr SYM.GetTQInYA Y,A = T/Q
bit #SYM.Q.FUNC

View File

@ -1,9 +1,7 @@
NEW
AUTO 3,1
*--------------------------------------
F.Decl stz LocalPtr
jsr SCOPE.New
F.Decl jsr SCOPE.New
bcs .99
lda (ZPSymBufPtr) #SYM.T
@ -37,28 +35,19 @@ F.Decl stz LocalPtr
jsr SYM.AddWord
bcs .99
cpy #SYM.T.VARIADIC
beq .5
jsr CC.GetCharNB
bcs .9
jsr CC.IsLetter
bcs .2
jsr F.NewArg will update LocalPtr
bcc .3
jsr F.NewArg will update LocalPtr,LocalFrame
bcs .99
rts
.2 >LDYA ZPPtr2
jsr EXP.GetYASizeOfInAX
clc
adc LocalPtr
sta LocalPtr
bcs .9
txa
bne .9
.3 jsr CC.GetCharNB
.2 jsr CC.GetCharNB
bcs .9
cmp #')'
@ -74,6 +63,12 @@ F.Decl stz LocalPtr
sec
.99 rts
*--------------------------------------
.5 jsr CC.GetCharNB
bcs .9
cmp #')'
bne .9
.6 jsr SYM.Add0000 definition End
bcs .99
@ -82,7 +77,7 @@ F.Decl stz LocalPtr
cmp #';'
bne .7
jsr SCOPE.Close discard local scope
bcs .99
@ -112,7 +107,17 @@ F.Def >LDA.G CC.bInitCode
jsr SYM.Update Store f() Declaration
bcs .99
lda LocalPtr
ldy #SYM.SizeOf
lda (ZPSymBufPtr),y
beq .2 void f()
.2 >LDA.G CC.LocalFrame
jsr CODE.LDAI A = f() ARGS size
bcs .99
@ -201,7 +206,10 @@ F.AddReturnVar ldx ZPLineBufPtr
>STYA ZPPtr2 Y,A = T/Q
>LDYA L.CC._RETURN_
lda #'R'
>STA.G CC.Label+1
>LEA.G CC.Label
>STYA ZPLineBufPtr
jsr F.NewArg
@ -229,8 +237,6 @@ F.NewArg >LDYA.G CC.SymID
jsr SYM.Store
bcs .9
stz LocalFrame DONT ADD TO LOCAL
>LDA.G CC.hSymBuf
>SYSCALL GetMemPtr
>STYA ZPSymBufPtr
@ -262,8 +268,16 @@ F.CallRetV sec
>STYA ZPPtr2
ror ZPPtr1+1 bRetV
bpl .1
jsr EXP.GetYASizeOfInAX
txa
jsr CODE.AddLocal
bcc .1
rts
jsr CORE.GetNCharNB skip '('
.1 jsr CORE.GetNCharNB skip '('
bcs .90
jsr SYM.LookupCheckTQ

View File

@ -391,10 +391,10 @@ KW.SWITCH jsr CC.GetCharNB
bcs .99
txa
jsr CC.Push push CPS.hMEM
jsr CC.Push push STMT.hMEM
lda #0
jsr CC.Push push CPS.MemPtr
jsr CC.Push push STMT.MemPtr
bcs .99
jsr STMT.New
@ -429,20 +429,21 @@ KW.SWITCH.END lda #'J' define JMP Label
jsr SYM.NewLabelA
bcs KW.SWITCH.RTS
lda CStackPtr
lda StmtPtr
clc
adc #CPS.hMEM
adc #STMT.hMEM
tay
lda (StmtStk),y
lda (ZPCCStack),y
>SYSCALL GetMemPtr
>STYA ZPPtr1
lda CStackPtr
lda StmtPtr
clc
adc #CPS.MemPtr
adc #STMT.MemPtr
tay
lda (ZPCCStack),y
lda (StmtStk),y
sta ZPPtr2+1
stz ZPPtr2
@ -498,30 +499,23 @@ KW.SWITCH.END lda #'J' define JMP Label
jsr SYM.NewLabelA
bcs .99
lda CStackPtr
clc
adc #CPS.hMEM
tay
lda (ZPCCStack),y
>SYSCALL FreeMem
jmp STMT.Close SWITCH ()
.99 rts
*--------------------------------------
KW.CASE ldy CStackPtr
KW.CASE ldy StmtPtr
beq .98
lda (ZPCCStack),y
lda (StmtStk),y
cmp #KW.SWITCH.ID SWITCH ??
bne .98
tya
lda StmtPtr
clc
adc #CPS.hMEM
adc #STMT.hMEM
tay
lda (ZPCCStack),y
lda (StmtStk),y
>SYSCALL GetMemPtr
>STYA ZPPtr1
@ -530,11 +524,12 @@ KW.CASE ldy CStackPtr
>STYA ZPPtr2
lda CStackPtr
lda StmtPtr
clc
adc #CPS.MemPtr
adc #STMT.MemPtr
tay
lda (ZPCCStack),y
lda (StmtStk),y
tay
lda ZPPtr2
@ -554,12 +549,12 @@ KW.CASE ldy CStackPtr
phy
lda CStackPtr
lda StmtPtr
clc
adc #CPS.MemPtr
adc #STMT.MemPtr
tay
pla
sta (ZPCCStack),y
sta (StmtStk),y
jsr CC.GetCharNB
bcs .98
@ -580,10 +575,10 @@ KW.CASE ldy CStackPtr
sec
.99 rts
*--------------------------------------
KW.DEFAULT ldy CStackPtr
KW.DEFAULT ldy StmtPtr
beq .9
lda (ZPCCStack),y
lda (StmtStk),y
cmp #KW.SWITCH.ID
bne .9
@ -615,7 +610,6 @@ KW.BREAK lda #'B'
.99 rts
*--------------------------------------
KW.CONTINUE lda #'C'
jsr SYM.LookupLabelA
bcs .99
@ -631,7 +625,10 @@ KW.RETURN ldx ZPLineBufPtr
ldx ZPLineBufPtr+1
phx
>LDYA L.CC._RETURN_
lda #'R'
>STA.G CC.Label+1
>LEA.G CC.Label
>STYA ZPLineBufPtr
jsr SYM.Lookup
@ -668,9 +665,6 @@ KW.RETURN ldx ZPLineBufPtr
lda #$4C emit JMP exit
jmp CODE.TOABSYX
.9 lda #E.CSYN
sec
.99 rts
*--------------------------------------
KW.SIZEOF
@ -732,7 +726,7 @@ KW.StackDiscard jsr TYPE.SizeOf
txa
beq .8 void
jsr CODE.AddLocal
jsr CODE.RemLocal
.8 clc
.9 rts

View File

@ -1,46 +1,58 @@
NEW
AUTO 3,1
*--------------------------------------
SCOPE.New ldy ScopeIdx
SCOPE.New ldy ScopePtr
cpy #CC.ScopeIDs+SCOPE.MAX*2
bcs .9
iny
iny
sty ScopeIdx
sty ScopePtr
>INCW.G CC.ScopeID
>LDA.G CC.ScopeID
ldy ScopeIdx
ldy ScopePtr
sta (pData),y
>LDA.G CC.ScopeID+1
ldy ScopeIdx
ldy ScopePtr
iny
sta (pData),y
dec bLocalScope
stz LocalFrame
dec bLocalScope
lda #'F'
jsr SYM.LookupLabelA
bcs .99
txa
jsr CODE.AddLocal
bcs .99
.DO _DBG_SCOPE=1
>PUSHW L.MSG.DEBUG.SCIN
jsr SCOPE.Push
lda ScopeIdx
lda ScopePtr
sec
sbc #CC.ScopeIDs
lsr
>PUSHA
>PUSHB LocalPtr
>PUSHB LocalFrame
>PUSHB.G CC.LocalPtr
>PUSHB.G CC.LocalFrame
>PUSHBI 5
>SYSCALL PrintF
* >DEBUG
>DEBUG
.FIN
clc
@ -48,44 +60,65 @@ SCOPE.New ldy ScopeIdx
.9 lda #E.OOH
sec
.99 rts
.99
SCOPE.New.RTS rts
*--------------------------------------
SCOPE.Close .DO _DBG_SCOPE=1
SCOPE.Close lda #'F' define FRAME SIZE
jsr SYM.NewLabelA
bcs SCOPE.New.RTS
>LDA.G CC.LocalFrame
jsr CODE.RemLocal
bcs SCOPE.New.RTS
.DO _DBG_SCOPE=1
>PUSHW L.MSG.DEBUG.SCOUT
jsr SCOPE.Push
.FIN
ldy ScopeIdx
cpy #CC.ScopeIDs
beq *
dey
dey
sty ScopeIdx
inc bLocalScope
.DO _DBG_SCOPE=1
lda ScopeIdx
lda ScopePtr
sec
sbc #CC.ScopeIDs
lsr
>PUSHA
>PUSHB LocalPtr
>PUSHB LocalFrame
jsr SCOPE.Push
>PUSHBI 7
>PUSHB.G CC.LocalPtr
>PUSHB.G CC.LocalFrame
>PUSHBI 5
>SYSCALL PrintF
.FIN
ldy ScopePtr
cpy #CC.ScopeIDs
beq *
dey
dey
sty ScopePtr
inc bLocalScope
.DO _DBG_SCOPE=1
>PUSHW L.MSG.DEBUG.SC
jsr SCOPE.Push
lda ScopePtr
sec
sbc #CC.ScopeIDs
lsr
>PUSHA
>PUSHB.G CC.LocalPtr
>PUSHB.G CC.LocalFrame
>PUSHBI 5
>SYSCALL PrintF
>DEBUG
.FIN
clc
.99 rts
*--------------------------------------
SCOPE.Push ldy ScopeIdx
SCOPE.Push ldy ScopePtr
SCOPE.PushY iny
lda (pData),y

View File

@ -122,16 +122,16 @@ STMT.SetVar stz ExpState
*--------------------------------------
*--------------------------------------
STMT.Stmt.END ldy CStackPtr
STMT.Stmt.END ldy StmtPtr
beq STMT.POP.8 Global context
lda (ZPCCStack),y
lda (StmtStk),y
bmi STMT.POP.8 local F context
* in an instruction ...
iny CPS.TERM
lda (ZPCCStack),y
iny STMT.TERM
lda (StmtStk),y
cmp #'}'
beq STMT.POP.8 in a CPS...
beq STMT.POP.8 in a STMT...
cmp #';' must be ';' on stack....
beq STMT.End
@ -143,45 +143,37 @@ STMT.POP.9 lda #E.STACKERROR
STMT.POP.8 clc
STMT.POP.99 rts
*--------------------------------------
STMT.CPStmt.END ldy CStackPtr
STMT.CPStmt.END ldy StmtPtr
beq STMT.POP.9
lda (ZPCCStack),y
lda (StmtStk),y
bpl .1
jmp F.Def.END local F context
.1 iny
lda (ZPCCStack),y CPS.TERM
lda (StmtStk),y STMT.TERM
cmp #'}' must be '}' on stack....
bne STMT.POP.9
*--------------------------------------
STMT.End ldy CStackPtr CPS.KW
lda (ZPCCStack),y
STMT.End ldy StmtPtr STMT.KW
lda (StmtStk),y
tax
jmp (J.CC.KW.END,x)
*--------------------------------------
STMT.New00 lda #0
jsr CC.Push CPS.hMEM
jsr CC.Push STMT.hMEM
bcs STMT.New.RTS
jsr CC.Push CPS.MemPtr
jsr CC.Push STMT.MemPtr
bcs STMT.New.RTS
STMT.New lda LocalFrame
STMT.New lda #';' STMT.TERM
jsr CC.Push
bcs .99
lda LocalPtr
jsr CC.Push
bcs .99
lda #';' CPS.TERM
jsr CC.Push
bcs .99
>LDA.G CC.CmdSave
>LDA.G CC.CmdSave STMT.KW
jmp CC.Push
.99
@ -195,27 +187,18 @@ STMT.SetType jsr CORE.GetNCharNBNL
cmp #'{'
bne STMT.SetType.1
STMT.SetTypeCP jsr CORE.GetNCharNB skip '{'
STMT.SetTypeCP jsr CORE.GetNCharNBNL skip '{'
bcs STMT.SetType.9
jsr SCOPE.New
bcs STMT.New.RTS
lda #'F'
jsr SYM.LookupLabelA
bcs STMT.New.RTS
txa
jsr CODE.nAddLocal
bcs STMT.New.RTS
ldx #'}'
STMT.SetType.1 txa
ldy CStackPtr
iny CPS.TERM
sta (ZPCCStack),y
ldy StmtPtr
iny STMT.TERM
sta (StmtStk),y
clc
rts
@ -224,40 +207,31 @@ STMT.SetType.9 lda #E.CSYN
sec
rts
*--------------------------------------
STMT.Close ldy CStackPtr CPS.KW
iny CPS.TERM
lda (ZPCCStack),y
cmp #'}'
bne .1
lda #'F' define FRAME SIZE
jsr SYM.NewLabelA
bcs .99
lda LocalFrame
jsr CODE.AddLocal
bcs .99
lda CStackPtr
STMT.Close lda StmtPtr
clc
adc #CPS.LocalPtr
adc #STMT.hMEM
tay
lda (ZPCCStack),y
sta LocalPtr
lda (StmtStk),y
beq .1
iny CPS.LocalFrame
lda (ZPCCStack),y
sta LocalFrame
>SYSCALL FreeMem
.1 ldy StmtPtr STMT.KW
iny STMT.TERM
lda (StmtStk),y
cmp #'}'
bne .2
jsr SCOPE.Close
bcs .99
.1 lda CStackPtr
.2 lda StmtPtr
clc
adc #STMT
sta StmtPtr
clc
adc #CPS
sta CStackPtr
.8 clc
.99 rts
*--------------------------------------
MAN

View File

@ -81,7 +81,8 @@ SYM.New.2 jsr CC.GetCharNB
jsr SYM.Store Store this f() with no prototype...
bcs .99
jmp F.Decl
jsr F.Decl
rts
.98 lda #E.CSYN
sec
@ -195,16 +196,18 @@ SYM.SetAddrG ldy #SYM.Addr
rts
*--------------------------------------
SYM.SetAddrL ldy #SYM.SizeOf+1
lda (ZPSymBufPtr),y
bne .9
lda LocalPtr
dey #SYM.SizeOf
lda (ZPSymBufPtr),y
clc
dey SYM.SizeOf
adc (ZPSymBufPtr),y
>ADC.G CC.LocalPtr
bcs .9
sta LocalPtr
sta (pData),y
ldy #SYM.Addr
sta (ZPSymBufPtr),y
@ -213,8 +216,8 @@ SYM.SetAddrL ldy #SYM.SizeOf+1
lda (ZPSymBufPtr),y
clc
adc LocalFrame
sta LocalFrame
>ADC.G CC.LocalFrame
sta (pData),y
clc
rts
@ -241,7 +244,7 @@ SYM.BufInitYAXC pha
.1 iny
sta (ZPSymBufPtr),y
cpy #SYM
cpy #SYM-1
bcc .1
ldy #SYM.DefSize
@ -536,7 +539,7 @@ SYM.Lookup >LDA.G CC.LookupIdx
>PUSHB.G CC.hSyms ...for SListGetData
lda ScopeIdx
lda ScopePtr
.1 pha
>PUSHB.G CC.hSyms
@ -570,7 +573,7 @@ SYM.Lookup >LDA.G CC.LookupIdx
tya
>PUSHA KeyID.LO
pla discard ScopeIdx
pla discard ScopePtr
jsr CC.SkipX
@ -607,7 +610,7 @@ SYM.NewLabelA bit bPass2
bpl .10
clc
rts
.98 rts
.10 >STA.G CC.Label+1
@ -615,48 +618,60 @@ SYM.NewLabelA bit bPass2
>PUSHEA.G CC.Label
jsr SCOPE.Push
>SYSCALL SListNewKey
bcs .99
bcs .98
>STYA.G CC.SymID Y,A = KeyID
ldy #SYM.T.VOID
>STYA.G CC.LabelID
lda #SYM.T.VOID
>STA.G CC.LabelBuf
lda #SYM.Q.POINTER
ldx #SYM.SC.STATIC
sec
jsr SYM.BufInitYAXC
iny
sta (pData),y
ldy #CC.LabelBuf+SYM.DefSize
lda #SYM.Def
sta (pData),y
>LDA.G CC.Label+1
cmp #'F'
bne .1
lda LocalFrame
ldy #SYM.Addr
sta (ZPSymBufPtr),y
ldy #CC.LabelBuf+SYM.SC
lda #SYM.SC.AUTO
ldy #SYM.SC
sta (ZPSymBufPtr),y
sta (pData),y
>LDA.G CC.LocalFrame
ldy #CC.LabelBuf+SYM.Addr
sta (pData),y
bra .2
.1 jsr SYM.SetAddrCCode
.1 ldy #CC.LabelBuf+SYM.SC
lda #SYM.SC.STATIC
sta (pData),y
ldy #CC.LabelBuf+SYM.Addr
lda ZPCCCode
sta (pData),y
iny
lda ZPCCCode+1
sta (pData),y
.2 .DO _DBG_SYM=1
jsr SYM.DEBUGN
jsr SYM.DEBUGNL
.FIN
>PUSHB.G CC.hSyms
>PUSHW.G CC.SymID
>PUSHW ZPSymBufPtr
>PUSHW.G CC.LabelID
>PUSHEA.G CC.LabelBuf
>PUSHBI 0
ldy #SYM.DefSize
lda (ZPSymBufPtr),y
lda #SYM.Def
>PUSHA
>SYSCALL SListAddData
.DO _DBG_SYM=1
bcs .99
jsr SYM.DEBUGS
jsr SYM.DEBUGSL
.FIN
.99 rts
*--------------------------------------
@ -673,7 +688,7 @@ SYM.LookupLabelA
>PUSHB.G CC.hSyms ...for SListGetData
ldy ScopeIdx
ldy ScopePtr
.2 phy
>PUSHB.G CC.hSyms
@ -923,15 +938,12 @@ SYM.SetSizeOf ldy #SYM.SizeOf
rts
*--------------------------------------
SYM.SetAddrCCode
>LDYA ZPCCCode
SYM.SetAddrYA phy
ldy #SYM.Addr+1
lda ZPCCCode
ldy #SYM.Addr
sta (ZPSymBufPtr),y
pla
dey
lda ZPCCCode+1
iny
sta (ZPSymBufPtr),y
rts
@ -950,7 +962,7 @@ SYM.DEBUGN >PUSHW L.MSG.DEBUG.SYMN
>PUSHA
>PUSHBI 7
>SYSCALL Printf
* >DEBUG
* >DEBUG
rts
SYM.DEBUGU >PUSHW L.MSG.DEBUG.SYMU
@ -994,6 +1006,39 @@ SYM.DEBUGG >PUSHW L.MSG.DEBUG.SYMG
>PUSHBI 5
>SYSCALL Printf
rts
SYM.DEBUGNL >PUSHW L.MSG.DEBUG.SYMNL
>PUSHEA.G CC.Label
>PUSHW.G CC.LabelID
jsr SCOPE.Push
ldy #CC.LabelBuf
lda (pData),y
>PUSHA
iny
lda (pData),y
>PUSHA
iny
lda (pData),y
>PUSHA
>PUSHBI 9
>SYSCALL Printf
* >DEBUG
rts
SYM.DEBUGSL >PUSHW L.MSG.DEBUG.SYMSL
>PUSHW.G CC.LabelID
ldy #CC.LabelBuf
lda (pData),y
>PUSHA
iny
lda (pData),y
>PUSHA
iny
lda (pData),y
>PUSHA
>PUSHBI 5
>SYSCALL Printf
rts
.FIN
*--------------------------------------
MAN

View File

@ -11,7 +11,7 @@ NEW
.INB inc/mli.e.i
*--------------------------------------
_DBG_SYM .EQ 0
_DBG_SCOPE .EQ 0
_DBG_SCOPE .EQ 1
_DBG_OUT .EQ 0
*--------------------------------------
FILES.MAX .EQ 4
@ -70,14 +70,12 @@ SU.F.BitO .EQ 4
SU.F.BitW .EQ 5
SU.F.Name .EQ 6
*--------------------------------------
CPS.hMEM .EQ 5 switch/case
CPS.MemPtr .EQ 4
CPS.LocalFrame .EQ 3
CPS.LocalPtr .EQ 2
CPS.TERM .EQ 1
CPS.KW .EQ 0
STMT.hMEM .EQ 3 switch/case
STMT.MemPtr .EQ 2
STMT.TERM .EQ 1
STMT.KW .EQ 0
*
CPS .EQ 6
STMT .EQ 4
*--------------------------------------
*--------------------------------------
@ -95,14 +93,14 @@ bPass2 .BS 1
ZPCCCode .BS 2
ZPCCConst .BS 2
ZPCCData .BS 2
ZPCCStack .BS 2
StmtStk .BS 2
ZPLineBufPtr .BS 2
ZPLookupPtr .BS 2
CStackPtr .BS 1
LocalPtr .BS 1
LocalFrame .BS 1
ScopeIdx .BS 1
ScopePtr .BS 1
StmtPtr .BS 1
ZPSymBufPtr .BS 2
ZPLookupSymPtr .BS 2
@ -149,6 +147,8 @@ L.MSG.DEBUG.SYMN .DA MSG.DEBUG.SYMN
L.MSG.DEBUG.SYMU .DA MSG.DEBUG.SYMU
L.MSG.DEBUG.SYMS .DA MSG.DEBUG.SYMS
L.MSG.DEBUG.SYMG .DA MSG.DEBUG.SYMG
L.MSG.DEBUG.SYMNL .DA MSG.DEBUG.SYMNL
L.MSG.DEBUG.SYMSL .DA MSG.DEBUG.SYMSL
.FIN
.DO _DBG_SCOPE=1
L.MSG.DEBUG.SCIN .DA MSG.DEBUG.SCIN
@ -251,7 +251,6 @@ J.CC.STYPES .DA TYPE.SCHAR
.DA TYPE.SLONG
*--------------------------------------
L.CC.MAIN .DA CC.MAIN
L.CC._RETURN_ .DA CC._RETURN_
L.CC.SYSCALL .DA CC.SYSCALL
L.CC.FPUCALL .DA CC.FPUCALL
*--------------------------------------
@ -389,10 +388,10 @@ CS.RUN.CLOOP jsr CORE.CompileFile
*--------------------------------------
.1 jsr PrintSummary
bcs .99
>DEBUG
* >DEBUG
jsr CC.Link
bcs .99
>DEBUG
* >DEBUG
jsr CC.Link.CheckMain
bcs .99
@ -538,14 +537,14 @@ PrintVerboseMsg
>PUSHW L.MSG.DEBUG.SC
jsr SCOPE.Push
lda ScopeIdx
lda ScopePtr
sec
sbc #CC.ScopeIDs
lsr
>PUSHA
>PUSHB LocalPtr
>PUSHB LocalFrame
>PUSHB.G CC.LocalPtr
>PUSHB.G CC.LocalFrame
>PUSHBI 5
>SYSCALL PrintF
* >DEBUG
@ -660,11 +659,13 @@ MSG.DEBUG.SYMN .CZ "New SymID=%H[%H],T=%h,Q=%h,SC=%h "
MSG.DEBUG.SYMU .CZ "Upd SymID=%H,T=%h,Q=%h,SC=%h\r\n"
MSG.DEBUG.SYMS .CZ "Sto SymID=%H,T=%h,Q=%h,SC=%h\r\n"
MSG.DEBUG.SYMG .CZ "Get SymID=%H,T=%h,Q=%h,SC=%h\r\n"
MSG.DEBUG.SYMNL .CZ "New (%s) ID=%H[%H],T=%h,Q=%h,SC=%h "
MSG.DEBUG.SYMSL .CZ "Sto ID=%H,T=%h,Q=%h,SC=%h\r\n"
.FIN
.DO _DBG_SCOPE=1
MSG.DEBUG.SCIN .CZ "Scope { %H (%d:%h:%h)\r\n"
MSG.DEBUG.SC .CZ "Scope = %H (%d:%h:%h)\r\n"
MSG.DEBUG.SCOUT .CZ "Scope } %H (%d:%h:%h) -> %H\r\n"
MSG.DEBUG.SCOUT .CZ "Scope } %H (%d:%h:%h) -> "
.FIN
.DO _DBG_OUT=1
MSG.DEBUG.CSOUT .CZ "\r\n%H-"
@ -815,7 +816,6 @@ CC.TYPESIGN .HS 0000FF00FF00FFFF
CC.MAIN .AZ "main"
CC.MAIN.DEF .DA #SYM.T.SINT,#0,#SYM.T.SINT,#0,#SYM.T.UCHAR,#SYM.Q.PPOINTER,0
CC.MAIN.DEF.LEN .EQ *-CC.MAIN.DEF
CC._RETURN_ .AZ "_RETURN_;"
*--------------------------------------
CC.SYSCALL .PS "chtyp"
.DA #SYS.ChTyp
@ -1136,16 +1136,21 @@ CC.hStack .BS 1
CC.hSyms .BS 1
CC.ScopeID .BS 2
CC.LocalPtr .BS 1
CC.LocalFrame .BS 1
CC.ScopeIDs .BS 2+SCOPE.MAX*2 2 bytes Global+ MAX locals
CC.ScopePtrs .BS 2+SCOPE.MAX*2
CC.bInitCode .BS 1
CC.Label .BS 3 _X\0
*--------------------------------------
CC.hSymBuf .BS 1
CC.SymID .BS 2
CC.SymIDSave .BS 2
CC.ArgBuf .BS SYM
CC.Label .BS 3 _X\0
CC.LabelID .BS 2
CC.LabelBuf .BS SYM
*--------------------------------------
CC.LookupSymSize .BS 2
CC.LookupSymPtr .BS 2

View File

@ -80,6 +80,7 @@ CS.RUN >LDYA L.MSG0
>STYA ZPPTR1
ldy SocketIndex
.1 lda (ZPPTR1),y
beq .7
@ -137,6 +138,7 @@ CS.RUN.TP ldy #S.SOCKET.T
.3 cmp PROTO,x
beq .4
inx
cpx #PROTO.Cnt
bne .3
@ -167,6 +169,7 @@ CS.RUN.S ldy #S.SOCKET.TCP.S
cmp #S.SOCKET.TCP.S.TIMEWT+1
bcc .1
lda #S.SOCKET.TCP.S.TIMEWT+1
.1 asl
@ -180,6 +183,7 @@ CS.DOEVENT sec
*--------------------------------------
CS.QUIT lda hLIBTCPIP
beq .8
>SYSCALL UnloadLib
.8 clc
rts

503
DRV/DAN2ETH.DRV.S.txt Normal file
View File

@ -0,0 +1,503 @@
NEW
AUTO 3,1
.LIST OFF
.OP 65C02
.OR $2000
.TF drv/dan2eth.drv
*--------------------------------------
.INB inc/macros.i
.INB inc/a2osx.i
.INB inc/mli.e.i
.INB inc/nic.i
.INB inc/eth.i
*--------------------------------------
IO.8255.Cmd.PFX .EQ $AC
IO.8255.Cmd.INIT .EQ $10
IO.8255.Cmd.POLL .EQ $11
IO.8255.Cmd.SEND .EQ $12
IO.8255.Data .EQ $C080-$88
* IO.6255.PortB .EQ $C081-$88 Unused
IO.8255.S .EQ $C082-$88
IO.8255.S.ByteSent .EQ %10000000
IO.8255.S.ByteRcvd .EQ %00100000
IO.8255.Mode .EQ $C083-$88
*--------------------------------------
.MA READBYTE
lda #IO.8255.S.ByteRcvd
:1 bit IO.8255.S,x
bne :1
lda IO.8255.Data,x
.EM
.MA WRITEBYTE
sta IO.8255.Data,x
* lda #IO.8255.S.ByteSent
:1 bit IO.8255.S,x
bpl :1
.EM
*--------------------------------------
.DUMMY
.OR ZPBIN
ZS.START
ZPPtr1 .BS 2
ZPArgPtr .BS 2
DEVSLOT0x .BS 1
ZS.END .ED
*--------------------------------------
* File Header (16 Bytes)
*--------------------------------------
CS.START cld
jmp Dev.Detect cld,jmp abs=DRV
.DA #$61 6502,Level 1 (65c02)
.DA #1 DRV Layout Version 1
.DA 0
.DA CS.END-CS.START Code Length
.DA 0
.DA 0
.DA 0
*--------------------------------------
* Relocation Table
*--------------------------------------
L.MSG.DETECT .DA MSG.DETECT
L.MSG.DETECT.OK .DA MSG.DETECT.OK
L.MSG.DETECT.KO .DA MSG.DETECT.KO
L.DRV.CS.START .DA DRV.CS.START
L.FD.DEV .DA FD.DEV
L.FD.DEV.NAME .DA FD.DEV.NAME
L.SSCANF.MAC .DA SSCANF.MAC
L.MAC0 .DA DCB+S.DCB.NIC.MAC
.DA DCB+S.DCB.NIC.MAC+1
.DA DCB+S.DCB.NIC.MAC+2
.DA DCB+S.DCB.NIC.MAC+3
.DA DCB+S.DCB.NIC.MAC+4
.DA DCB+S.DCB.NIC.MAC+5
.DA 0 End Of Reloc Table
*--------------------------------------
Dev.Detect >STYA ZPArgPtr
>LDYA L.MSG.DETECT
>SYSCALL PutS
stz ZPPtr1
lda #$C7
.1 sta ZPPtr1+1
ldy #ROM.SIG.L-1
.10 lda (ZPPtr1),y
cmp ROM.SIG,y
bne .2
dey
bpl .10
lda ZPPtr1+1
and #$0F
tay
asl
asl
asl
asl
ora #$88
tax
lda #$fa
sta IO.8255.Mode,x
cmp IO.8255.Mode,x
beq .3
.2 dec FD.DEV.NAME+3
lda ZPPtr1+1
dec
cmp #$C0
bne .1
>LDYA L.MSG.DETECT.KO
>SYSCALL PutS
lda #MLI.E.NODEV
sec
.99 rts
.3 stx DEVSLOTx0
sty DEVSLOT0x
* sta DIB+S.DIB.VERSION+1
* sta DIB+S.DIB.VERSION
jsr Dev.ParseArgs
bcs .99
.8 >PUSHW L.MSG.DETECT.OK
>PUSHW L.FD.DEV.NAME
>PUSHBI 2
>SYSCALL PrintF
>PUSHWI DRV.END
>PUSHWI DRV.CS.END-DRV.CS.START
>PUSHWI DRV.CS.START
>LDYA L.DRV.CS.START
>SYSCALL InsDrv
bcs .9
>STYA FD.DEV+S.FD.DEV.DRVPTR
>PUSHW L.FD.DEV
>PUSHW L.FD.DEV.NAME
>SYSCALL MKDev
bcs .9
ldx DEVSLOT0x
lda #A2osX.S.NIC
sta A2osX.S,x
* clc
.9 rts
*--------------------------------------
Dev.ParseArgs lda (ZPArgPtr)
bne .1
lda A2osX.RANDOM16
eor A2osX.TIMER16
sta DCB+S.DCB.NIC.MAC+3
eor A2osX.RANDOM16+1
sta DCB+S.DCB.NIC.MAC+4
eor A2osX.TIMER16+1
sta DCB+S.DCB.NIC.MAC+5
clc
rts
.1 >PUSHW ZPArgPtr
>PUSHW L.SSCANF.MAC
ldx #0
.2 >PUSHW L.MAC0,x
inx
inx
cpx #12
bne .2
>PUSHBI 12 6 x byte PTRs
>SYSCALL SScanF
bcc .8
lda #E.SYN
* sec
.8 rts
*--------------------------------------
CS.END
MSG.DETECT .CZ "dan2eth/W5500 Driver."
MSG.DETECT.OK .CZ "dan2eth/W5500 Installed As Device : %s\r\n"
MSG.DETECT.KO .CZ "Hardware Not Found."
SSCANF.MAC .CZ "%h:%h:%h:%h:%h:%h"
ROM.SIG .HS E0.20.A0.00.E0.03.A2.3C.D0.05.A9.01.9D.FB.BF.A0
ROM.SIG.L .EQ *-ROM.SIG
*--------------------------------------
FD.DEV .DA #S.FD.T.CDEV
.DA #0 HANDLER
.DA #0 BUSID
.DA #0 DEVID
.DA 0 BUSPTR
.BS 2 DRVPTR
.DA 0 DCBPTR
.DA 0 BUFPTR
FD.DEV.NAME .AZ "eth7"
*--------------------------------------
* Driver Code
*--------------------------------------
ZPIOCTL .EQ ZPDRV
ZPBufPtr .EQ ZPDRV+2
Counter .EQ ZPDRV+4
*--------------------------------------
DRV.CS.START cld
jmp (.1,x)
.1 .DA STATUS
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA OPEN
.DA CLOSE
.DA READ
.DA WRITE
.DA 0 end or relocation
*--------------------------------------
STATUS >STYA ZPIOCTL
ldy #S.IOCTL.S
lda (ZPIOCTL),y
beq .1
cmp #S.IOCTL.S.GETDIB
bne STATUS.DCB
ldx #S.DIB-1
.HS 2C bit abs
.1 ldx #3
ldy #S.IOCTL.BUFPTR
lda (ZPIOCTL),y
sta .3+1
iny
lda (ZPIOCTL),y
sta .3+2
.2 lda DIB,x
.3 sta $ffff,x SELF MODIFIED
dex
bpl .2
clc
rts
STATUS.DCB cmp #S.IOCTL.S.GETDCB
bne STATUS.9
stz DCB+S.DCB.NIC.LINK
lda #S.DCB.NIC.LINK.OK
tsb DCB+S.DCB.NIC.LINK
lda #S.DCB.NIC.LINK.FD
tsb DCB+S.DCB.NIC.LINK
.1 ldy #S.IOCTL.BUFPTR
lda (ZPIOCTL),y
sta .3+1
iny
lda (ZPIOCTL),y
sta .3+2
ldx #S.DCB.NIC-1
.2 lda DCB,x
.3 sta $ffff,x SELF MODIFIED
dex
bpl .2
clc
rts
STATUS.9 lda #MLI.E.BADCTL
sec
rts
*--------------------------------------
OPEN lda #S.DIB.S.OPENED
bit DIB+S.DIB.S
bne .9
jsr CLOSE
* ldx DEVSLOTx0 Done by CLOSE
lda #$FA
sta IO.8255.Mode,x
lda #IO.8255.Cmd.PFX
>WRITEBYTE
lda #IO.8255.Cmd.INIT
>WRITEBYTE
ldy #0
.1 lda DCB+S.DCB.NIC.MAC+0,y
>WRITEBYTE
iny
cpy #6
bcc .1
>READBYTE
beq .8
lda #MLI.E.IO
sec
rts
.8 lda #S.DIB.S.OPENED
tsb DIB+S.DIB.S
clc
rts
.9 lda #MLI.E.OPEN
sec
rts
*--------------------------------------
CLOSE ldx DEVSLOTx0
.8 lda #S.DIB.S.OPENED
trb DIB+S.DIB.S
clc
rts
*--------------------------------------
READ php
sei
>STYA ZPIOCTL
ldx DEVSLOTx0
lda #IO.8255.Cmd.PFX
>WRITEBYTE
lda #IO.8255.Cmd.POLL
>WRITEBYTE
lda #2048
>WRITEBYTE
lda /2048
>WRITEBYTE
>READBYTE
ldy #S.IOCTL.BYTECNT
sta (ZPIOCTL),y
pha
eor #$ff
sta Counter
>READBYTE
sta (ZPIOCTL),y
pha
eor #$ff
sta Counter+1
pla
ply
bne .1
tax
beq READWRITE.9
.1 >SYSCALL2 GetMem
bcs READWRITE.99
>STYA ZPBufPtr
phx
phy
ldy #S.IOCTL.BUFPTR+1
sta (ZPIOCTL),y
dey
pla
sta (ZPIOCTL),y
ldx DEVSLOTx0
ldy #0
.2 inc Counter
bne .3
inc Counter+1
beq .8
.3 >READBYTE
sta (ZPBufPtr),y
iny
bne .2
inc ZPBufPtr+1
bra .2
.8 pla hMem
plp
clc
rts
*--------------------------------------
READWRITE.9 lda #E.NODATA
READWRITE.99 plp
sec
rts
*--------------------------------------
WRITE php
sei
>STYA ZPIOCTL
ldx DEVSLOTx0
lda #IO.8255.Cmd.PFX
>WRITEBYTE
lda #IO.8255.Cmd.POLL
>WRITEBYTE
ldy #S.IOCTL.BYTECNT
lda (ZPIOCTL),y
>WRITEBYTE
eor #$ff
sta Counter
iny
lda (ZPIOCTL),y
>WRITEBYTE
eor #$ff
sta Counter+1
ldy #S.IOCTL.BUFPTR
lda (ZPIOCTL),y
sta ZPBufPtr
iny
lda (ZPIOCTL),y
sta ZPBufPtr+1
ldy #0
.1 inc Counter
bne .2
inc Counter+1
beq .8
.2 lda (ZPBufPtr),y
>WRITEBYTE
iny
bne .1
inc ZPBufPtr+1
bne .1
.8 >READBYTE
bne READWRITE.9
plp
clc
rts
*--------------------------------------
DRV.CS.END
DEVSLOTx0 .BS 1
*--------------------------------------
DIB .DA #0
.DA #0,#0,#0 size
.PS "dan2eth/W5500 "
.DA #S.DIB.T.NIC
.BS 1 Subtype
.BS 2 Version
*--------------------------------------
DCB .DA #S.DCB.T.NIC
.BS 1 FLAGS
.BS 1 LINK
.DA #S.DCB.NIC.SPEED.10
.HS 0008DC123456 MAC
.BS 12 IP/MASK/GW
*--------------------------------------
DRV.END
MAN
SAVE usr/src/drv/dan2eth.drv.s
ASM

View File

@ -82,12 +82,8 @@ DNS.REQUEST lda hDNSSocket
>STYA DNS.MSG.ID
>STYA DNS.TmpCache+S.DNSCACHE.ID
lda #K.DNS.PENDING.TTL
sta DNS.TmpCache+S.DNSCACHE.TTL
stz DNS.TmpCache+S.DNSCACHE.TTL+1
stz DNS.TmpCache+S.DNSCACHE.TTL+2
stz DNS.TmpCache+S.DNSCACHE.TTL+3
lda #S.DNSCACHE.STATUS.PENDING
ldx #K.DNS.PENDING.TTL
jsr DNS.ADD.I
bcs .9
@ -204,14 +200,15 @@ DNS.Add >PULLW ZPPtrDNS Get host string
dey
bpl .1
stz DNS.TmpCache+S.DNSCACHE.TTL
lda #S.DNSCACHE.STATUS.RESOLVED+S.DNSCACHE.STATUS.STATIC
ldx #0
DNS.ADD.I sta DNS.TmpCache
stx DNS.TmpCache+S.DNSCACHE.TTL
stz DNS.TmpCache+S.DNSCACHE.TTL+1
stz DNS.TmpCache+S.DNSCACHE.TTL+2
stz DNS.TmpCache+S.DNSCACHE.TTL+3
lda #S.DNSCACHE.STATUS.RESOLVED+S.DNSCACHE.STATUS.STATIC
DNS.ADD.I sta DNS.TmpCache
jsr DNS.FIND.BY.NAME
bcc .2 Found, go update...
@ -290,6 +287,7 @@ DNS.UPDATE.BY.ID
lda (ZPCachePtr),y
cmp DNS.TmpCache+S.DNSCACHE.ID
bne .6
iny
lda (ZPCachePtr),y
cmp DNS.TmpCache+S.DNSCACHE.ID+1
@ -330,10 +328,12 @@ DNS.FIND.FREE jsr DNS.GetCAche
bit #S.DNSCACHE.STATUS.STATIC+S.DNSCACHE.STATUS.PENDING
bne .7 Static/Pending.....skip
phx
ldy #S.DNSCACHE.TTL
ldx #3
sec
.2 lda TmpDWord,x is saved TTL greater then actual TTL?
sbc (ZPCachePtr),y
iny

View File

@ -349,7 +349,7 @@ SKT.shutdown pha
lda (ZPPtrSKT),y
cmp #S.SOCKET.TCP.S.ESTBLSH
bne .1
lda #S.TCP.OPTIONS.FIN+S.TCP.OPTIONS.ACK
jsr TCP.OUT.SendOptA Send FIN/ACK
@ -419,7 +419,14 @@ SKT.Read jsr SKT.PullhFDDataInPtrLen
sta ZPDataInLen+1
bra SKT.GetDataFromSktIn
.7 jsr SKT.CheckStream
.7 ldy #S.SOCKET.TCP.O
lda (ZPPtrSKT),y
and #S.TCP.OPTIONS.ACK
beq .8
jmp TCP.OUT.SendOptA
.8 jsr SKT.CheckStream
bcs .99 I/O error
lda #E.NODATA
@ -499,10 +506,10 @@ SKT.GetDataFromSktIn
jsr SKT.SubDataInLenAtSktX
jsr SKT.StoreTCB
* jsr TCP.SetSocketTCPO.ACK ACK=1 -> send WSIZE
jsr TCP.SetSocketTCPO.ACK ACK=1 -> send WSIZE
lda #S.TCP.OPTIONS.ACK
jsr TCP.OUT.SendOptA
* lda #S.TCP.OPTIONS.ACK
* jsr TCP.OUT.SendOptA
>LDYA ZPDataInLen
clc
@ -655,6 +662,7 @@ SKT.AddDataToSktOut
.2 inx
bne .3
pla
inc
beq .8
@ -670,6 +678,7 @@ SKT.AddDataToSktOut
.4 iny
bne .2
inc ZPTmpPtr1+1
.DO AUXPIPE=1
sta CLRWRITEAUX

View File

@ -16,7 +16,7 @@ TCP.IN jsr FRM.GetTargetSKT.TCPUDP
tax
jmp (J.TCP.IN,x)
*--------------------------------------
TCP.IN.RST lda #S.SOCKET.TCP.S.CLOSING
TCP.IN.RST lda #S.SOCKET.TCP.S.TIMEWT
ldy #S.SOCKET.TCP.S
sta (ZPPtrSKT),y
*--------------------------------------
@ -105,6 +105,7 @@ TCP.IN.JMP.SYNRCVD
lda (ZPFrameInPtr),y
cmp #S.TCP.OPTIONS.ACK
bne .8
jsr SKT.GetTCB
ldx #3
@ -236,7 +237,6 @@ TCP.IN.JMP.ESTBLSH
and #S.TCP.OPTIONS.FIN
beq .8
jsr TCP.IN.ACKTheFIN
jsr SKT.StoreTCB update socket
lda #S.TCP.OPTIONS.FIN+S.TCP.OPTIONS.ACK
@ -271,7 +271,7 @@ TCP.IN.JMP.LASTACK
* jsr TCP.OUT.SendACK
ldy #S.SOCKET.TCP.S
lda #S.SOCKET.TCP.S.CLOSING
lda #S.SOCKET.TCP.S.TIMEWT
sta (ZPPtrSKT),y
.8
*--------------------------------------
@ -280,59 +280,50 @@ TCP.IN.JMP.CLWAIT
rts
*--------------------------------------
TCP.IN.JMP.FINWT1
jsr SKT.GetTCB
ldy #S.TCP.OPTIONS FIN sent, accept ACK or FIN/ACK packet
lda (ZPFrameInPtr),y
bit #S.TCP.OPTIONS.FIN
bne .1
lda #S.TCP.OPTIONS.FIN+S.TCP.OPTIONS.ACK
jsr TCP.OUT.SendOptA Send FIN.ACK
bcs TCP.IN.JMP.TIMEWT.RTS
bne TCP.IN.2TIMEWT FIN/ACK
jsr SKT.GetTCB
lda #S.SOCKET.TCP.S.FINWT2
jmp SKT.StoreTCB.S
.1 jsr TCP.IN.ACKTheFIN FIN/ACK
* lda #S.TCP.OPTIONS.FIN+S.TCP.OPTIONS.ACK
jsr TCP.OUT.SendACK FIN received, Send ACK
bcs TCP.IN.JMP.TIMEWT.RTS
lda #S.SOCKET.TCP.S.LASTACK
jmp SKT.StoreTCB.S
*--------------------------------------
TCP.IN.JMP.FINWT2
ldy #S.TCP.OPTIONS only accept ACK packet
ldy #S.TCP.OPTIONS FIN sent & ACKed, awaiting FIN
lda (ZPFrameInPtr),y
bit #S.TCP.OPTIONS.ACK
bit #S.TCP.OPTIONS.FIN
beq TCP.IN.JMP.TIMEWT
jsr SKT.GetTCB
jsr TCP.IN.ACKTheFIN
TCP.IN.2TIMEWT jsr SKT.GetTCB
jsr TCP.OUT.SendACK FIN received, Send ACK
ldx #3
.1 inc SKT.Cache+S.SOCKET.TCP.INSEQNUM,x
bne .2
dex
bpl .1
.2 ldx #3
.3 inc SKT.Cache+S.SOCKET.TCP.OUTNEXTSEQ,x
bne .4
dex
bpl .3
.4 jsr TCP.OUT.SendACK FIN received, Send ACK
bcs TCP.IN.JMP.TIMEWT.RTS
lda #S.SOCKET.TCP.S.CLOSING
lda #S.SOCKET.TCP.S.TIMEWT
jmp SKT.StoreTCB.S
*--------------------------------------
TCP.IN.JMP.CLOSING
* Wait for SKT.Shutdown
* ldy #S.TCP.OPTIONS only accept ACK packet
* lda (ZPFrameInPtr),y
* bit #S.TCP.OPTIONS.ACK
* beq .1
* ldy #S.SOCKET.TCP.S
* lda #S.SOCKET.TCP.S.TIMEWT
* sta (ZPPtrSKT),y
*.1
* clc
* rts
*--------------------------------------
* Wait for SKT.Shutdown
TCP.IN.JMP.TIMEWT
clc Wait for TCP.SendClose
TCP.IN.JMP.TIMEWT.RTS
@ -353,17 +344,6 @@ TCP.IN.ACKTheSYN
rts
*--------------------------------------
TCP.IN.ACKTheFIN
ldx #3
.1 inc SKT.Cache+S.SOCKET.TCP.INSEQNUM,x
bne .8
dex
bpl .1
.8 rts
*--------------------------------------
TCP.IN.SetDataInPtrAndLen
ldy #S.IP.TOTAL.LENGTH+1
lda (ZPFrameInPtr),y
@ -508,6 +488,7 @@ TCP.OUT lda SKT.Cache+S.SOCKET.TCP.OUTTOSEND+1
ldy #S.SOCKET.TCP.O
lda (ZPPtrSKT),y
bne TCP.OUT.SendOptA a least an option...
clc No data, no flag....exit
.9 rts

View File

@ -34,22 +34,25 @@ printf("i=%D\r\n", i);
int main(int argc, char *argv[]) {
printf("argc=%D\r\n", argc);
int r=testf1();
printf("testf1() returned %D\r\n", r);
getchar();
r=testf2();
printf("testf2() returned %D\r\n", r);
getchar();
testf3("testf3() void function...");
getchar();
i = testf4(34, 43);
printf("testf4() returned %D\r\n", i);
getchar();
printf("main() argc=%D\r\n", argc);
for(int i=0; i<=argc; i++) {
printf(" argv[%I] : %s\r\n", i, argv[i]);
}
int r=testf1();
printf("testf1() returned %D\r\n", r);
r=testf2();
printf("testf2() returned %D\r\n", r);
testf3("testf3() void function...");
i = testf4(34, 43);
printf("testf4() returned %D\r\n", i);
puts("set main() return code=0x73");
return 115; // return E_INUM
}
MAN
TEXT root/ctest/testargs.c

View File

@ -442,7 +442,7 @@ CHECK.DIGIT.OR.LETTER
JSR CHECK.DIGIT
BCS CHECKS.OK
CHECK.LETTER
CMP #'_' allow underline in symbols too
CMP #'_ allow underline in symbols too
BEQ CHECKS.OK
CMP #'A
BCC CHECKS.NOT.OK