flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > "match" confuses me - preprocessor conditional |
Author |
|
JohnFound 22 Apr 2011, 06:56
Match works with symbols, not with numbers.
Read carefully the documentation, examples and do your own tests. |
|||
22 Apr 2011, 06:56 |
|
Tomasz Grysztar 22 Apr 2011, 08:08
Here is something I once wrote to explain a bit the things from the manual: http://board.flatassembler.net/topic.php?p=34035#34035
|
|||
22 Apr 2011, 08:08 |
|
SPTH 22 Apr 2011, 19:11
Thank you Tomasz, that gave me some new insights. I read that the preprocessor is something like PHP which generates the HTML - interesting.
I thought I can simulate an IF...END IF in preprocessor-stage with MATCH, but it seems thats not possible. So two questions now: 1) Is there a possibility to make an IF condition...END IF block, which will only be called by the preprocessor if condition is TRUE? Such that this code: Code: TESTVALUE EQU 0 macro NEVERCALLED { TESTVALUE EQU 1 } IF 1=0 NEVERCALLED END IF display TESTVALUE+'0' Will display 0 instead of 1. 2.) Is there a possibility that one can see the generated code AFTER the preprocessor, before the assembler? This would be very useful for debugging and understanding it preprocessor vs assembler better. |
|||
22 Apr 2011, 19:11 |
|
SPTH 23 Apr 2011, 23:07
OK, I took JohnFound's advice and read all documents again. Now I understand what my problem was:
I wanted to create a list randomly and use that list for conditional code later. That means I totally mixed preprocessor and control directive. When I finally understood it, I found a solution to my problem, by creating an analogon to a list in control directive (by saving the list-values in multiple numerical variables) - this works now. Thanks to both of you for all the help! :) |
|||
23 Apr 2011, 23:07 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.