ARP:code rewrite

This commit is contained in:
Rémy GIBERT 2016-03-14 17:53:44 +01:00
parent 6dc3efd617
commit 08067f9fe5
2 changed files with 27 additions and 29 deletions

View File

@ -27,16 +27,6 @@ ARP.IN ldy #S.ARP.TPA
.9 clc Discard any other ARP frames
rts
ARP.IN.REP >LDAXI S.ARP.SHA
jsr SetFramePtr1AX
>PUSHW ZPFramePtr1
>LDAXI S.ARP.SPA
jsr SetFramePtr1AX
>PUSHW ZPFramePtr1
jsr ARP.ADD
clc
ARP.IN.RTS rts
ARP.IN.REQ ldy #S.ETH.SRCMAC+5
ldx #5
@ -56,17 +46,35 @@ ARP.IN.REQ ldy #S.ETH.SRCMAC+5
dex
bpl .2
>LDAXI S.ARP.SHA
jsr SetFramePtr1AX
>PUSHW ZPFramePtr1
>LDAXI S.ARP.SPA
jsr SetFramePtr1AX
>PUSHW ZPFramePtr1
jsr ARP.ADD
>PUSHW L.ARP.REP
ldx #DEVMGR.NET.SEND
jmp NetDevJmp
jsr NetDevJmp
ARP.IN.REP lda #S.ARP.SHA
clc
adc ZPFrameBase1
sta ZPPtrMAC
lda ZPFrameBase1+1
adc /S.ARP.SHA
sta ZPPtrMAC+1
lda #S.ARP.SPA
clc
adc ZPFrameBase1
sta ZPPtrIP
lda ZPFrameBase1+1
adc /S.ARP.SPA
sta ZPPtrIP+1
lda #S.ARPCACHE.STATUS.RESOLVED
jsr ARP.ADD.I
clc
rts
*--------------------------------------
ARP.EXPIRE
clc
rts
*--------------------------------------
* ARP.CLEAR
*--------------------------------------

View File

@ -219,16 +219,6 @@ ToLowerCaseA cmp #'A'
adc #$20
.1 rts
*--------------------------------------
* A,X = Frame PTR
*--------------------------------------
SetFramePtr1AX clc
adc ZPFrameBase1
sta ZPFramePtr1
txa
adc ZPFrameBase1+1
sta ZPFramePtr1+1
rts
*--------------------------------------
GetDynPort inc DYNPORT.LAST
bne .1
inc DYNPORT.LAST+1