On 24 March 2017 at 00:43, Marcel Kilgus <ql-us...@mail.kilgus.net> wrote:

> Jan Bredenbeek wrote:
> > QMAC can do conditional assembly outside macros using the GENIF and
> ENDGEN
> > keywords. Check the updates textfile for details.
>
> Ah, I only checked the manual, how foolish of me ;-) Great, thanks, I
> will check that out.


I discovered it only a week or two ago ;-).
I've always found this a major omission in the otherwise great GST
assembler.
It's a bit awkward to use though as QMAC doesn't let you define symbols via
the command line. I had to create two _ASM files, one for the ROM version
and one for the RAM version with a variable set to 1 or 0 (using EQU or
SETNUM) and then INCLUDE the target _ASM file from there.
So you can use GENIF <variable> = 0 or 1 as appropriate. Beware: there MUST
be a space around the equals sign and when you use SETNUM to set the
variable you have to use brackets around its name (i.e. GENIF [variable] =
1), which isn't necessary when defining a symbol with EQU...

Jan.

-- 
*Jan Bredenbeek* | Hilversum, NL | j...@bredenbeek.net
_______________________________________________
QL-Users Mailing List

Reply via email to