clarified BGE/BLE/BGT (in conditional_branch_instructions)
This commit is contained in:
parent
70be182836
commit
daa940986f
1 changed files with 3 additions and 3 deletions
6
cpu.cpp
6
cpu.cpp
|
@ -896,7 +896,7 @@ bool cpu::conditional_branch_instructions(const uint16_t instr)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0b00000100: // BGE
|
case 0b00000100: // BGE
|
||||||
take = (getPSW_n() ^ getPSW_v()) == false;
|
take = getPSW_n() == getPSW_v();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0b00000101: // BLT
|
case 0b00000101: // BLT
|
||||||
|
@ -904,11 +904,11 @@ bool cpu::conditional_branch_instructions(const uint16_t instr)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0b00000110: // BGT
|
case 0b00000110: // BGT
|
||||||
take = ((getPSW_n() ^ getPSW_v()) | getPSW_z()) == false;
|
take = getPSW_n() == getPSW_v() && getPSW_z() == false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0b00000111: // BLE
|
case 0b00000111: // BLE
|
||||||
take = (getPSW_n() ^ getPSW_v()) | getPSW_z();
|
take = getPSW_n() != getPSW_v() | getPSW_z();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0b10000000: // BPL
|
case 0b10000000: // BPL
|
||||||
|
|
Loading…
Add table
Reference in a new issue