flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
DOS386 23 Oct 2010, 07:59
http://board.flatassembler.net/topic.php?t=1570 Jibz "align with 00h bytes?"
http://board.flatassembler.net/topic.php?t=8632 Grom PE "Raw PE format again" Any chance for the zeroalign directive in FASM 1.70 ? |
|||
![]() |
|
Tomasz Grysztar 23 Oct 2010, 10:38
fasm manual, section 2.2.5:
Quote: If you need to fill the alignment area with some other values, you can combine align with virtual to get the size of alignment needed and then create the alignment yourself, like: And it's easy to make it into macro (I leave it as an exercise to the reader). ![]() |
|||
![]() |
|
revolution 23 Oct 2010, 11:20
Here you go:
Code: macro align ment*,dat { local a if ~ dat eq virtual align ment a=$-$$ end virtual db a dup dat else align ment end if } Last edited by revolution on 23 Oct 2010, 11:29; edited 1 time in total |
|||
![]() |
|
Tomasz Grysztar 23 Oct 2010, 11:27
But it fails to emulate the standard "align" directive properly. You should just make it fall back to default "align" directive when "dat" is empty.
|
|||
![]() |
|
revolution 23 Oct 2010, 11:30
Tomasz Grysztar wrote: But it fails to emulate the standard "align" directive properly. You should just make it fall back to default "align" directive when "dat" is empty. |
|||
![]() |
|
DOS386 24 Oct 2010, 00:49
Tomasz Grysztar wrote: If you need to fill Thanks, I've been aware of this (see many of my examples), still, an "internal" solution would be cool. PS: of course it could be even worse: http://www.bttr-software.de/forum/forum_entry.php?id=8979 ![]() |
|||
![]() |
|
f0dder 24 Oct 2010, 16:05
http://www.bttr-software.de/forum/forum_entry.php?id=8979 wrote: > 2. There are some aligns inside the binary and they contain random garbage Ugh, that's NASTY - I once had pieces of source code show up in an executable because the compiler didn't zero out allocated memory... |
|||
![]() |
|
Japheth 25 Oct 2010, 05:43
f0dder wrote:
It works ok, because there are no "random" values under Windows, Linux or MS-DOS. It's just a few wannabee-DOS-compatible OSes like FreeDOS or EDR-DOS which - once more - take this opportunity to prove that they are toys. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.