The assembler is partially working now.

This commit is contained in:
2025-07-28 23:11:24 +10:00
parent 4faef5337b
commit be8a9768ec
6 changed files with 15 additions and 29 deletions

View File

@@ -80,7 +80,7 @@ namespace SVM.Assembler.Core
SVMNativeTypes.Double => sizeof(double),
_ => 0,
};
Buffer.MemoryCopy(dataStart, inst + Pos * sizeof(byte), size, size);
Buffer.MemoryCopy(dataStart, ((byte*)inst) + Pos * sizeof(byte), size, size);
}
public unsafe static bool ParseAndWriteData(SVMInstruction* inst, SVMNativeTypes nativeType, int Pos, string value)
{
@@ -291,7 +291,6 @@ namespace SVM.Assembler.Core
offset += (uint)data2.Length;
Data.Add(data);
}
Console.WriteLine($"Instruction Count:{Obj.instructions.Count}");
foreach (var item in Obj.instructions)
{
if (definition.InstructionDefinitions.TryGetValue(item.inst, out var def))