Skip to content

Commit

Permalink
fixed missing alu operands for Z=PC+1
Browse files Browse the repository at this point in the history
  • Loading branch information
darkzense committed Nov 20, 2023
1 parent f980d89 commit de87a2e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion system/cpu/execution_unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ function fetch(): Instruction | null {
return null;
}

const nextCounterHex = (counter + 1).asHex16();
cpu.aluX = cpu.programCounter;
cpu.aluY = "0000";
cpu.aluFlags = "Z=0,O=0";
cpu.controlUnit = "PCout,MARin,ClrY,SetCin,ADD,Zin";

const nextCounterHex = (counter + 1).asHex16();
cpu.programCounter = cpu.aluZ = nextCounterHex;

const binInstruction = processInfo.objectCode[counter];
Expand Down

0 comments on commit de87a2e

Please sign in to comment.