Mail Archives: djgpp/1997/10/02/07:30:16
Arthur Bredrick wrote in message ...
>I think I understand the purpose
>of alignment, but what are the advantages to using it? Why is it used.
>Does it help speed?
When used properly it helps speed, yes. Unfortunately, the details of it
are very processor dependent (they are different between 486, Pentium,
Pentium
Pro, etc.).
> And why is there the need to repeat the same alignment
>directive throughout the code when the same value is fed to it each time
(in
>this case .align 4)? Thanks again.
The assembler aligns the data every time it get to a .align. It does this by
padding
data or by adding nops. It does not cause anything after it to remain
properly aligned, so
you need to specify it whenever you need to align something.
- Raw text -