mirror of
https://github.com/A2osX/A2osX.git
synced 2024-08-14 13:29:02 +00:00
51 lines
848 B
Plaintext
51 lines
848 B
Plaintext
|
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
|