diff options
author | 2020-08-12 23:28:43 +1000 | |
---|---|---|
committer | 2020-08-12 23:28:43 +1000 | |
commit | c4a184e2c6716ff05f474733544586eb501285f9 (patch) | |
tree | 6fc4d5fc01f667eae5e5ad56304d131b60278a7f | |
parent | 2ec046457561ab15cd20e87bfe1bd5e7fdeff405 (diff) |
z8: fixed bug in decimal adjust. Fixes PRINT 654 in bert.
-rw-r--r-- | src/devices/cpu/z8/z8ops.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/cpu/z8/z8ops.hxx b/src/devices/cpu/z8/z8ops.hxx index 51172f2d142..22934842657 100644 --- a/src/devices/cpu/z8/z8ops.hxx +++ b/src/devices/cpu/z8/z8ops.hxx @@ -325,7 +325,7 @@ void z8_device::decimal_adjust(uint8_t dst) if (flag(C) | (data>0x99)) new_data+=0x60; } - set_flag_c(new_data & 0x100); + set_flag_c(flag(C)|(new_data & 0x100)); set_flag_s(new_data & 0x80); new_data &= 0xff; set_flag_z(new_data == 0); |