Skip to content

Commit

Permalink
Added Display Update when VM halted via software instruction
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottPiersall committed Nov 6, 2020
1 parent 3662e64 commit e08a57a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions SIC Simulator/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,9 @@ private async Task RegRefreshAsync()

String NextInstructionD;


if ( this.SICVirtualMachine.PC >= 0)
{
NextInstructionD = SICVirtualMachine.GetInstructionDescription(SICVirtualMachine.PC);

String[] NextInstructionPieces;
Expand All @@ -263,6 +266,14 @@ private async Task RegRefreshAsync()
lblNextInstruction.Text = NextInstructionPieces[0];
lblNI_Description.Text = NextInstructionPieces[1];
lblNextInstruction_Effect.Text = NextInstructionPieces[2];
} else
{
lblNextInstruction.Text = "Program Halted";
lblNI_Description.Text = "VM Halted by Software Instruction";
lblNextInstruction_Effect.Text = "VM Halted";
}



}

Expand Down

0 comments on commit e08a57a

Please sign in to comment.