Added a sample program.

Change: JAL -> JMP, JALF -> JIF.
This commit is contained in:
2025-08-15 05:39:21 +10:00
parent fe98229539
commit 914c6febbe
4 changed files with 25 additions and 6 deletions

View File

@@ -130,6 +130,7 @@
<InstructionDefinition Id="return" PrimaryInstruction="Return" InstructionCount="1">
<Aliases>
<Alias Name="return"/>
<Alias Name="ret"/>
</Aliases>
<Parameters>
<InstructionParameter>

View File

@@ -26,13 +26,13 @@
SD,
// 0 1
// JAL RD
// JMP RD
// [I]Address (int32)
JAL,
JMP,
// Jump And Link If Conditional Register is set.
// JALF RD FlagID
// JIF RD FlagID
// [I]Address (int32)
JALF,
JIF,
// 0 1 2 3
// Load [R]Address [I]Len [R]T
Load,

View File

@@ -217,9 +217,9 @@ namespace SVM.Core
//Console.WriteLine($"SVM:SD:{data} form PC={PC}");
}
break;
case PrimaryInstruction.JAL:
case PrimaryInstruction.JMP:
break;
case PrimaryInstruction.JALF:
case PrimaryInstruction.JIF:
break;
case PrimaryInstruction.Load:
{