Skip to content

Commit

Permalink
refactor: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
furesoft authored Oct 30, 2024
1 parent e3c66a7 commit c6df28d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/MimaSim/MimaSim/MIMA/Instructions/CallInstruction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ public class CallInstruction : IInstruction, IDisassemblyInstruction
public bool Invoke(CPU cpu)
{
var currentAddress = cpu.ControlUnit.IAR.GetValueWithoutNotification();
cpu.Stack.Push(currentAddress);
cpu.Accumulator.SetValue(currentAddress);
cpu.Stack.Push();

var address = cpu.Fetch16();
cpu.ControlUnit.IAR.SetValue(address);
Expand Down

0 comments on commit c6df28d

Please sign in to comment.