Example #1
0
 public VirtualMemory()
     : base()
 {
     _memory = new MemoryCell[(int)Math.Pow(MEMORY_SIZE_WORD, 2)];
 }
Example #2
0
 /// <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));
         }
     }
 }
Example #3
0
 public Memory()
     : base()
 {
     _memory = new MemoryCell[MEMORY_SIZE_BLOCK * MEMORY_SIZE_WORD];
 }
Example #4
0
 /// <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;
 }