Created functions to allow for data to be written to and read from memory using bianry strings.

This commit is contained in:
2026-05-31 20:36:00 -04:00
parent 9efadc3b4a
commit a958d11c4e
13 changed files with 83 additions and 15 deletions
+8
View File
@@ -13,6 +13,14 @@ namespace CPUSimulation
{
Word dataToWrite = GenerateRandomWord(_random.Next(1, 5));
_memoryController.Write((Int16)i, dataToWrite);
//Word dataRead = _memoryController.Read((Int16)i);
//Console.WriteLine($"Data read from address {new Address((Int16)i).ToString()}: {dataRead.ToString()}");
}
_memoryController.Write("0000000000000001","0000000011110000");
_memoryController.Write("0000000000000010","1111000000001111");
for (int i = 0; i < 16; i++)
{
Word dataRead = _memoryController.Read((Int16)i);
Console.WriteLine($"Data read from address {new Address((Int16)i).ToString()}: {dataRead.ToString()}");
}