wiz-lang / wiz

A high-level assembly language for writing homebrew software and games on retro console platforms.
http://wiz-lang.org/
Other
409 stars 40 forks source link

goto label if mem & a == 0; is not valid wiz code #65

Closed undisbeliever closed 5 years ago

undisbeliever commented 5 years ago

The following code (taken from 6502_goto_bit_a.wiz)

    goto BitTestLabel if (zp_u8_00 & a) == 0;

Produces the following error:

`--> ../bin/wiz --system 6502 -o obj/6502_goto_bit_a.6502.bin block/6502_goto_bit_a.wiz
* wiz: version 0.1.2 (alpha)
>> Parsing...
>> Compiling...
block/6502_goto_bit_a.wiz:39: error: equality comparison `==` operator is not allowed in conditional
block/6502_goto_bit_a.wiz:39: error: branch instruction could not be generated

I believe this to be a bug as every other type of comparison is allowed to have its operators reversed.

If it is not, please let me know and I'll remove it from the test suite.