(t *testing.T)
| 133 | checkFlagsRegister(c, true, true, false, true, t) |
| 134 | } |
| 135 | func TestSTThenLD(t *testing.T) { |
| 136 | ClearMem() |
| 137 | c := SetUpCPU() |
| 138 | |
| 139 | for i := uint16(0); i < 512; i++ { |
| 140 | // ST R2, R3 |
| 141 | setMemoryLocation(c, i, 0x001B) |
| 142 | } |
| 143 | c.SetIAR(0x0000) |
| 144 | |
| 145 | //storing values into memory |
| 146 | var value uint16 = 0x0400 |
| 147 | for i := 0x0200; i < 0x0400; i++ { |
| 148 | setRegisters(c, [4]uint16{0x0001, 0x0001, uint16(i), value}) |
| 149 | doFetchDecodeExecute(c) |
| 150 | value-- |
| 151 | } |
| 152 | |
| 153 | for i := uint16(0); i < 512; i++ { |
| 154 | // LD R2, R3 |
| 155 | setMemoryLocation(c, i, 0x000B) |
| 156 | } |
| 157 | c.SetIAR(0x0000) |
| 158 | |
| 159 | //retrieving them back from memory |
| 160 | value = 0x0400 |
| 161 | for i := 0x0200; i < 0x0400; i++ { |
| 162 | setRegisters(c, [4]uint16{0x0001, 0x0001, uint16(i), 0x0001}) |
| 163 | doFetchDecodeExecute(c) |
| 164 | checkRegisters(c, 0x0001, 0x0001, uint16(i), value, t) |
| 165 | value-- |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | func TestLD4Times(t *testing.T) { |
| 170 | ClearMem() |
nothing calls this directly
no test coverage detected