Implemented Save.

Added definition of SAVE.
This commit is contained in:
2025-08-06 05:26:57 +10:00
parent 97e3ce81eb
commit 18ad735a32
3 changed files with 40 additions and 0 deletions

View File

@@ -182,6 +182,15 @@ namespace SVM.Core
break;
case PrimaryInstruction.Save:
{
var Reg = Instruction.GetData<byte>(1);
var Length = Instruction.GetData<byte>(2);
var Target = Instruction.GetData<byte>(3);
var tgtSVMPtr = registers.GetData<SVMPointer>(Target);
var tgtPtr = GetPointer(tgtSVMPtr);
var srcPtr = registers.GetPtr(Reg);
Buffer.MemoryCopy(srcPtr, (byte*)tgtPtr, Length, Length);
}
break;
case PrimaryInstruction.Call:
break;