emu8051
emu8051 copied to clipboard
Save ACC low nibble before altered, fix XCHD behaviour.
Take below codes as example:
mov R0, #0x20h
mov A, #0xffh
mov @R0, #0x11h
xchd A, @R0
After xchd
, Accumlator should be 0xf1 and RAM 0x20h should be 0x1f.
but RAM 0x20h now is '0x11', since low 4 bit of ACC was altered by 'value' before use it to alter the 'value'.