_switch (a ,); _case(#0) doesn't work
Use structured programming with Z80 assembler
Brought to you by:
jpelletier
A special case of the switch macro doesn't work.
_switch(a,)
_case(#0)
is expanded as
SW_01000:
SW_0100001:
JR NZ, SW_0100002
if the accumulator value was loaded in A, flags won't be set unless we put an OR A to set the flags.
Ex.:
ld a,(some_value)
or a ;set flags
_switch(a,)
_case(#0)
Diff: