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

Function testSeg

source/test/testCPU.cpp:9319–9340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9317}
9318
9319void testSeg(int inst, U8 seg) {
9320 U32 address = HEAP_ADDRESS;
9321 U32 offset = 3 * 1024;
9322 if (seg == CS) {
9323 address = CODE_ADDRESS;
9324 } else {
9325 cpu->seg[seg].address = HEAP_ADDRESS + 512;
9326 }
9327 EAX = 0;
9328 memory->writeb(cpu->seg[seg].address + offset, 0xbf);
9329 newInstruction(inst, 0);
9330 pushCode8(0xa1);
9331 if (cpu->big) {
9332 pushCode32(offset);
9333 } else {
9334 pushCode16(offset);
9335 }
9336 runTestCPU();
9337 if (EAX != 0xbf) {
9338 failed("seg prefix failed");
9339 }
9340}
9341
9342void testSegEs0x026() {
9343 cpu->big = 0;

Callers 12

testSegEs0x026Function · 0.85
testSegEs0x226Function · 0.85
testSegCs0x02eFunction · 0.85
testSegCs0x22eFunction · 0.85
testSegSs0x036Function · 0.85
testSegSs0x236Function · 0.85
testSegDs0x03eFunction · 0.85
testSegDs0x23eFunction · 0.85
testSegFs0x064Function · 0.85
testSegFs0x264Function · 0.85
testSegGs0x065Function · 0.85
testSegGs0x265Function · 0.85

Calls 7

newInstructionFunction · 0.85
pushCode8Function · 0.85
pushCode32Function · 0.85
pushCode16Function · 0.85
runTestCPUFunction · 0.85
failedFunction · 0.85
writebMethod · 0.45

Tested by

no test coverage detected