Search code examples
optimizationassemblyfasm

Insert NOPs at odd offsets in FASM


In older assemblers, there existed a preprocessor instruction ".even" or "even", which insert a NOP, if the current offset is odd, so that the offset of the next instruction/variable will be even. Does a similar instruction exist in FASM? Isn't it important anymore to place words at even offsets?


Solution

  • Alignment is still important, look at the "align" directive.

    align 4;

    e.g. will align the next instruction (or part of a data structure) at a 4byte boundary.