mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-07 05:30:30 +00:00
Correct source counting, but this leaves the operands still being the wrong way around.
This commit is contained in:
parent
f7991e18de
commit
06fe320cc0
@ -485,14 +485,6 @@ void Executor<model, BusHandler>::movem(Preinstruction instruction, uint32_t sou
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Move memory to registers.
|
// Move memory to registers.
|
||||||
if(instruction.mode<0>() == AddressingMode::AddressRegisterIndirectWithPostincrement) {
|
|
||||||
// If the effective address is specified by the postincrement mode ...
|
|
||||||
// [i]f the addressing register is also loaded from memory, the memory value is
|
|
||||||
// ignored and the register is written with the postincremented effective address.
|
|
||||||
|
|
||||||
source -= 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
int index = 0;
|
int index = 0;
|
||||||
while(dest) {
|
while(dest) {
|
||||||
if(dest & 1) {
|
if(dest & 1) {
|
||||||
@ -508,6 +500,10 @@ void Executor<model, BusHandler>::movem(Preinstruction instruction, uint32_t sou
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(instruction.mode<0>() == AddressingMode::AddressRegisterIndirectWithPostincrement) {
|
if(instruction.mode<0>() == AddressingMode::AddressRegisterIndirectWithPostincrement) {
|
||||||
|
// If the effective address is specified by the postincrement mode ...
|
||||||
|
// [i]f the addressing register is also loaded from memory, the memory value is
|
||||||
|
// ignored and the register is written with the postincremented effective address.
|
||||||
|
|
||||||
registers_[8 + instruction.reg<0>()].l = source;
|
registers_[8 + instruction.reg<0>()].l = source;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
- (void)setUp {
|
- (void)setUp {
|
||||||
// To limit tests run to a subset of files and/or of tests, uncomment and fill in below.
|
// To limit tests run to a subset of files and/or of tests, uncomment and fill in below.
|
||||||
_fileSet = [NSSet setWithArray:@[@"movem.json"]];
|
_fileSet = [NSSet setWithArray:@[@"movem.json"]];
|
||||||
// _testSet = [NSSet setWithArray:@[@"MOVEM 0060 (0)"]];
|
_testSet = [NSSet setWithArray:@[@"MOVEM 00a8 (0)"]];
|
||||||
// _fileSet = [NSSet setWithArray:@[@"jmp_jsr.json"]];
|
// _fileSet = [NSSet setWithArray:@[@"jmp_jsr.json"]];
|
||||||
// _testSet = [NSSet setWithArray:@[@"CHK 41a8"]];
|
// _testSet = [NSSet setWithArray:@[@"CHK 41a8"]];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user