| 9317 | } |
| 9318 | |
| 9319 | void 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 | |
| 9342 | void testSegEs0x026() { |
| 9343 | cpu->big = 0; |
no test coverage detected