Skip to content

Commit

Permalink
Fix typo in Debugger.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
TollyH committed Oct 24, 2023
1 parent 16d2a2a commit 07511cd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Debugger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -739,23 +739,23 @@ private bool ProcessReplInput(string userInput)
DisplayDebugInfo();
return false;
}
string menmonic = instruction[0];
string mnemonic = instruction[0];

if (menmonic[0] == ':')
if (mnemonic[0] == ':')
{
// Will throw an error if label is not valid
OperandType operandType = Assembler.DetermineOperandType(menmonic);
OperandType operandType = Assembler.DetermineOperandType(mnemonic);
if (operandType != OperandType.Address)
{
throw new SyntaxError("The first character of a label cannot be '&'");
}
string labelName = menmonic[1..];
string labelName = mnemonic[1..];
replLabels[labelName] = DebuggingProcessor.Registers[(int)Register.rpo];
return false;
}

(byte[] newBytes, List<(string LabelName, ulong AddressOffset)> newLabels) =
Assembler.AssembleStatement(menmonic, instruction[1..]);
Assembler.AssembleStatement(mnemonic, instruction[1..]);

foreach ((string labelName, ulong addressOffset) in newLabels)
{
Expand Down

0 comments on commit 07511cd

Please sign in to comment.