public void SaveToProgramStorage(ProgramStorage in_storage) { // store file in memory and update pointers ushort address = TEXT; ushort length = (ushort)(TOP - TEXT); for (int i = 0; i < length; i++) { in_storage.Data[i] = DebugUserMemoryReadByte(address + i); } in_storage.Length = length; }
public void LoadFromProgramStorage(ProgramStorage in_storage) { // store file in memory and update pointers ushort address = VLOMEM; for (int i = 0; i < in_storage.Length; i++) { DebugUserMemoryWriteByte(address + i, in_storage.Data[i]); } TEXT = VLOMEM; TOP = (ushort)(address + in_storage.Length + 1); }