MFPS flags & extend sign
This commit is contained in:
parent
468983b0b5
commit
899af8e5d5
1 changed files with 6 additions and 1 deletions
7
cpu.cpp
7
cpu.cpp
|
@ -901,10 +901,15 @@ bool cpu::single_operand_instructions(const uint16_t instr)
|
||||||
if (word_mode) { // MFPS
|
if (word_mode) { // MFPS
|
||||||
uint16_t temp = psw & 0xff;
|
uint16_t temp = psw & 0xff;
|
||||||
|
|
||||||
setPSW_n(temp & 128);
|
|
||||||
setPSW_z(temp == 0);
|
setPSW_z(temp == 0);
|
||||||
setPSW_v(false);
|
setPSW_v(false);
|
||||||
|
|
||||||
|
if (temp & 128) {
|
||||||
|
setPSW_n(true);
|
||||||
|
|
||||||
|
temp |= 0xff00;
|
||||||
|
}
|
||||||
|
|
||||||
putGAM(dst_mode, dst_reg, word_mode, temp, false);
|
putGAM(dst_mode, dst_reg, word_mode, temp, false);
|
||||||
}
|
}
|
||||||
else { // SXT
|
else { // SXT
|
||||||
|
|
Loading…
Add table
Reference in a new issue