flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > compare before macro? |
Author |
|
l4m2 05 Aug 2016, 16:32
Code: if version < 201109 { macro xchg op1, op2 \{ push op1 op2 pop op1 op2 \} } |
|||
05 Aug 2016, 16:32 |
|
l4m2 05 Aug 2016, 16:59
I put the topic in Compiler Internals because I mainly mean to have a compare-if on the 1st step, not focus on macro.
I also know that if won't fit, only in order to find a way. |
|||
05 Aug 2016, 16:59 |
|
revolution 05 Aug 2016, 17:51
You can use match for preprocessor conditionals.
|
|||
05 Aug 2016, 17:51 |
|
l4m2 06 Aug 2016, 03:02
revolution wrote: You can use match for preprocessor conditionals. I already know that. I just hadn't known how to actually do it. I found that Code: rept 1 t:a-b{ match -u, t \{ ... \} } Last edited by l4m2 on 06 Aug 2016, 03:10; edited 1 time in total |
|||
06 Aug 2016, 03:02 |
|
revolution 06 Aug 2016, 03:09
l4m2 wrote:
l4m2 wrote:
Perhaps the most useful, and most ignored, part of assembly code is the semi-colon character used to introduce comments. |
|||
06 Aug 2016, 03:09 |
|
l4m2 21 Aug 2016, 01:29
revolution wrote: Perhaps a way to make it more understandable is to put comments in the code the explain what it is intended to do. |
|||
21 Aug 2016, 01:29 |
|
shutdownall 21 Aug 2016, 23:08
l4m2 wrote: Comments should be the last way to make understandable code. Try macroing it Comments make it easier to understand the code for other but also for yourself. Whenever you tried to understand own code written years ago you would make the experience that comments are absolutely helpful and appreciated. Even just for yourself. The time you save in sparing comments you will invest double or triple or even more in finding bugs in your code later. |
|||
21 Aug 2016, 23:08 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.