Hello,
sometimes usefull definition in TASM:
struc Key
Str db 20 dup (0)
ends
defined as
KeyChain:
Key <'Load'>
Key <'SaveAAA'>
and checked in cycle:
mov edi,offset KeyChain
mov ecx,KeyCount
u1:
call OutName,edi
add edi,20
loop u1
Result - the pre-defined "Name" is easely changeable in size of 20 bytes, and size of structure is constant, and equial 20.
In fasm, the same result:
struc Key [StrD]
{
.size dd .nEnd-.Str
.Str db StrD
.nEnd:
}
KeyChain:
k_Load Key 'Load'
k_Save Key 'SaveAAA'
Result - the size pre-defined "Name" is unexpandable (or need to reserve additional space), and size of structure is not a constant.
Sometimes the Tasm method is better. Is any way to made it in fasm?
|