public VirtualMemory() : base() { _memory = new MemoryCell[(int)Math.Pow(MEMORY_SIZE_WORD, 2)]; }
/// <summary> /// Puts one word into first free cell /// </summary> /// <param name="data">data</param> public void Set(MemoryCell data) { for (int i = 0; i < _memory.Length; i++) { if (String.IsNullOrEmpty(_memory[i].Value)) { Set(data, new Address(i)); } } }
public Memory() : base() { _memory = new MemoryCell[MEMORY_SIZE_BLOCK * MEMORY_SIZE_WORD]; }
/// <summary> /// Puts one word into given address /// </summary> /// <param name="data">data</param> /// <param name="address">address</param> public void Set(MemoryCell data, Address address) { _memory[address.FullAddress] = data; }