emu8051 icon indicating copy to clipboard operation
emu8051 copied to clipboard

Save ACC low nibble before altered, fix XCHD behaviour.

Open cjacker opened this issue 1 year ago • 0 comments

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'.

cjacker avatar Jan 21 '23 06:01 cjacker