MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / testJmpFarE16

Function testJmpFarE16

source/test/testCPU.cpp:8590–8620  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8588}
8589
8590void 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
8622void testJmpFarE32() {
8623 cpu->big = true;

Callers 1

testGrp50x0ffFunction · 0.85

Calls 7

newInstructionWithRMFunction · 0.85
pushCode16Function · 0.85
pushCode8Function · 0.85
runTestCPUFunction · 0.85
assertTrueFunction · 0.85
setupFunction · 0.85
writewMethod · 0.45

Tested by

no test coverage detected