im aligning by 8 in tasm, and i get the warning message: "segment alignment not strict enough."
It does that for any value higher then 8 too..
If i align by 2 i get no warning message.
So should i allign it by 2? even though im using 64 bit blocks?

also should i do the allign before AND after my data?
align 8
bleh dd 0, 0, 0, 0
align 8

or how should i work it the best way? thx.
Posted on 2004-11-14 21:32:42 by pwn
im aligning by 8 in tasm, and i get the warning message: "segment alignment not strict enough."
It does that for any value higher then 8 too..
If i align by 2 i get no warning message.
So should i allign it by 2? even though im using 64 bit blocks?

also should i do the allign before AND after my data?
align 8
bleh dd 0, 0, 0, 0
align 8

or how should i work it the best way? thx.



cutting and pasting from the Masm Reference:


The alignment specified by the ALIGN or EVEN directive was greater than the current segment alignment as specified by the SEGMENT directive.


And here is the cut and paste of how to define a segment. Basically just change the alignment for it to something equal to or larger than what you are trying to use. Try using PARA ( paragraph) alignment.

I don't have the TASM reference in front of me, but you should be able to find your segment definition based on what I quoted here and modify it to use a greater alignment.


name SEGMENT [] [] [] [] [['class']]
statements
name ENDS
Defines a program segment called name having segment attributes align (BYTE, WORD, DWORD, PARA, PAGE), combine (PUBLIC, STACK, COMMON, MEMORY, AT address, PRIVATE), use (USE16, USE32, FLAT), and class.
Posted on 2004-11-15 10:36:17 by mark_larson