mirror of
https://github.com/A2osX/A2osX.git
synced 2024-10-09 14:55:05 +00:00
66 lines
1.0 KiB
Plaintext
66 lines
1.0 KiB
Plaintext
PR#3
|
||
PREFIX /A2OSX.SRC
|
||
NEW
|
||
INC 1
|
||
AUTO 6
|
||
.LIST OFF
|
||
*--------------------------------------
|
||
ICMP.IN ldy #S.ICMP.TYPE
|
||
lda (ZPFrameBase1),y
|
||
cmp #S.ICMP.TYPE.ECHOREQ
|
||
bne .9
|
||
|
||
ldy #S.IP.DST
|
||
ldx #S.IPCFG.IP
|
||
.1 lda (ZPFrameBase1),y
|
||
cmp IPCFG,x
|
||
bne .9
|
||
iny
|
||
inx
|
||
cpx #S.IPCFG.IP+4
|
||
bne .1
|
||
|
||
ldy #S.ICMP.TYPE
|
||
lda #S.ICMP.TYPE.ECHOREP
|
||
sta (ZPFrameBase1),y
|
||
|
||
ldy #S.IP.SRC+3
|
||
ldx #3
|
||
|
||
.2 lda (ZPFrameBase1),y
|
||
sta TmpIP,x
|
||
dey
|
||
dex
|
||
bpl .2
|
||
|
||
ldy #S.IP.DST+3
|
||
ldx #3
|
||
|
||
.3 lda TmpIP,x
|
||
sta (ZPFrameBase1),y
|
||
dey
|
||
dex
|
||
bpl .3
|
||
|
||
ldy #S.ETH.SRCMAC+5
|
||
ldx #5
|
||
|
||
.4 lda (ZPFrameBase1),y
|
||
sta TmpMAC,x
|
||
dey
|
||
dex
|
||
bpl .4
|
||
|
||
>PUSHW L.TmpMAC
|
||
>PUSHW L.TmpIP
|
||
jsr ARP.ADD
|
||
|
||
jmp SEND.ICMP.FRAME.I
|
||
.9 sec
|
||
rts
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE LIB/LIBTCPIP.S.ICMP
|
||
LOAD LIB/LIBTCPIP.S
|
||
ASM
|