mirror of
https://github.com/ksherlock/tcpsnooper.git
synced 2025-01-10 16:29:50 +00:00
248 lines
3.0 KiB
Plaintext
248 lines
3.0 KiB
Plaintext
MACRO
|
|
&lab _DisposeHandle
|
|
&lab ldx #$1002
|
|
jsl $E10000
|
|
MEND
|
|
MACRO
|
|
&lab _MMStartUp
|
|
&lab ldx #$0202
|
|
jsl $E10000
|
|
MEND
|
|
MACRO
|
|
&lab _GetInGlobals
|
|
&lab ldx #$0C0C
|
|
jsl $E10000
|
|
MEND
|
|
MACRO
|
|
&lab _GetInputDevice
|
|
&lab ldx #$120C
|
|
jsl $E10000
|
|
MEND
|
|
MACRO
|
|
&lab _GetOutGlobals
|
|
&lab ldx #$0D0C
|
|
jsl $E10000
|
|
MEND
|
|
MACRO
|
|
&lab _GetOutputDevice
|
|
&lab ldx #$130C
|
|
jsl $E10000
|
|
MEND
|
|
MACRO
|
|
&lab _SetInGlobals
|
|
&lab ldx #$090C
|
|
jsl $E10000
|
|
MEND
|
|
MACRO
|
|
&lab _SetInputDevice
|
|
&lab ldx #$0F0C
|
|
jsl $E10000
|
|
MEND
|
|
MACRO
|
|
&lab _SetOutGlobals
|
|
&lab ldx #$0A0C
|
|
jsl $E10000
|
|
MEND
|
|
MACRO
|
|
&lab _SetOutputDevice
|
|
&lab ldx #$100C
|
|
jsl $E10000
|
|
MEND
|
|
MACRO
|
|
&lab _EMStatus
|
|
&lab ldx #$0606
|
|
jsl $E10000
|
|
MEND
|
|
macro
|
|
&l ~GetNextEvent &p1,&p2
|
|
&l ph2 &p1
|
|
ph4 &p2
|
|
ldx #$0A06
|
|
jsl $E10000
|
|
mend
|
|
macro
|
|
&l ~NewHandle &p1,&p2,&p3,&p4
|
|
&l ph4 &p1
|
|
ph2 &p2
|
|
ph2 &p3
|
|
ph4 &p4
|
|
ldx #$0902
|
|
jsl $E10000
|
|
mend
|
|
macro
|
|
&l ~InitTextDev &p1
|
|
&l ph2 &p1
|
|
ldx #$150C
|
|
jsl $E10000
|
|
mend
|
|
macro
|
|
&l ~SetInGlobals &p1,&p2
|
|
&l ph2 &p1
|
|
ph2 &p2
|
|
ldx #$090C
|
|
jsl $E10000
|
|
mend
|
|
macro
|
|
&l ~SetInputDevice &p1,&p2
|
|
&l ph2 &p1
|
|
ph4 &p2
|
|
ldx #$0F0C
|
|
jsl $E10000
|
|
mend
|
|
macro
|
|
&l ~SetOutGlobals &p1,&p2
|
|
&l ph2 &p1
|
|
ph2 &p2
|
|
ldx #$0A0C
|
|
jsl $E10000
|
|
mend
|
|
macro
|
|
&l ~SetOutputDevice &p1,&p2
|
|
&l ph2 &p1
|
|
ph4 &p2
|
|
ldx #$100C
|
|
jsl $E10000
|
|
mend
|
|
macro
|
|
&l ~WriteChar &p1
|
|
&l ph2 &p1
|
|
ldx #$180C
|
|
jsl $E10000
|
|
mend
|
|
macro
|
|
&l dw &adr
|
|
&l dc i1"l:~&SYSNAME&SYSCNT"
|
|
~&SYSNAME&SYSCNT dc c"&adr"
|
|
mend
|
|
macro
|
|
&l long &a,&b
|
|
lclb &i
|
|
lclb &m
|
|
&a amid &a,1,1
|
|
&m setb ("&a"="M").or.("&a"="m")
|
|
&i setb ("&a"="I").or.("&a"="i")
|
|
aif c:&b=0,.a
|
|
&b amid &b,1,1
|
|
&m setb ("&b"="M").or.("&b"="m").or.&m
|
|
&i setb ("&b"="I").or.("&b"="i").or.&i
|
|
.a
|
|
&l rep #&m*32+&i*16
|
|
aif .not.&m,.b
|
|
longa on
|
|
.b
|
|
aif .not.&i,.c
|
|
longi on
|
|
.c
|
|
mend
|
|
macro
|
|
&l ph2 &n1
|
|
&l anop
|
|
aif "&n1"="*",.f
|
|
lclc &c
|
|
&c amid &n1,1,1
|
|
aif "&c"="#",.d
|
|
aif s:longa=1,.a
|
|
rep #%00100000
|
|
.a
|
|
aif "&c"<>"{",.b
|
|
&c amid &n1,l:&n1,1
|
|
aif "&c"<>"}",.g
|
|
&n1 amid &n1,2,l:&n1-2
|
|
lda (&n1)
|
|
pha
|
|
ago .e
|
|
.b
|
|
aif "&c"="<",.c
|
|
lda &n1
|
|
pha
|
|
ago .e
|
|
.c
|
|
&n1 amid &n1,2,l:&n1-1
|
|
pei &n1
|
|
ago .e
|
|
.d
|
|
&n1 amid &n1,2,l:&n1-1
|
|
pea &n1
|
|
ago .f
|
|
.e
|
|
aif s:longa=1,.f
|
|
sep #%00100000
|
|
.f
|
|
mexit
|
|
.g
|
|
mnote "Missing closing '}'",16
|
|
mend
|
|
macro
|
|
&l ph4 &n1
|
|
&l anop
|
|
aif "&n1"="*",.f
|
|
lclc &c
|
|
&c amid &n1,1,1
|
|
aif "&c"="#",.d
|
|
aif s:longa=1,.a
|
|
rep #%00100000
|
|
.a
|
|
aif "&c"<>"{",.b
|
|
&c amid &n1,l:&n1,1
|
|
aif "&c"<>"}",.g
|
|
&n1 amid &n1,2,l:&n1-2
|
|
ldy #2
|
|
lda (&n1),y
|
|
pha
|
|
lda (&n1)
|
|
pha
|
|
ago .e
|
|
.b
|
|
aif "&c"<>"[",.c
|
|
ldy #2
|
|
lda &n1,y
|
|
pha
|
|
lda &n1
|
|
pha
|
|
ago .e
|
|
.c
|
|
aif "&c"<>"<",.c1
|
|
&n1 amid &n1,2,l:&n1-1
|
|
pei &n1+2
|
|
pei &n1
|
|
ago .e
|
|
.c1
|
|
lda &n1+2
|
|
pha
|
|
lda &n1
|
|
pha
|
|
ago .e
|
|
.d
|
|
&n1 amid &n1,2,l:&n1-1
|
|
pea +(&n1)|-16
|
|
pea &n1
|
|
ago .f
|
|
.e
|
|
aif s:longa=1,.f
|
|
sep #%00100000
|
|
.f
|
|
mexit
|
|
.g
|
|
mnote "Missing closing '}'",16
|
|
mend
|
|
macro
|
|
&l short &a,&b
|
|
lclb &i
|
|
lclb &m
|
|
&a amid &a,1,1
|
|
&m setb ("&a"="M").or.("&a"="m")
|
|
&i setb ("&a"="I").or.("&a"="i")
|
|
aif c:&b=0,.a
|
|
&b amid &b,1,1
|
|
&m setb ("&b"="M").or.("&b"="m").or.&m
|
|
&i setb ("&b"="I").or.("&b"="i").or.&i
|
|
.a
|
|
&l sep #&m*32+&i*16
|
|
aif .not.&m,.b
|
|
longa off
|
|
.b
|
|
aif .not.&i,.c
|
|
longi off
|
|
.c
|
|
mend
|