From Newsgroup: comp.emulators.apple2
On Thu, 11 Aug 2022,
peter....@gmail.com wrote:
or, rather, result ^ 0x80 & original value & 0x80.
Current code has same issue (non-macro version shown, macro version uses
%%4 and %%5 and "jmp" is omitted from the final line):
.4: or byte [rp], FLAG_V ; Unless [ra] and AL were same sign
mov ah, [ra] ; but output differs, set V.
and ax, 0x8080
xor ah, al
jnz .5 ; Inputs not the same sign: skip.
mov ah, bl
and ah, 0x80
xor ah, al
jnz .5 ; Output not the same sign: skip.
and byte [rp], ~FLAG_V
.5: mov al, bl
mov [ra], bl
jmp _setzn ; Set Z+N flags, then we're outtie
I've tested a couple ADCs' overflow bits (63+63, 64+64) between MAME and
my core.
-uso.
--- Synchronet 3.21b-Linux NewsLink 1.2