diff options
| author | James Barnett <noreply@jamesbarnett.xyz> | 2018-06-14 21:18:14 +0100 |
|---|---|---|
| committer | James Barnett <noreply@jamesbarnett.xyz> | 2018-06-14 21:18:14 +0100 |
| commit | cf0f98348c5f4df57d3adb44418cc2911e7b37b7 (patch) | |
| tree | 8ee74dfcbd402e7966f8e57440a54ba34d35d899 /src/main/kotlin/ram/Ram.kt | |
| parent | 1d66a2c79cf98970ee80cbb1fe4262fa95c885dd (diff) | |
| download | KGB-cf0f98348c5f4df57d3adb44418cc2911e7b37b7.tar.xz KGB-cf0f98348c5f4df57d3adb44418cc2911e7b37b7.zip | |
Make a start on opcodes
Diffstat (limited to 'src/main/kotlin/ram/Ram.kt')
| -rw-r--r-- | src/main/kotlin/ram/Ram.kt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/kotlin/ram/Ram.kt b/src/main/kotlin/ram/Ram.kt new file mode 100644 index 0000000..93336a7 --- /dev/null +++ b/src/main/kotlin/ram/Ram.kt @@ -0,0 +1,16 @@ +package ram + +class Ram { + + // 64K memory area + var ram = IntArray(0xFFFF) + + fun readByte(address: Int) : Int { + return ram[address] + } + + fun writeByte(address: Int, data: Int) { + ram[address] = data + } + +}
\ No newline at end of file |