Removed Duplicate instructions.

LDA and LDB are now Data Operations only. Minor reshuffling of instructions.
Fixed typo in the programming manual.
This commit is contained in:
Anachronaut
2024-11-18 13:10:02 -05:00
committed by GitHub
parent b1639ca56b
commit d59a91aa38
2 changed files with 5 additions and 15 deletions
+3 -5
View File
@@ -37,11 +37,9 @@ Instruction instruction_set[] = {
{0x23, "INCB"},
{0x24, "DECA"},
{0x25, "DECB"},
{0x26, "LDA"},
{0x27, "LDB"},
{0x28, "INIA"},
{0x29, "INIB"},
{0x2F, "CCF"},
{0x26, "INIA"},
{0x27, "INIB"},
{0x28, "CCF"},
// Stack Operations:
{0x30, "PSHQ"},
{0x31, "PSHA"},
+2 -10
View File
@@ -235,24 +235,16 @@ uint8_t executeOperation(uint8_t Instruction, CPURegisters *cpu) {
cpu->B--;
break;
case 0x26:
// LDA - Load the byte referenced by the Data Pointer to A.
cpu->A = cpu->Data[cpu->DataPointer];
break;
case 0x27:
// LDB - Load the byte referenced by the Data Pointer to B.
cpu->B = cpu->Data[cpu->DataPointer];
break;
case 0x28:
// INIA - Initialize A Immediately from Program Memory.
cpu->ProgramCounter++;
cpu->A = cpu->Program[cpu->ProgramCounter];
break;
case 0x29:
case 0x27:
// INIB - Initialize A Immediately from Program Memory.
cpu->ProgramCounter++;
cpu->B = cpu->Program[cpu->ProgramCounter];
break;
case 0x2F:
case 0x28:
// CCF - Clear the Carry Flag.
cpu->Status &= ~0x01;
break;