do not re-add upper byte for ASL
This commit is contained in:
parent
bdadc393b2
commit
b708b88014
1 changed files with 0 additions and 3 deletions
3
cpu.cpp
3
cpu.cpp
|
@ -1231,10 +1231,7 @@ bool cpu::single_operand_instructions(const uint16_t instr)
|
||||||
case 0b00110011: { // ASL/ASLB
|
case 0b00110011: { // ASL/ASLB
|
||||||
if (dst_mode == 0) {
|
if (dst_mode == 0) {
|
||||||
uint16_t vl = getRegister(dst_reg);
|
uint16_t vl = getRegister(dst_reg);
|
||||||
uint16_t add = word_mode == wm_byte ? vl & 0xff00 : 0;
|
|
||||||
|
|
||||||
uint16_t v = (vl << 1) & (word_mode == wm_byte ? 0xff : 0xffff);
|
uint16_t v = (vl << 1) & (word_mode == wm_byte ? 0xff : 0xffff);
|
||||||
v |= add;
|
|
||||||
|
|
||||||
setPSW_n(SIGN(v, word_mode));
|
setPSW_n(SIGN(v, word_mode));
|
||||||
setPSW_z(IS_0(v, wm_word));
|
setPSW_z(IS_0(v, wm_word));
|
||||||
|
|
Loading…
Add table
Reference in a new issue