Do you have test-cases that reproduce the wrong behaviour(s)?
or, rather, result ^ 0x80 & original value & 0x80.
My service provider has issues with newsgroups. The double-posting is not on purpose.
mov ah, bl
xor ah, 0x80
and ah, [ra] ; but output differs, set V.
and ah, 0x80
jnz %%5 ; Output is different sign: skip.
On Friday, August 12, 2022 at 4:56:12 AM UTC+3, peter....@gmail.com wrote:
mov ah, bl
xor ah, 0x80
and ah, [ra] ; but output differs, set V.
and ah, 0x80
jnz %%5 ; Output is different sign: skip.
Interesting topic.
One funny approach I used when developing Apple II emulator on a XT
circa 1990 was to directly keep N/V/Z/C/ in their 8086 counterparts,
then use POPF/PUSHF and get free results whenever possible. There was
also code to do fixups now and then, as expected.
Example of ROL:
// ...
popf
rcl byte ptr [bx], 1
pushf
// ...
Same holds true for bunch of other ALU operations.
Looking back, I could've went with more profiling and compare this
approach to others, but then again I was just a kid - learning and
having fun.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 468 |
Nodes: | 16 (2 / 14) |
Uptime: | 18:33:23 |
Calls: | 9,440 |
Calls today: | 3 |
Files: | 13,594 |
Messages: | 6,109,727 |