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

Function testCallFarE16

source/test/testCPU.cpp:8403–8436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8401}
8402
8403void testCallFarE16() {
8404 cpu->big = false;
8405 U8 rm = (3 << 3);
8406 rm += 6;
8407
8408 newInstructionWithRM(0xff, rm, 0);
8409 pushCode16(200);
8410
8411 pushCode8(0xcd);
8412 pushCode8(0xcd);
8413
8414 cseip = CODE_ADDRESS + 0x128;
8415
8416 EAX = 0;
8417
8418 // add ax, 0x10
8419 pushCode8(0x83);
8420 pushCode8(0xc0);
8421 pushCode8(0x10);
8422
8423 U32 esp = ESP;
8424
8425 memory->writew(cpu->seg[DS].address + 200, 0x128);
8426 memory->writew(cpu->seg[DS].address + 202, CODE_SEG_16);
8427
8428 runTestCPU();
8429
8430 assertTrue(AX == 0x10);
8431 assertTrue(memory->readw(cpu->seg[SS].address + esp - 2) == CODE_SEG);
8432 assertTrue(memory->readw(cpu->seg[SS].address + esp - 4) == 4);
8433 assertTrue(SP == 4092);
8434 assertTrue(cpu->big == false);
8435 setup();// re-init segs for next unit test
8436}
8437
8438void testCallFarE32() {
8439 cpu->big = true;

Callers 1

testGrp50x0ffFunction · 0.85

Calls 8

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

Tested by

no test coverage detected