As the previous one (viewtopic.php?f=6&t=2597), here another one to get the teeth on:
It should be checked if d is zero or not, but depending on the value of one bit of b the jump should be taken if it is zero (if bit is also zero) or alternatively if it is not zero (as the bit of b).
As usual a starting piece of code:
Code: Select all
ld a,d
bit FLAGBIT,b
jr z,checkforzerovalue
checkforvaluenonzero:
or a
jr z,conditionistrue
jr continuesinceconditionisfalse
checkforzerovalue:
or a
jr nz,conditionistrue
continuesinceconditionisfalse: