flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Do you use FASM's High level macros? Goto page 1, 2 Next |
Do you use FASM's high level macros? | |||||||||||||||||||||
|
|||||||||||||||||||||
Total Votes : 43 |
Author |
|
dead_body 12 Aug 2007, 01:00
I use. Sometimes. In small projects uses standart assembler commands. If project is BIG and will be uses (in future) dlls and other modules from other languehes use as much macroses as can. Time is money.
|
|||
12 Aug 2007, 01:00 |
|
crc 12 Aug 2007, 01:46
I use my own set of macros, but not many existing ones (such as .if, .while, etc)
|
|||
12 Aug 2007, 01:46 |
|
madmatt 12 Aug 2007, 10:16
A few years ago, I used to think like an assembler purist. But, once I started to learn the proc/endp/.if/.elseif/.endif/etc./ macros, I never looked back.
|
|||
12 Aug 2007, 10:16 |
|
vid 12 Aug 2007, 14:31
They are definitively useful in some cases. In other cases, you can go with labels and conditional jumps just as well, or even better.
It's best to learn both, and learn when to use which. PS: But i don't use them in FASMLIB code, even though sometimes it makes my code little "hard to follow" |
|||
12 Aug 2007, 14:31 |
|
asmfan 12 Aug 2007, 15:38
i don't like when preprocessor+compiler make some invisible tricks on my asm code. So code like (c)invoke, auto prologs/epilogs and ret (if not naked) - the only i allow to preprocessor.
|
|||
12 Aug 2007, 15:38 |
|
MichaelH 12 Aug 2007, 23:53
A few years ago, I used macros. But, after the 10,000th time (slight exaggeration) a macro threw some stupid error, I thought sod this, this is just like programming in C\C++, so I dumped the use of all macros and I never looked back.
Turns out you don't need macros to program as the fasm multiple passes used with virtual blocks are really powerful and the assembler time load, store, if, while, repeat etc are really all you need..... however store needs extending. Take "include" out of the preprocessor and the preprocessor can be dumped .... I hope Tomasz does this in future releases. Last edited by MichaelH on 13 Aug 2007, 21:14; edited 1 time in total |
|||
12 Aug 2007, 23:53 |
|
Madis731 13 Aug 2007, 11:19
Hmm, I answered "Yes" but actually I shouldn't have because all I use are if, while, rept and virtual, load, store, like the previous poster suggested.
Actually its a "Maybe" because there might be some times when I use them, but usually drop in production. |
|||
13 Aug 2007, 11:19 |
|
afw2004 13 Aug 2007, 14:15
Using high level macros in fasm may be a good idea, but in a large projects it is not acceptable. Fasm wastes a huge amount of memory while compiling (in my case about 512k for each structure declaration, even if I don't actually using some of them in a program). As I can understand, it never releases memory after using it.
|
|||
13 Aug 2007, 14:15 |
|
dead_body 13 Aug 2007, 16:48
yes, this is a disadvantage of fasm. But maybe in future versions something will change. Fasm supports more then 2 GB of RAM?
|
|||
13 Aug 2007, 16:48 |
|
ManOfSteel 14 Aug 2007, 07:49
I use my own and FASM pre-defined ones.
Sometime they make the code easier to read and follow. Sometimes they are useless and cumbersome and the label/jcc combination becomes handier. @asmfan: No black magic here, just two or three lines of code. Check the macros, they are so simple and clear. 'invoke' or 'proc' generate much more 'invisible tricks' than '.if', '.else' and co. |
|||
14 Aug 2007, 07:49 |
|
zxcv 15 Dec 2007, 00:40
no way!
low level programming is easier, you cant do mistake (because u know what u do). And i dont like writing anything on time. |
|||
15 Dec 2007, 00:40 |
|
LocoDelAssembly 15 Dec 2007, 02:22
Quote: low level programming is easier, you cant do mistake (because u know what u do). haha, but I saw several times that you imported DLL functions using library and import macros Programming with macros in fact is easier but sometimes makes the life harder when you try to optimize (for speed or size) and can introduce errors due to the side effects (e.g., "lea edx, [ebx+esi*4+1234]/stdcall foo, edx, addr bar" will make the LEA instruction very useless). It must be used when the task is really repetitive, not when you can arrange the things to make sub-optimal repetition. IMHO, it is good practice to use macros and do hand replacement later, perhaps this way take you longer to produce the final code, but writing all in full low level fashion also makes you code slower because you invest time figuring out how to arrange all the stuff to keep growing your code (which many times results in that you need to modify many lines when you realize that for example you did a bad register utilization among other things). |
|||
15 Dec 2007, 02:22 |
|
zxcv 16 Dec 2007, 03:11
Quote: haha, but I saw several times that you imported DLL functions using library and import macros Smile so tell me how to import in other way. |
|||
16 Dec 2007, 03:11 |
|
LocoDelAssembly 16 Dec 2007, 03:28
Having downloaded flat assembler for Windows, check EXAMPLES\PEDEMO\PEDEMO.ASM
|
|||
16 Dec 2007, 03:28 |
|
zxcv 16 Dec 2007, 04:10
okay, didnt knew about that.
i can understand it but why dd 0,0,0,RVA kernel_name,RVA kernel_table what are tose 0,0,0 for? |
|||
16 Dec 2007, 04:10 |
|
revolution 16 Dec 2007, 04:17
zxcv wrote: ... what are tose 0,0,0 for? |
|||
16 Dec 2007, 04:17 |
|
zxcv 16 Dec 2007, 04:49
I always liked to be on lowest possible level programming,
my goal it to understand it so much to write in hex editor i found description of pe wich im going to learn(http://kalbasa.paradoxinc.org/coding/bin/htm/pe.htm). If you have better, please link it! |
|||
16 Dec 2007, 04:49 |
|
Hayden 16 Dec 2007, 11:47
many people like to use macros like procedures in C, but as some people already pointed out they can help in many ways.
for example, imagine something like this... INTERRUPT 10 -- new INT10 code here ENDINTR _________________ New User.. Hayden McKay. |
|||
16 Dec 2007, 11:47 |
|
os.hacker64 01 Mar 2008, 14:41
zxcv wrote: I always liked to be on lowest possible level programming, Yay low level! |
|||
01 Mar 2008, 14:41 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.