2015-03-14 21:47:37 +00:00
|
|
|
|
PR#3
|
2017-03-29 15:48:15 +00:00
|
|
|
|
PREFIX /A2OSX.BUILD
|
2015-03-14 21:47:37 +00:00
|
|
|
|
NEW
|
|
|
|
|
INC 1
|
|
|
|
|
AUTO 6
|
|
|
|
|
.LIST OFF
|
|
|
|
|
.OP 65C02
|
|
|
|
|
.OR $2000
|
2017-03-29 15:48:15 +00:00
|
|
|
|
.TF /A2OSX.BUILD/BIN/PING
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
2017-03-29 15:48:15 +00:00
|
|
|
|
.INB /A2OSX.BUILD/INC/MACROS.I
|
|
|
|
|
.INB /A2OSX.BUILD/INC/A2OSX.I
|
|
|
|
|
.INB /A2OSX.BUILD/INC/LIBTCPIP.I
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
2016-04-04 20:54:55 +00:00
|
|
|
|
TIMEOUT.MAX .EQ 20 2 sec.
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
2017-01-30 16:30:39 +00:00
|
|
|
|
ZPFrameBase .EQ ZPBIN
|
2017-01-29 21:47:19 +00:00
|
|
|
|
ZPFrameLen .EQ ZPBIN+2
|
2015-03-14 21:47:37 +00:00
|
|
|
|
ZPFramePtr1 .EQ ZPBIN+4
|
2015-11-22 22:30:06 +00:00
|
|
|
|
ZPIPCfgPtr .EQ ZPBIN+6
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
2015-06-03 18:30:57 +00:00
|
|
|
|
* File Header (16 Bytes)
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.START cld
|
|
|
|
|
jmp (.1,x)
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.DA #$61 6502,Level 1 (65c02)
|
|
|
|
|
.DA #1 BIN Layout Version 1
|
|
|
|
|
.DA 0
|
|
|
|
|
.DA CS.END-CS.START Code Length To Relocate
|
|
|
|
|
.DA DS.END-DS.START Data Segment to Allocate
|
|
|
|
|
.DA 0
|
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
2015-03-14 21:47:37 +00:00
|
|
|
|
.1 .DA CS.INIT
|
|
|
|
|
.DA CS.RUN
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.DA CS.DOEVENT
|
2015-03-14 21:47:37 +00:00
|
|
|
|
.DA CS.QUIT
|
|
|
|
|
L.LIBTCPIP .DA LIBTCPIP
|
2017-01-30 16:30:39 +00:00
|
|
|
|
L.Socket .DA Socket
|
2017-01-30 22:23:16 +00:00
|
|
|
|
L.ICMP.Request .DA ICMP.Request
|
2017-01-30 16:30:39 +00:00
|
|
|
|
L.MSG.IPKO .DA MSG.IPKO
|
|
|
|
|
L.MSG.USAGE .DA MSG.USAGE
|
|
|
|
|
L.MSG.UNKNOWN .DA MSG.UNKNOWN
|
|
|
|
|
L.MSG.HOSTOK .DA MSG.HOSTOK
|
2017-01-30 22:23:16 +00:00
|
|
|
|
L.MSG.SKTKO .DA MSG.SKTKO
|
|
|
|
|
L.MSG.REPLY .DA MSG.REPLY
|
|
|
|
|
L.MSG.UNREACH .DA MSG.UNREACH
|
2015-03-14 21:47:37 +00:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
2017-01-30 16:30:39 +00:00
|
|
|
|
CS.INIT >LDYA L.LIBTCPIP
|
2016-10-24 15:54:43 +00:00
|
|
|
|
>SYSCALL LoadLibYA
|
2015-03-14 21:47:37 +00:00
|
|
|
|
bcs .9
|
2017-01-30 16:30:39 +00:00
|
|
|
|
sta hLIBTCPIP
|
2015-03-14 21:47:37 +00:00
|
|
|
|
|
2015-06-03 18:30:57 +00:00
|
|
|
|
lda (pPs)
|
2015-03-14 21:47:37 +00:00
|
|
|
|
ora #S.PS.F.EVENT Now accept events
|
2015-06-03 18:30:57 +00:00
|
|
|
|
sta (pPs)
|
2017-01-30 16:30:39 +00:00
|
|
|
|
|
2015-03-14 21:47:37 +00:00
|
|
|
|
clc
|
2017-01-30 16:30:39 +00:00
|
|
|
|
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN >LIBCALL hLIBTCPIP,LIBTCPIP.GET.IPCFG is TCPIP loaded ?
|
|
|
|
|
>STYA ZPIPCfgPtr
|
|
|
|
|
|
|
|
|
|
lda (ZPIPCfgPtr) Configured ?
|
|
|
|
|
bmi CS.RUN.IPOK
|
2015-03-14 21:47:37 +00:00
|
|
|
|
|
2017-01-30 16:30:39 +00:00
|
|
|
|
>LDYA L.MSG.IPKO
|
2017-08-25 15:02:16 +00:00
|
|
|
|
>SYSCALL PrintF.YA
|
2017-01-30 16:30:39 +00:00
|
|
|
|
lda #SYSMGR.ERRSYN
|
|
|
|
|
sec
|
2017-01-29 21:47:19 +00:00
|
|
|
|
rts
|
2017-01-30 21:03:12 +00:00
|
|
|
|
|
2017-01-30 16:30:39 +00:00
|
|
|
|
CS.RUN.IPOK >SYSCALL GetArgC
|
|
|
|
|
cmp #1
|
|
|
|
|
beq .9
|
|
|
|
|
|
|
|
|
|
jsr Init.Timeout
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2017-01-30 16:30:39 +00:00
|
|
|
|
.2 >PUSHW pData DST.IP
|
2016-08-17 06:25:58 +00:00
|
|
|
|
lda #1
|
2017-08-24 12:46:48 +00:00
|
|
|
|
>SYSCALL GetArg.A
|
2015-09-13 20:35:07 +00:00
|
|
|
|
>PUSHYA
|
2016-03-13 21:51:50 +00:00
|
|
|
|
>LIBCALL hLIBTCPIP,LIBTCPIP.HST.GETBYNAME
|
2017-01-30 16:30:39 +00:00
|
|
|
|
bcc CS.RUN.HOSTOK
|
2016-10-24 15:54:43 +00:00
|
|
|
|
>SYSCALL Sleep
|
2016-03-13 21:51:50 +00:00
|
|
|
|
jsr Wait.Timeout
|
2017-01-30 16:30:39 +00:00
|
|
|
|
bcc .2
|
|
|
|
|
|
2016-08-17 06:25:58 +00:00
|
|
|
|
lda #1
|
2017-08-24 12:46:48 +00:00
|
|
|
|
>SYSCALL GetArg.A
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHYA
|
2017-01-30 16:30:39 +00:00
|
|
|
|
>LDYA L.MSG.UNKNOWN
|
|
|
|
|
bra .99
|
|
|
|
|
|
|
|
|
|
.9 >LDYA L.MSG.USAGE
|
2017-08-25 15:02:16 +00:00
|
|
|
|
.99 >SYSCALL PrintF.YA
|
2017-01-30 16:30:39 +00:00
|
|
|
|
lda #SYSMGR.ERRSYN
|
|
|
|
|
sec
|
2016-03-13 21:51:50 +00:00
|
|
|
|
rts
|
2017-01-30 21:03:12 +00:00
|
|
|
|
|
2017-01-30 16:30:39 +00:00
|
|
|
|
CS.RUN.HOSTOK lda #1
|
2017-08-24 12:46:48 +00:00
|
|
|
|
>SYSCALL GetArg.A
|
2015-03-14 21:47:37 +00:00
|
|
|
|
>PUSHYA
|
2016-03-13 21:51:50 +00:00
|
|
|
|
|
2017-01-30 16:30:39 +00:00
|
|
|
|
ldy #DST.IP+3
|
2017-01-30 22:23:16 +00:00
|
|
|
|
ldx #3
|
|
|
|
|
|
|
|
|
|
.1 lda (pData),y
|
|
|
|
|
sta Socket.Dst.Addr,x
|
|
|
|
|
>PUSHA
|
2017-01-30 16:30:39 +00:00
|
|
|
|
dey
|
2017-01-30 22:23:16 +00:00
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
2017-01-30 16:30:39 +00:00
|
|
|
|
|
|
|
|
|
>LDYA L.MSG.HOSTOK
|
2017-08-25 15:02:16 +00:00
|
|
|
|
>SYSCALL PrintF.YA
|
2015-03-14 21:47:37 +00:00
|
|
|
|
|
2017-01-30 21:03:12 +00:00
|
|
|
|
CS.RUN.OPENSKT ldx #3
|
2017-01-30 16:30:39 +00:00
|
|
|
|
ldy #S.IPCFG.IP+3
|
2017-01-30 21:03:12 +00:00
|
|
|
|
|
2017-01-30 16:30:39 +00:00
|
|
|
|
.1 lda (ZPIPCfgPtr),y
|
|
|
|
|
sta Socket.Src.Addr,x
|
2015-03-14 21:47:37 +00:00
|
|
|
|
dey
|
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
|
|
|
|
|
2017-01-30 22:23:16 +00:00
|
|
|
|
ldy #Identifier
|
2017-01-30 16:30:39 +00:00
|
|
|
|
lda A2OSX.RANDOM16
|
2017-01-31 22:13:26 +00:00
|
|
|
|
sta Socket.Dst.Port
|
2017-01-30 22:23:16 +00:00
|
|
|
|
sta (pData),y
|
|
|
|
|
iny
|
2017-01-30 16:30:39 +00:00
|
|
|
|
lda A2OSX.RANDOM16+1
|
2017-01-31 22:13:26 +00:00
|
|
|
|
sta Socket.Dst.Port+1
|
2017-01-30 22:23:16 +00:00
|
|
|
|
sta (pData),y
|
|
|
|
|
|
2017-01-30 16:30:39 +00:00
|
|
|
|
>PUSHW L.Socket
|
2017-02-15 21:46:21 +00:00
|
|
|
|
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.New
|
2017-01-30 22:23:16 +00:00
|
|
|
|
bcc .2
|
|
|
|
|
|
|
|
|
|
>LDYA L.MSG.SKTKO
|
2017-08-25 15:02:16 +00:00
|
|
|
|
>SYSCALL PrintF.YA
|
2017-01-30 22:23:16 +00:00
|
|
|
|
lda #SYSMGR.ERRSYN
|
|
|
|
|
sec
|
|
|
|
|
rts
|
2017-01-30 16:30:39 +00:00
|
|
|
|
|
2017-01-30 22:23:16 +00:00
|
|
|
|
.2 txa
|
2017-01-30 16:30:39 +00:00
|
|
|
|
ldy #hSocket
|
|
|
|
|
sta (pData),y
|
2017-01-30 22:23:16 +00:00
|
|
|
|
|
|
|
|
|
CS.RUN.SEND.ECHO
|
2015-06-03 18:30:57 +00:00
|
|
|
|
ldy #Identifier
|
|
|
|
|
lda (pData),y
|
2017-01-30 22:23:16 +00:00
|
|
|
|
sta ICMP.Request.ID
|
2015-03-14 21:47:37 +00:00
|
|
|
|
iny
|
2015-06-03 18:30:57 +00:00
|
|
|
|
lda (pData),y
|
2017-01-30 22:23:16 +00:00
|
|
|
|
sta ICMP.Request.ID+1
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2017-02-01 21:21:46 +00:00
|
|
|
|
ldy #Sequence
|
|
|
|
|
sec
|
|
|
|
|
lda (pData),y
|
|
|
|
|
adc #0
|
|
|
|
|
sta (pData),y
|
|
|
|
|
sta ICMP.Request.SQ
|
|
|
|
|
|
|
|
|
|
iny
|
|
|
|
|
lda (pData),y
|
|
|
|
|
adc #0
|
|
|
|
|
sta (pData),y
|
|
|
|
|
sta ICMP.Request.SQ+1
|
|
|
|
|
|
2016-03-13 21:51:50 +00:00
|
|
|
|
jsr Init.Timeout
|
|
|
|
|
|
2017-01-30 22:23:16 +00:00
|
|
|
|
ldy #hSocket
|
2017-01-30 21:03:12 +00:00
|
|
|
|
>PUSHB (pData),y
|
2017-02-13 07:26:18 +00:00
|
|
|
|
>PUSHW L.ICMP.Request
|
|
|
|
|
>PUSHWI ICMP.RequestLen
|
|
|
|
|
|
2017-02-15 16:14:41 +00:00
|
|
|
|
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.Write
|
2017-01-30 22:23:16 +00:00
|
|
|
|
bcs CS.RUN.ERR
|
2016-03-13 21:51:50 +00:00
|
|
|
|
|
|
|
|
|
jsr Init.Timeout
|
2015-03-14 21:47:37 +00:00
|
|
|
|
|
2017-01-30 21:03:12 +00:00
|
|
|
|
CS.RUN.WAIT.REPLY
|
|
|
|
|
>SYSCALL Sleep
|
2017-01-30 22:23:16 +00:00
|
|
|
|
>SYSCALL GetC
|
2017-01-30 21:03:12 +00:00
|
|
|
|
bcs .1
|
|
|
|
|
cmp #3 Ctrl-C
|
|
|
|
|
beq .9
|
|
|
|
|
|
|
|
|
|
.1 ldy #hSocket
|
2015-06-03 18:30:57 +00:00
|
|
|
|
lda (pData),y
|
2017-02-15 16:14:41 +00:00
|
|
|
|
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.ReadA
|
2017-01-30 21:03:12 +00:00
|
|
|
|
bcs .2
|
2016-03-13 21:51:50 +00:00
|
|
|
|
|
2017-01-30 21:03:12 +00:00
|
|
|
|
ldy #hFrame
|
|
|
|
|
sta (pData),y
|
2017-08-25 06:37:21 +00:00
|
|
|
|
>SYSCALL GetMemPtr.A
|
2017-01-30 21:03:12 +00:00
|
|
|
|
>STYA ZPFrameBase
|
|
|
|
|
jsr CS.Print.REPLY
|
2017-01-30 22:23:16 +00:00
|
|
|
|
bcs CS.RUN.ERR
|
|
|
|
|
|
2017-02-01 21:21:46 +00:00
|
|
|
|
ldy #hFrame
|
|
|
|
|
lda (pData),y
|
2017-08-25 06:37:21 +00:00
|
|
|
|
>SYSCALL FreeMem.A
|
2017-02-01 21:21:46 +00:00
|
|
|
|
|
|
|
|
|
ldy #hFrame
|
|
|
|
|
lda #0
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
|
|
|
|
jmp CS.RUN.SEND.ECHO
|
2017-01-30 21:03:12 +00:00
|
|
|
|
|
|
|
|
|
.2 jsr Wait.Timeout
|
|
|
|
|
bcc CS.RUN.WAIT.REPLY
|
2015-03-14 21:47:37 +00:00
|
|
|
|
|
2017-01-30 22:23:16 +00:00
|
|
|
|
jsr CS.Print.UNREACH
|
|
|
|
|
bcs CS.RUN.ERR
|
2015-03-14 21:47:37 +00:00
|
|
|
|
|
2017-02-01 21:21:46 +00:00
|
|
|
|
jmp CS.RUN.SEND.ECHO
|
2015-03-14 21:47:37 +00:00
|
|
|
|
|
2017-01-30 21:03:12 +00:00
|
|
|
|
.9 lda #0
|
|
|
|
|
sec
|
2017-01-30 22:23:16 +00:00
|
|
|
|
CS.RUN.ERR rts
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
2015-06-03 18:30:57 +00:00
|
|
|
|
CS.DOEVENT lda (pEvent)
|
2017-01-30 22:23:16 +00:00
|
|
|
|
bpl .9 is it a TIMER event?
|
2016-03-13 21:51:50 +00:00
|
|
|
|
|
2015-06-03 18:30:57 +00:00
|
|
|
|
ldy #TimeOut
|
|
|
|
|
lda (pData),y
|
2016-03-13 21:51:50 +00:00
|
|
|
|
beq .9
|
2015-03-14 21:47:37 +00:00
|
|
|
|
|
2016-03-13 21:51:50 +00:00
|
|
|
|
dec
|
2015-06-03 18:30:57 +00:00
|
|
|
|
sta (pData),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
|
2017-01-30 16:30:39 +00:00
|
|
|
|
.9 sec do not discard TIMER event
|
2015-03-14 21:47:37 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-01-30 22:23:16 +00:00
|
|
|
|
CS.Print.UNREACH
|
|
|
|
|
ldy #DST.IP+3
|
|
|
|
|
>PUSHB (pData),y DST.IP+3
|
|
|
|
|
dey
|
|
|
|
|
>PUSHB (pData),y DST.IP+2
|
|
|
|
|
dey
|
|
|
|
|
>PUSHB (pData),y DST.IP+1
|
|
|
|
|
dey
|
|
|
|
|
>PUSHB (pData),y DST.IP
|
|
|
|
|
>LDYA L.MSG.UNREACH
|
2017-08-25 15:02:16 +00:00
|
|
|
|
>SYSCALL PrintF.YA
|
2017-01-30 22:23:16 +00:00
|
|
|
|
rts
|
2017-01-30 21:03:12 +00:00
|
|
|
|
*--------------------------------------
|
2017-01-30 16:30:39 +00:00
|
|
|
|
CS.Print.REPLY lda #TIMEOUT.MAX
|
2015-03-14 21:47:37 +00:00
|
|
|
|
sec
|
2016-03-13 21:51:50 +00:00
|
|
|
|
ldy #TimeOut
|
|
|
|
|
sbc (pData),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
|
|
|
|
|
stz TimeOut.ms
|
|
|
|
|
stz TimeOut.ms+1
|
|
|
|
|
|
|
|
|
|
tay
|
|
|
|
|
beq .3
|
|
|
|
|
|
|
|
|
|
.1 lda TimeOut.ms
|
|
|
|
|
clc
|
2016-03-13 21:51:50 +00:00
|
|
|
|
adc #100
|
2015-03-14 21:47:37 +00:00
|
|
|
|
sta TimeOut.ms
|
|
|
|
|
bcc .2
|
2015-06-03 18:30:57 +00:00
|
|
|
|
inc TimeOut
|
2015-03-14 21:47:37 +00:00
|
|
|
|
.2 dey
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
.3 >PUSHW TimeOut.ms
|
|
|
|
|
ldy #S.IP.TTL
|
2017-01-29 21:47:19 +00:00
|
|
|
|
>PUSHB (ZPFrameBase),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.ICMP.SEQUENCE+1
|
2017-01-29 21:47:19 +00:00
|
|
|
|
>PUSHB (ZPFrameBase),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
dey
|
2017-01-29 21:47:19 +00:00
|
|
|
|
>PUSHB (ZPFrameBase),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.IP.SRC+3
|
2017-01-29 21:47:19 +00:00
|
|
|
|
>PUSHB (ZPFrameBase),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
dey
|
2017-01-29 21:47:19 +00:00
|
|
|
|
>PUSHB (ZPFrameBase),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
dey
|
2017-01-29 21:47:19 +00:00
|
|
|
|
>PUSHB (ZPFrameBase),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
dey
|
2017-01-29 21:47:19 +00:00
|
|
|
|
>PUSHB (ZPFrameBase),y
|
2015-03-14 21:47:37 +00:00
|
|
|
|
|
2017-01-30 21:03:12 +00:00
|
|
|
|
>LDYA L.MSG.REPLY
|
2017-08-25 15:02:16 +00:00
|
|
|
|
>SYSCALL PrintF.YA
|
2015-03-14 21:47:37 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-02-01 21:21:46 +00:00
|
|
|
|
CS.QUIT ldy #hFrame
|
|
|
|
|
lda (pData),y
|
|
|
|
|
beq .1
|
|
|
|
|
|
2017-08-25 06:37:21 +00:00
|
|
|
|
>SYSCALL FreeMem.A
|
2017-02-01 21:21:46 +00:00
|
|
|
|
|
|
|
|
|
.1 ldy #hSocket
|
2017-01-30 22:23:16 +00:00
|
|
|
|
lda (pData),y
|
|
|
|
|
|
2017-02-01 21:21:46 +00:00
|
|
|
|
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.CLOSEA
|
2017-01-30 22:23:16 +00:00
|
|
|
|
|
2017-01-31 22:13:26 +00:00
|
|
|
|
lda hLIBTCPIP
|
2016-10-24 15:54:43 +00:00
|
|
|
|
>SYSCALL UnloadLibA
|
2015-03-14 21:47:37 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-03-13 21:51:50 +00:00
|
|
|
|
Init.Timeout ldy #TimeOut
|
|
|
|
|
lda #TIMEOUT.MAX
|
|
|
|
|
sta (pData),y
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Wait.TimeOut sec
|
|
|
|
|
ldy #TimeOut
|
|
|
|
|
lda (pData),y
|
|
|
|
|
beq .9
|
2017-01-29 21:47:19 +00:00
|
|
|
|
|
2016-03-13 21:51:50 +00:00
|
|
|
|
clc
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2015-03-14 21:47:37 +00:00
|
|
|
|
CS.END
|
2016-10-24 15:54:43 +00:00
|
|
|
|
LIBTCPIP >PSTR "libtcpip.o"
|
2017-02-28 16:58:36 +00:00
|
|
|
|
MSG.IPKO >CSTR "TCP/IP Not Loaded/Configured.\r\n"
|
|
|
|
|
MSG.USAGE >CSTR "Usage : PING <ip|host>\r\n"
|
|
|
|
|
MSG.UNKNOWN >CSTR "%S: Unknown host\r\n"
|
|
|
|
|
MSG.HOSTOK >CSTR "PING %d.%d.%d.%d (%S)\r\n"
|
|
|
|
|
MSG.SKTKO >CSTR "Failed to Open Socket.\r\n"
|
|
|
|
|
MSG.UNREACH >CSTR "%d.%d.%d.%d: TimeOut/Host unreachable\r\n"
|
|
|
|
|
MSG.REPLY >CSTR "32 bytes from %d.%d.%d.%d, icmp_seq=%D, ttl=%d, time=%D ms\r\n"
|
2015-03-14 21:47:37 +00:00
|
|
|
|
hLIBTCPIP .BS 1
|
2015-06-03 18:30:57 +00:00
|
|
|
|
TimeOut.ms .BS 2
|
2017-01-30 16:30:39 +00:00
|
|
|
|
Socket .DA #S.SOCKET.SOCK.RAW
|
2017-02-08 06:52:30 +00:00
|
|
|
|
.BS 1
|
2017-01-30 22:23:16 +00:00
|
|
|
|
.DA #S.IP.PROTOCOL.ICMP
|
2017-02-08 06:52:30 +00:00
|
|
|
|
.BS 1
|
2017-01-30 16:30:39 +00:00
|
|
|
|
Socket.Src.Addr .BS 4
|
2017-01-31 22:13:26 +00:00
|
|
|
|
Socket.Src.Port .DA 0 Dynamic
|
2017-01-30 16:30:39 +00:00
|
|
|
|
Socket.Dst.Addr .BS 4
|
2017-01-31 22:13:26 +00:00
|
|
|
|
Socket.Dst.Port .DA 0 Identifier
|
2017-01-30 16:30:39 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
ICMP.Request .DA #S.ICMP.TYPE.ECHOREQ
|
|
|
|
|
.DA #0 CODE
|
|
|
|
|
.DA 0 CHECKSUM
|
|
|
|
|
ICMP.Request.ID .BS 2
|
|
|
|
|
ICMP.Request.SQ .BS 2
|
|
|
|
|
.AS "ABCDEFGHIJKLMNOP"
|
|
|
|
|
.AS "QRSTUVWXYZ012345"
|
2017-01-31 22:13:26 +00:00
|
|
|
|
ICMP.RequestLen .EQ *-ICMP.Request
|
2015-06-03 18:30:57 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
.DUMMY
|
|
|
|
|
.OR 0
|
|
|
|
|
DS.START
|
2015-03-14 21:47:37 +00:00
|
|
|
|
DST.IP .BS 4
|
2017-01-30 22:23:16 +00:00
|
|
|
|
hSocket .BS 1
|
|
|
|
|
hFrame .BS 1
|
|
|
|
|
Identifier .BS 2
|
2015-03-14 21:47:37 +00:00
|
|
|
|
Sequence .BS 2
|
2017-01-30 16:30:39 +00:00
|
|
|
|
TimeOut .BS 1
|
2015-03-14 21:47:37 +00:00
|
|
|
|
DS.END
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.ED
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
2017-03-29 15:48:15 +00:00
|
|
|
|
SAVE /A2OSX.SRC/BIN/PING.S
|
2015-03-14 21:47:37 +00:00
|
|
|
|
ASM
|