flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Unusual behavor |
Author |
|
Tomasz Grysztar 15 Oct 2017, 15:02
Remember that macro parameters are just a simple substitution of text. So if you put a parameter into an expression, you may end up with text that computes to something else than what you imagined:
Code: digit = (0x55 * 2 shr ((2 * 4 - 4) - (1 - 1) * 4)) and 0x0F |
|||
15 Oct 2017, 15:02 |
|
Mike Gonta 15 Oct 2017, 15:23
Tomasz Grysztar wrote: If you need to use the value of a parameter in an expression, either enclose it with parentheses, or use a proxy variable. Code: value = +K |
|||
15 Oct 2017, 15:23 |
|
Tomasz Grysztar 15 Oct 2017, 15:25
Mike Gonta wrote:
|
|||
15 Oct 2017, 15:25 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.