I'm working on a data structure in my .data section that needs members to be aligned on 32 bit boundaries. I was going to just use an "Align 32" before each member, but I'm getting an error:

error A2189: invalid combination with segment alignment : 32

Any suggestions?
Posted on 2002-03-02 17:21:08 by Ernie
Hi Ernie,

I think you need .486, maybe .586, as a minimum to you use anything greater that ALIGN 4. :)
Posted on 2002-03-02 17:23:47 by S/390
My fix was to set a larger alignment in the segment definition:

S/390's suggestion didn't work for me.
Posted on 2002-03-02 17:34:01 by bitRAKE
Well, it was only a first thought. :grin:

But since you made me dig into the docs, I think you're onto something. Seems that you can't ALING to anything greater than the SEGMENT alignment. Since the default is PARA, you can't go above 16.

So, perhaps the combination of PAGE for the SEGMENT, will work with ALIGN 32. :)
Posted on 2002-03-02 18:01:21 by S/390
I use ALIGN DWORD and it works fine.
Posted on 2002-03-03 08:05:15 by DaveTX47
I think because the OS paragraph alignment was 16 in the old DOS days, thus anything greater than 16 is not supported by default.
Posted on 2002-03-03 08:37:49 by dxantos
Thanks guys, I'm doing things a different way that isn't going to require 32 bit alignments.

Looks like it would require a macro to get a 32 bit boundary alignment.
Posted on 2002-03-03 14:54:36 by Ernie
32byte you mean, 32bit align works just fine ;).
Posted on 2002-03-03 14:58:01 by f0dder

You can routinely set alignment to 16 if you specify a high enough processor model. I have seen a few methods of setting 32 bit aignment in dynamically allocated memory which are not all that hard to do, just depends what you are after and why.


Posted on 2002-03-03 14:59:39 by hutch--