Jeroen Smael wrote:
> 
> Hi Guys,
> 
> I have a simple question:
> Does anyone have the manual for Hisoft GEN80 Assembler?
> 
> What I definitely need to know is how I can use conditional
> compilation, e.g.:
> 
> if something
>       ld a,1
> else
>       ld a,2
> endif
> 
> Thanx in advance,
> 

This works. If something is true then you will have compiled ld a,1
otherwise it will be ld a,2
that is compiled.

you can say something like 
        klopt equ 1
        if klopt 
              ld a,1
        else
              ld a,2
        endif
this will be compiled as ld a,1

        klopt equ 0
        if klopt 
              ld a,1
        else
              ld a,2
        endif 
this will be compiled as ld a,2

HOWEVER !!!!
WATCH OUT FOR THE FOLLOWING CONSTRUCT
if something
        label1 equ 8
else 
        label1 equ 4
endif

will always result in label1 having the value 4!!!

(Of course COMPASS doesn't has this flaw :-)

David Heremans

****
MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put
in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the
quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
****

Reply via email to