mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 08:49:37 +00:00
Corrects DJNZ memptr behaviour.
This commit is contained in:
parent
da6d5e2e24
commit
8878396339
@ -172,7 +172,7 @@ class FUSETests: XCTestCase {
|
||||
|
||||
let name = itemDictionary["name"] as! String
|
||||
|
||||
// if name != "01" {
|
||||
// if name != "10" {
|
||||
// continue;
|
||||
// }
|
||||
// print("\(name)")
|
||||
|
@ -181,7 +181,6 @@ template < class T,
|
||||
case MicroOp::DJNZ:
|
||||
bc_.halves.high--;
|
||||
if(!bc_.halves.high) {
|
||||
memptr_.full = pc_.full;
|
||||
advance_operation();
|
||||
}
|
||||
break;
|
||||
@ -873,7 +872,7 @@ template < class T,
|
||||
break;
|
||||
|
||||
case MicroOp::CalculateIndexAddress:
|
||||
memptr_.full = static_cast<uint16_t>(*static_cast<uint16_t *>(operation->source) + (int8_t)temp8_);
|
||||
memptr_.full = static_cast<uint16_t>(*static_cast<uint16_t *>(operation->source) + int8_t(temp8_));
|
||||
break;
|
||||
|
||||
case MicroOp::SetAddrAMemptr:
|
||||
|
@ -371,7 +371,7 @@ void ProcessorStorage::assemble_base_page(InstructionPage &target, RegisterPair1
|
||||
DEC_INC_DEC_LD(bc_, bc_.halves.low),
|
||||
|
||||
/* 0x0f RRCA */ StdInstr({MicroOp::RRCA}),
|
||||
/* 0x10 DJNZ */ Instr(6, ReadInc(pc_, temp8_), {MicroOp::Move16, &pc_.full, &memptr_.full}, {MicroOp::DJNZ}, InternalOperation(10), {MicroOp::CalculateIndexAddress, &pc_.full}, {MicroOp::Move16, &memptr_.full, &pc_.full}),
|
||||
/* 0x10 DJNZ */ Instr(6, ReadInc(pc_, temp8_), {MicroOp::DJNZ}, InternalOperation(10), {MicroOp::CalculateIndexAddress, &pc_.full}, {MicroOp::Move16, &memptr_.full, &pc_.full}),
|
||||
/* 0x11 LD DE, nn */ StdInstr(Read16Inc(pc_, de_)),
|
||||
/* 0x12 LD (DE), A */ StdInstr({MicroOp::SetAddrAMemptr, &de_.full}, Write3(de_, a_)),
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user