struc segmentDescriptor segBase, segLength, flags
{
.length0_15 dw (segLength & 0x0FFFF)
.base0_15 dw (segBase & 0x0000FFFF)
.base16_23 db ((segBase & 0x00FF0000) >> 16)
.flags dw (((segLength & 0xF0000) >> 8) | flags)
.base24_31 db ((segBase & 0xFF000000) >> 24)
}
This struc takes a 32 bit base and 20 bit length and splits each up into the appropriate feilds.
But it doesn't work! Instead I get this:
flat assembler version 1.51
test.asm [78]:
a segmentDescriptor 0,0,0
test.asm [23] segmentDescriptor [1]:
.length0_15 dw (segLength & 0x0FFFF)
error: invalid argument.
I just want FASM to deal with the weirdness of the descriptor format for me. Am I doing something wrong? Should I use a macro instead?