I've fixed a bug related to the computation of the overflow flag in substraction/comparaison operations. Before the fix, the same rule was applied to both addition and substraction whereas, in a substraction op, we need to take into account that the second operand is negated.
Here is a small example:
org 100h
ld a,0
ld b,1
ld de, mnotset
sub b
jp po,notset
ld de, mset
notset
ld c,9
call 5
jp 0
mset db 'P/V is set -> bug', 0dh, 0ah, '$'
mnotset db 'P/V is not set -> ok', 0dh, 0ah, '$'
Hello,
I've fixed a bug related to the computation of the overflow flag in substraction/comparaison operations. Before the fix, the same rule was applied to both addition and substraction whereas, in a substraction op, we need to take into account that the second operand is negated.
Here is a small example: