flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > new _align |
Author |
|
revolution 21 Aug 2009, 06:02
I think you are using one of the relocatable format outputs (I can't be sure because you didn't post all your code). But try this:
Code: macro _align _offset, _byte { if (_offset - 1) and RVA $ times _offset - ((_offset - 1) and RVA $) db _byte end if } |
|||
21 Aug 2009, 06:02 |
|
LocoDelAssembly 21 Aug 2009, 06:13
What kind of alignment the macro does? (Or how is it used?)
|
|||
21 Aug 2009, 06:13 |
|
DMD 21 Aug 2009, 09:38
I'm really sorry I didn't post the code !
to revolution your macro is work perfect! thanks alot! ps/ to LocoDelAssembly ok, Code: _align 10h, 20h |
|||
21 Aug 2009, 09:38 |
|
LocoDelAssembly 21 Aug 2009, 16:06
hehe, sorry, I though it couldn't work
|
|||
21 Aug 2009, 16:06 |
|
Fanael 24 Aug 2009, 16:21
The name of the macro seems ugly for me (it begins with underscore...), can't it be called "align" (same as assembler's directive)? Consider this one:
Code: macro align off*, b { if ~ b eq if (off - 1) and RVA $ times off - ((off - 1) and RVA $) db b end if else align off end if } Code: align 16 ;padded with nops db 0 align 16, 0 ;padded with zeros db 1 |
|||
24 Aug 2009, 16:21 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.