need to set H, unset N, and set Z based on the bit, can probably just change the op that is appended:
elif decoded.op == OP.BIT:
assert oper_type == OPER_TYPE.IMM
assert oper_val >= 0 and oper_val <= 7
mask = il.const(1, 1<<oper_val)
operand = operand_to_il(operb_type, operb_val, il, 1)
- il.append(il.and_expr(1, operand, mask, flags='*'))
+ il.append(il.and_expr(1, operand, mask, flags='z'))
and then manually set the other 2 flags

need to set H, unset N, and set Z based on the bit, can probably just change the op that is appended:
and then manually set the other 2 flags