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

Function test16BitMemoryAccess

source/test/testCPU.cpp:10594–10821  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10592}
10593
10594void test16BitMemoryAccess() {
10595 // Mod 00
10596 // [DS:BX + SI]
10597 initMem16(); BX = 0; SI = 0; runLeaGw(0, 0, 0, 0, 0, DS);
10598 initMem16(); BX = 1; SI = 0; runLeaGw(1 << 3, 0, 0, 0, 1, DS);
10599 initMem16(); BX = 0; SI = 1; runLeaGw(2 << 3, 0, 0, 0, 1, DS);
10600 initMem16(); BX = 0xFFFE; SI = 0; runLeaGw(3 << 3, 0, 0, 0, 0xFFFE, DS);
10601 initMem16(); BX = 0; SI = 0xFFFE; runLeaGw(4 << 3, 0, 0, 0, 0xFFFE, DS);
10602 initMem16(); BX = 0xFFFE; SI = 2; runLeaGw(5 << 3, 0, 0, 0, 0, DS);
10603 initMem16(); BX = 2; SI = 0xFFFE; runLeaGw(6 << 3, 0, 0, 0, 0, DS);
10604 initMem16(); BX = 0xFFFE; SI = 0xFFFE; runLeaGw(7 << 3, 0, 0, 0, 0xFFFC, DS);
10605
10606 // [DS:BX + DI]
10607 initMem16(); BX = 0; DI = 0; runLeaGw(0 << 3 | 1, 0, 0, 0, 0, DS);
10608 initMem16(); BX = 2; DI = 0; runLeaGw(1 << 3 | 1, 0, 0, 0, 2, DS);
10609 initMem16(); BX = 0; DI = 2; runLeaGw(2 << 3 | 1, 0, 0, 0, 2, DS);
10610 initMem16(); BX = 0xFFFE; DI = 0; runLeaGw(3 << 3 | 1, 0, 0, 0, 0xFFFE, DS);
10611 initMem16(); BX = 0; DI = 0xFFFE; runLeaGw(4 << 3 | 1, 0, 0, 0, 0xFFFE, DS);
10612 initMem16(); BX = 0xFFFE; DI = 2; runLeaGw(5 << 3 | 1, 0, 0, 0, 0, DS);
10613 initMem16(); BX = 2; DI = 0xFFFE; runLeaGw(6 << 3 | 1, 0, 0, 0, 0, DS);
10614 initMem16(); BX = 0xFFFE; DI = 0xFFFE; runLeaGw(7 << 3 | 1, 0, 0, 0, 0xFFFC, DS);
10615
10616 // [SS:BP + SI]
10617 initMem16(); BP = 0; SI = 0; runLeaGw(0 << 3 | 2, 0, 0, 0, 0, SS);
10618 initMem16(); BP = 2; SI = 0; runLeaGw(1 << 3 | 2, 0, 0, 0, 2, SS);
10619 initMem16(); BP = 0; SI = 2; runLeaGw(2 << 3 | 2, 0, 0, 0, 2, SS);
10620 initMem16(); BP = 0xFFFE; SI = 0; runLeaGw(3 << 3 | 2, 0, 0, 0, 0xFFFE, SS);
10621 initMem16(); BP = 0; SI = 0xFFFE; runLeaGw(4 << 3 | 2, 0, 0, 0, 0xFFFE, SS);
10622 initMem16(); BP = 0xFFFE; SI = 2; runLeaGw(5 << 3 | 2, 0, 0, 0, 0, SS);
10623 initMem16(); BP = 2; SI = 0xFFFE; runLeaGw(6 << 3 | 2, 0, 0, 0, 0, SS);
10624 initMem16(); BP = 0xFFFE; SI = 0xFFFE; runLeaGw(7 << 3 | 2, 0, 0, 0, 0xFFFC, SS);
10625
10626 // [SS:BP + DI]
10627 initMem16(); BP = 0; DI = 0; runLeaGw(0 << 3 | 3, 0, 0, 0, 0, SS);
10628 initMem16(); BP = 2; DI = 0; runLeaGw(1 << 3 | 3, 0, 0, 0, 2, SS);
10629 initMem16(); BP = 0; DI = 2; runLeaGw(2 << 3 | 3, 0, 0, 0, 2, SS);
10630 initMem16(); BP = 0xFFFE; DI = 0; runLeaGw(3 << 3 | 3, 0, 0, 0, 0xFFFE, SS);
10631 initMem16(); BP = 0; DI = 0xFFFE; runLeaGw(4 << 3 | 3, 0, 0, 0, 0xFFFE, SS);
10632 initMem16(); BP = 0xFFFE; DI = 2; runLeaGw(5 << 3 | 3, 0, 0, 0, 0, SS);
10633 initMem16(); BP = 2; DI = 0xFFFE; runLeaGw(6 << 3 | 3, 0, 0, 0, 0, SS);
10634 initMem16(); BP = 0xFFFE; DI = 0xFFFE; runLeaGw(7 << 3 | 3, 0, 0, 0, 0xFFFC, SS);
10635
10636 // [DS:SI]
10637 initMem16(); SI = 0; runLeaGw(0 << 3 | 4, 0, 0, 0, 0, DS);
10638 initMem16(); SI = 2; runLeaGw(1 << 3 | 4, 0, 0, 0, 2, DS);
10639 initMem16(); SI = 0x2468; runLeaGw(2 << 3 | 4, 0, 0, 0, 0x2468, DS);
10640 initMem16(); SI = 0xFFFE; runLeaGw(3 << 3 | 4, 0, 0, 0, 0xFFFE, DS);
10641
10642 // [DS:DI]
10643 initMem16(); DI = 0; runLeaGw(0 << 3 | 5, 0, 0, 0, 0, DS);
10644 initMem16(); DI = 2; runLeaGw(1 << 3 | 5, 0, 0, 0, 2, DS);
10645 initMem16(); DI = 0x2468; runLeaGw(2 << 3 | 5, 0, 0, 0, 0x2468, DS);
10646 initMem16(); DI = 0xFFFE; runLeaGw(3 << 3 | 5, 0, 0, 0, 0xFFFE, DS);
10647
10648 // [DS:disp16]
10649 initMem16(); runLeaGw(0 << 3 | 6, 0, true, 0, 0, DS);
10650 initMem16(); runLeaGw(1 << 3 | 6, 0, true, 2, 2, DS);
10651 initMem16(); runLeaGw(2 << 3 | 6, 0, true, 0x2468, 0x2468, DS);

Callers

nothing calls this directly

Calls 2

initMem16Function · 0.85
runLeaGwFunction · 0.85

Tested by

no test coverage detected