flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > [feature request] "when" preprocessor(assembler?) |
Author |
|
Tomasz Grysztar 28 Mar 2006, 10:43
Preprocessor should not interact in any way with the assembler construct's (like =). Also any applications I can imagine of such thing can be implemented in other ways using the standard techniques.
I also suggest to follow my Understanding fasm article as I continue expanding it. At this moment it has a higher priority for me to well document all the existing features and tricks instead of thinking out any new ones. |
|||
28 Mar 2006, 10:43 |
|
dead_body 28 Mar 2006, 14:30
maybe in future, when all tricks of fasm will be document this command will be in use. But it is too difficult to make it i think.
Code: format PE GUI 4.0 include "C:\fasm\INCLUDE\WIN32AX.INC" ;normal priority is 0 ;1,2,3... is higher priority ;-1,-2,-3... is lower priority ;first pass to find highest order. ;second pass to do it. ;then third pass ... .code __EntryPoint: order 4 {const1 equ 123} order -1 {mov eax,const1};mov eax,5 order 3 {const1 equ 321} mov eax,const1 ;mov eax,321 order 4 {mov eax,const1};mov eax,123 const1 equ 5;with order 0 ret .end __EntryPoint http://flatassembler.net/docs.php?article=ufasm is a very good article. thank you fo it. |
|||
28 Mar 2006, 14:30 |
|
chris 29 Mar 2006, 09:08
to dead_body:
the assembler directive 'if' is what you were looking for in the first example. Code: if tmp>0 db tmp end if as for the second one, I didn't see any point here in your example code - it's just reducing the readablity of your code. Maybe you could construct some more convincing examples to justify your request. |
|||
29 Mar 2006, 09:08 |
|
UCM 29 Mar 2006, 21:38
chris: no it isn't, he is looking to define that block when tmp changes. not if tmp is >0 at that time. the idea is the first time it changes above zero it will execute that statement (db tmp).
|
|||
29 Mar 2006, 21:38 |
|
chris 30 Mar 2006, 03:08
UCM wrote: chris: no it isn't, he is looking to define that block when tmp changes. not if tmp is >0 at that time. the idea is the first time it changes above zero it will execute that statement (db tmp). maybe, I was just trying to suggest another approach, like: Code: macro deftmp { if tmp>0&tmp<500 db tmp end if } tmp=0 deftmp tmp=1 deftmp tmp=500 deftmp Is this what dead_body was trying to do? |
|||
30 Mar 2006, 03:08 |
|
dead_body 30 Mar 2006, 11:07
i will write after some time(maybe days), what i mean.
|
|||
30 Mar 2006, 11:07 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.