flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > adding '.then' to the .if macro |
Author |
|
typedef 29 Jun 2013, 00:43
Wouldn't it be the same as the opposite of else? I think you can resolve it to a continuation of the .if statement.
Code: macro .then [_cmd] { if ~defined .if error 'then without if' else ; this is where you resolve it _cmd endif } Not an expert in this field. Just a suggestion |
|||
29 Jun 2013, 00:43 |
|
revolution 29 Jun 2013, 00:47
You can't process two macros on the same line. You would have to modify the .if macro to recognise .then and act accordingly.
Note that inline macros are possibly going to be in fasm2 |
|||
29 Jun 2013, 00:47 |
|
bitRAKE 29 Jun 2013, 02:23
Here is one way (quick hack):
Code: macro .if [arg] { common __IF equ local ..endif __ENDIF equ ..endif local ..else __ELSE equ ..else __THEN equ match A =.then B,arg \{ JNCOND __ELSE,A B .endif restore __THEN __THEN equ , \} match ,__THEN \{ JNCOND __ELSE,arg \} restore __THEN } _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
29 Jun 2013, 02:23 |
|
madmatt 29 Jun 2013, 13:23
bitRAKE wrote: Here is one way (quick hack): That worked great. Wish I knew macro programming this good. "BTW, thanks for making your work public" No problem, always will be free and public. _________________ Gimme a sledge hammer! I'LL FIX IT! |
|||
29 Jun 2013, 13:23 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.