INCLUDE inside an IF (ignore IF)
If you put an INCLUDE inside an IF, and condition is false, asmsx include the file likewise Example:
USE_SCREEN = 2 IF USE_SCREEN == 2 ;.INCLUDE "LIB/FORSCREEN2.GEN" ENDIF IF USE_SCREEN == 4 .INCLUDE "LIB/FORSCREEN4.GEN" ENDIF
In output Including file LIB/FORSCREEN2.GEN Including file LIB/FORSCREEN4.GEN
This behaviour was never cover. However it is interesting.
The includes are treated in the first preprocessor, where there is no support for IF statements (The IF statements are controlled in the assember part). If we want to support this we would have to copy the IF statement syntax to preprocessor 1.
To include this we need to implement bison code as IF uses the calculations made for value in dura.y.

Same code as the test included in #110.
VARIABLE=2
.ZILOG
.ROM
.START INIT
INIT:
nop
; Si el if da falso, crea la etiqueta igual, pero en direccion erronea.
; DIR1 y DIR2 van a la misma direccion
; Si if da cierto, funciona
; Se puede ver en el fichero .sym de salida
if VARIABLE == 3
DIR1: ds 8
endif
DIR2: ds 8
ret
It works. Fixed with: https://github.com/Fubukimaru/asMSX/issues/90
The only issue is that the executable will say "I'm including this file". But we don't care.
Rebota rebota y en tu culo explota