blob: 3180aeb7441bae845f3d040499e97aff338073ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package cpu
import cpu.opcodes.*
import ram.Ram
class Cpu {
val registers = Registers()
val ram = Ram()
var opcodes: Map<Int, Operation>
init {
val commandGroups: MutableMap<Int, Operation> = mutableMapOf()
commandGroups.putAll(loads8Bit)
commandGroups.putAll(loads16Bit)
commandGroups.putAll(arithmetic8Bit)
commandGroups.putAll(arithmetic16Bit)
commandGroups.putAll(misc)
opcodes = commandGroups.toMap()
}
}
|