mirror of
https://github.com/livingcomputermuseum/ContrAlto.git
synced 2026-04-18 00:47:23 +00:00
Implemented ALU, most of Memory state machine.
This commit is contained in:
28
Contralto/Memory/Memory.cs
Normal file
28
Contralto/Memory/Memory.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contralto.Memory
|
||||
{
|
||||
public class Memory : IMemoryMappedDevice
|
||||
{
|
||||
public Memory()
|
||||
{
|
||||
_mem = new ushort[0xffff];
|
||||
}
|
||||
|
||||
public ushort Read(int address)
|
||||
{
|
||||
return _mem[address];
|
||||
}
|
||||
|
||||
public void Load(int address, ushort data)
|
||||
{
|
||||
_mem[address] = data;
|
||||
}
|
||||
|
||||
private ushort[] _mem;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user