/// <summary> /// Erase the program from memory. /// </summary> public void Erase() { Bytecode.Clear(); Bytecode.Write("\0\0\0"); _protected = false; _lastStored = null; _lineNumberMap = new Dictionary <int, long> { { 65536, 0 } }; }
/// <summary> /// Write bytecode and cut the program of beyond the current position. /// </summary> /// <param name="byteCode">Bytecode to write</param> public void Truncate(string byteCode) { Bytecode.Clear(); Bytecode.Write(string.IsNullOrEmpty(byteCode) ? "\0\0\0" : byteCode); }