flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > .for macro |
Author |
|
AlexP 11 Mar 2008, 16:44
Very nice, I'm just trying to learn FASM macros too. After my current project I'll probably take some time off to learn the more high-level parts of FASM, hopefully the designer(s) will keep adding more features to it's syntax!
The only downside I see of having much more high-level things is it appears (as I saw in other threads) that people are becoming split in their programming styles. Some using almost all high-level features, and others being so low-level purists that it takes me several minutes to figure out what they're trying to do! PS: I tried using this: Code: struct Food_ start = $ ... some other stuff end = $ ends ; declare the structure, and later: mov eax,Food.end-Food.start ; which returned 0! Do u know what happened? Just a small thing I remembered, thought you would be the person to inquire. |
|||
11 Mar 2008, 16:44 |
|
baldr 19 Sep 2008, 23:08
AlexP,
"This is by design". struct macro redefines db, dw, etc. (even itself - for nested substructs) so they don't define/reserve bytes. Instead they collect information about struct's structure in symbolic constant fields@struct. After that – only virtual at 0. It's the ends macro that actually defines/reserves bytes. No wonder that end == start (after preprocessing ... some other stuff is empty). By the way, isn't sizeof.Food working? |
|||
19 Sep 2008, 23:08 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.