A2osX/SBIN/TCPIP.S.DNS.txt

51 lines
848 B
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

PR#3
PREFIX /A2OSX.SRC
NEW
INC 1
AUTO 6
.LIST OFF
*--------------------------------------
DNSListener ldy #S.DNS.F+1
lda (ZPFrameBase1),y
and /S.DNS.F.QR
beq .9
ldy #S.DNS.ANCOUNT+1
lda (ZPFrameBase1),y
beq .9
ldy #S.DNS.QDCOUNT+1
lda (ZPFrameBase1),y
tax
beq .3 no QUERY to skip
ldy #S.DNS Read query
.1 lda (ZPFrameBase1),y
beq .2
iny
bne .1
.2 tya
clc
adc #4 Skip QTYPE & QCLASS
tay
dex skip another QUERY ?
bne .1
.3 iny skip high byte of offset
iny skip lo byte of offset
clc
rts
.9 sec
rts
*--------------------------------------
*--------------------------------------
MAN
SAVE SBIN/TCPIP.S.DNS
LOAD SBIN/TCPIP.S
ASM