2017-12-22 21:24:30 +00:00
|
|
|
|
NEW
|
2017-03-29 15:48:15 +00:00
|
|
|
|
PREFIX /A2OSX.BUILD
|
2017-12-22 21:24:30 +00:00
|
|
|
|
AUTO 4,1
|
2016-03-13 22:09:00 +00:00
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
2017-02-15 16:14:41 +00:00
|
|
|
|
HST.GetByName >PULLW ZPPtrDNS
|
2016-03-13 22:09:00 +00:00
|
|
|
|
>PULLW ZPPtrIP
|
2017-03-16 07:32:24 +00:00
|
|
|
|
|
2016-03-13 22:09:00 +00:00
|
|
|
|
jsr HST.ScanIP
|
2016-03-20 22:16:01 +00:00
|
|
|
|
bcc .9
|
|
|
|
|
jmp DNS.QUERY.I
|
2016-03-13 22:09:00 +00:00
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2017-02-15 16:14:41 +00:00
|
|
|
|
HST.GetByAddr >PULLW ZPPtrIP
|
2016-03-13 22:09:00 +00:00
|
|
|
|
>PULLW ZPPtrDNS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
HST.ScanIP stz HST.IP
|
|
|
|
|
|
|
|
|
|
lda (ZPPtrDNS)
|
|
|
|
|
beq .9
|
|
|
|
|
|
2018-01-16 07:32:11 +00:00
|
|
|
|
ldy #$ff
|
2016-03-13 22:09:00 +00:00
|
|
|
|
|
|
|
|
|
.1 ldx #0
|
|
|
|
|
stx HST.DecStr
|
|
|
|
|
|
2018-01-16 07:32:11 +00:00
|
|
|
|
.2 iny
|
|
|
|
|
lda (ZPPtrDNS),y
|
2016-03-13 22:09:00 +00:00
|
|
|
|
beq .4
|
|
|
|
|
|
|
|
|
|
cmp #'.'
|
|
|
|
|
beq .3
|
|
|
|
|
|
|
|
|
|
cmp #'0'
|
|
|
|
|
bcc .9
|
|
|
|
|
cmp #'9'+1
|
|
|
|
|
bcs .9
|
|
|
|
|
cpx #3
|
|
|
|
|
beq .9
|
|
|
|
|
inx
|
|
|
|
|
sta HST.DecStr,x
|
|
|
|
|
bra .2
|
|
|
|
|
|
|
|
|
|
.3 stx HST.DecStr
|
|
|
|
|
phy
|
|
|
|
|
jsr HST.Dec2Hex
|
|
|
|
|
ply
|
|
|
|
|
bcc .1
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.4 txa
|
|
|
|
|
beq .5
|
|
|
|
|
|
|
|
|
|
stx HST.DecStr
|
|
|
|
|
jsr HST.Dec2Hex
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
.5 ldx HST.IP
|
|
|
|
|
cpx #4
|
|
|
|
|
bne .9
|
|
|
|
|
|
|
|
|
|
ldy #3
|
|
|
|
|
.6 lda HST.IP,x
|
|
|
|
|
sta (ZPPtrIP),y
|
|
|
|
|
dex
|
|
|
|
|
dey
|
|
|
|
|
bpl .6
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.9 sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
HST.Dec2Hex ldy HST.DecStr
|
|
|
|
|
beq .9
|
|
|
|
|
|
|
|
|
|
ldx HST.IP
|
|
|
|
|
cpx #4
|
|
|
|
|
beq .9
|
|
|
|
|
inx
|
|
|
|
|
|
|
|
|
|
lda HST.DecStr+1
|
|
|
|
|
and #$0f
|
|
|
|
|
sta HST.IP,x
|
|
|
|
|
|
|
|
|
|
ldy #1
|
|
|
|
|
|
|
|
|
|
.1 cpy HST.DecStr
|
|
|
|
|
beq .8
|
|
|
|
|
iny
|
|
|
|
|
lda HST.IP,x
|
|
|
|
|
asl HST.IP,x
|
|
|
|
|
bcs .9
|
|
|
|
|
asl HST.IP,x
|
|
|
|
|
bcs .9
|
|
|
|
|
adc HST.IP,x
|
|
|
|
|
bcs .9
|
|
|
|
|
asl
|
|
|
|
|
bcs .9
|
|
|
|
|
sta HST.IP,x
|
|
|
|
|
lda HST.DecStr,y
|
|
|
|
|
and #$0f
|
|
|
|
|
adc HST.IP,x
|
|
|
|
|
sta HST.IP,x
|
|
|
|
|
bcc .1
|
|
|
|
|
.9 sec
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.8 stx HST.IP
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
2017-03-30 06:31:12 +00:00
|
|
|
|
SAVE /A2OSX.SRC/LIB/LIBTCPIP.S.HST
|
|
|
|
|
LOAD /A2OSX.SRC/LIB/LIBTCPIP.S
|
2016-03-13 22:09:00 +00:00
|
|
|
|
ASM
|