flat assembler
Message board for the users of flat assembler.
Index
> Main > Can someone explain this little example please? |
Author |
|
Diode 14 Jan 2005, 01:42
Even though I don't get the previous examples I posted above, I have understood (for the most part) the code examples he gives in his fasm tutorial.
However, for some reason, I get the feeling that he delved right into explaining fasm somewhere in the middle, instead of at a beginning that I feel comfortable starting at. Does anyone have any advice? Thanks, - Diode _________________ Mac for productivity. Unix for development. Windows for solitaire. |
|||
14 Jan 2005, 01:42 |
|
bogdanontanu 14 Jan 2005, 09:08
The above things are MACROs
A macro will generate a piece of code each time it is used based on some rules. For example dest, src and src2 are formal parameters there. When you use the macro almost anything could be used instead of them: eax,ebx,ecx,[esi],variable_address etc if, else, endif are conditional compile directives So to explain that macro: IF there is a non parameter src2 (because it could be left blank) THEN ;we do generate a simple single instruction: mov dest,src1 ELSE ;we do generate 2 instructions: mov dest,src mov src,src2 ENDIF Simple isnt it? For the seccond macro again the type and value could be everything but it is more likely (by the names and useage) that both parameters are required and that the first parameter reflects the type of the seccond. So it is a case like statement depending on the type the data that will be defined. Note that a zero is appended at the end of the string as required by the null terminating strings conventions while all others are just defined acordingly to their type/size |
|||
14 Jan 2005, 09:08 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.