Dear All:
We kown that struc syntax is very diffcult on FASM. So Privalov writed a "struct" macro for solution some struct paramters question. But it doesn't support the sturct needed multi paramters. So I modified it. And I think it maybe helpping for you.
Thanks the excellect working of Privalov. Please see the belowing code:
; structure definition helper
macro struct name,[Arg]
{
common
virtual at 0
if ~Arg eq
name name Arg
else
name name
end if
sizeof.#name = $ - name
name equ sizeof.#name
end virtual
}
struc Descriptor LimitL,BaseL,BaseM,Attributes,BaseH
{
.LimitL DW LimitL
.BaseL DW BaseL
.BaseM DW BaseM
.Attributes DW Attributes
.BaseH DW BaseH
}
struct Descriptor,?,?,?,?,?
struc Gate OffsetL,Selector,Dcount,Gtype,OffsetH
{
.OffsetL DW OffsetL
.Selector DW Selector
.Dcount DW Dcount
.Gtype DW Gtype
.OffsetH DW OffsetH
}
struct Gate,?,?,?,?,?
struc Pdesc LimitL,Base
{
.LimitL DW LimitL
.Base DW Base
}
struct Pdesc,?,?
struc TaskSS
{
.TRLink DW ?,0
.TRESP0 DD ?
.TRSS0 DW ?,0
.TRESP1 DD ?
.TRSS1 DW ?,0
.TRESP2 DD ?
.TRSS2 DW ?,0
.TRCR3 DD ?
.TREIP DD ?
.TREFLAG DD ?
.TREAX DD ?
.TRECX DD ?
.TREDX DD ?
.TREBX DD ?
.TRESP DD ?
.TREBP DD ?
.TRESI DD ?
.TREDI DD ?
.TRES DW ?,0
.TRCS DW ?,0
.TRSS DW ?,0
.TRDS DW ?,0
.TRFS DW ?,0
.TRGS DW ?,0
.TRLDT DW ?,0
.TRFLAG DW ?,0
.TRIOMAP DW $+2
}
struct TaskSS