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

Function testCallFarE32

source/test/testCPU.cpp:8438–8472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8436}
8437
8438void testCallFarE32() {
8439 cpu->big = true;
8440 U8 rm = (3 << 3);
8441 rm += 5;
8442
8443 newInstructionWithRM(0xff, rm, 0);
8444 pushCode32(200);
8445
8446 pushCode8(0xcd);
8447 pushCode8(0xcd);
8448
8449 cseip = CODE_ADDRESS + 0x128;
8450
8451 EAX = 0;
8452
8453 // add ax, 0x10
8454 pushCode8(0x83);
8455 pushCode8(0xc0);
8456 pushCode8(0x10);
8457
8458 U32 esp = ESP;
8459
8460 memory->writed(cpu->seg[DS].address + 200, 0x128);
8461 memory->writed(cpu->seg[DS].address + 204, CODE_SEG_16);
8462
8463 runTestCPU();
8464
8465 assertTrue(AX == 0x10);
8466 assertTrue(memory->readd(cpu->seg[SS].address + esp - 4) == CODE_SEG);
8467 assertTrue(memory->readd(cpu->seg[SS].address + esp - 8) == 6);
8468 assertTrue(SP == 4088);
8469 assertTrue(cpu->big == false);
8470 cpu->big = true;
8471 setup();// re-init segs for next unit test
8472}
8473
8474void testJmpE16() {
8475 for (int i = 0; i < 8; i++) {

Callers 1

testGrp50x2ffFunction · 0.85

Calls 8

newInstructionWithRMFunction · 0.85
pushCode32Function · 0.85
pushCode8Function · 0.85
runTestCPUFunction · 0.85
assertTrueFunction · 0.85
setupFunction · 0.85
writedMethod · 0.45
readdMethod · 0.45

Tested by

no test coverage detected