Created functions to allow for data to be written to and read from memory using bianry strings.
This commit is contained in:
@@ -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()}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user