internal void initHeapMemory(uint @startHeapMemory) { var mem = MRT.Ram.Stream; var c = MRT.Registers["esi"]; mem.Stream.Seek(c); mem.Stream.push(ObjectsMap.Serialize(@startHeapMemory, ushort.MaxValue, ushort.MaxValue), 64); }
internal void destVar() { var mem = MRT.Ram.Stream; var c = MRT.Registers["esi"] -= 8; mem.Stream.Seek(c); mem.Stream.push(ObjectsMap.Serialize(0, 0, 0), 64); }
public unsafe static ObjectsMap ToObjectsMap(byte[] bytes) { long l = 0; fixed(byte *numRef = &(bytes[0])) l = *(((long *)numRef)); ObjectsMap j = new ObjectsMap() { address = (uint)l & 0xfffffff, size = (ushort)(l >> 32), isDeleted = (uint)(l >> 48), }; return(j); }
internal uint newVar(ushort size) { var mem = MRT.Ram.Stream; var c = MRT.Registers["esi"]; mem.Seek(c - 8); uint addr = (uint)mem.read(32) + (uint)mem.read(16); mem.Stream.Seek(c); mem.Stream.push(ObjectsMap.Serialize(addr, size, 0), 64); MRT.Registers["esi"] += 8; var q = @"{ }"; return(addr); }