| 8588 | } |
| 8589 | |
| 8590 | void testJmpFarE16() { |
| 8591 | cpu->big = false; |
| 8592 | U8 rm = (5 << 3); |
| 8593 | rm += 6; |
| 8594 | |
| 8595 | newInstructionWithRM(0xff, rm, 0); |
| 8596 | pushCode16(200); |
| 8597 | |
| 8598 | pushCode8(0xcd); |
| 8599 | pushCode8(0xcd); |
| 8600 | |
| 8601 | cseip = CODE_ADDRESS + 0x128; |
| 8602 | |
| 8603 | EAX = 0; |
| 8604 | |
| 8605 | // add ax, 0x10 |
| 8606 | pushCode8(0x83); |
| 8607 | pushCode8(0xc0); |
| 8608 | pushCode8(0x10); |
| 8609 | |
| 8610 | memory->writew(cpu->seg[DS].address + 200, 0x128); |
| 8611 | memory->writew(cpu->seg[DS].address + 202, CODE_SEG_16); |
| 8612 | |
| 8613 | runTestCPU(); |
| 8614 | |
| 8615 | assertTrue(AX == 0x10); |
| 8616 | assertTrue(SP == 4096); |
| 8617 | assertTrue(cpu->seg[CS].value == CODE_SEG_16); |
| 8618 | assertTrue(cpu->big == false); |
| 8619 | setup();// re-init segs for next unit test |
| 8620 | } |
| 8621 | |
| 8622 | void testJmpFarE32() { |
| 8623 | cpu->big = true; |
no test coverage detected