macro dummy [arg]{
common
local ..StrTbl,..Strings
virtual at 0
..StrTbl::
end virtual
virtual at 0
..Strings::
end virtual
macro def_astring labl,[string] \{
\common
\local ..offs,sz
virtual ..Strings
..offs db string,0
sz = $-..offs
virtual ..StrTbl
labl\#id = $/8
dd labl\#id
dw ..offs,sz
end virtual
end virtual \}
forward
local ..arg
def_astring ..arg,arg
common
local count,x,y,z,v1,v2,str1,str2
virtual ..StrTbl
count = $/8
end virtual
x = count shr 1
while x > 0
y = x
while y < count
z = y
while z-x >= 0
load str1 word from ..StrTbl:(z*8+4)
load str2 word from ..StrTbl:((z-x)*8+4)
v1 = str1
while v1 > 0
load v1 byte from ..Strings:(str1+%-1)
load v2 byte from ..Strings:(str2+%-1)
if v1 <> v2
break
end if
end while
if v2>v1
break
else
load v2 dword from ..StrTbl:((z-x)*8)
if v1<v2
load v1 dword from ..StrTbl:(z*8)
store dword v1 at ..StrTbl:((z-x)*8)
end if
store dword v2 at ..StrTbl:(z*8)
load v2 word from ..StrTbl:((z-x)*8+4)
if v1<v2
load v1 word from ..StrTbl:(z*8+4)
store word v1 at ..StrTbl:((z-x)*8+4)
end if
store word v2 at ..StrTbl:(z*8+4)
load v2 word from ..StrTbl:((z-x)*8+6)
if v1<v2
load v1 word from ..StrTbl:(z*8+6)
store word v1 at ..StrTbl:((z-x)*8+6)
end if
store word v2 at ..StrTbl:(z*8+6)
end if
z = z-x
end while
y = y+1
end while
x = x shr 1
end while
repeat count
load v1 dword from ..StrTbl:((%-1)*8)
forward
if ..arg#_id = v1
label ..arg at $
common
load str1 word from ..StrTbl:((%-1)*8+4)
load v1 word from ..StrTbl:((%-1)*8+6)
v2=v1 shr 3
repeat v1 shr 3
load v2 qword from ..Strings:(str1+(%-1)*8)
dq v2
end repeat
repeat v1 and 7
load v2 dword from ..Strings:(str1+(v1 and (-8))+%-1)
db v2
end repeat
end repeat }