Created
August 1, 2011 09:52
-
-
Save dbousamra/1117870 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Opcodes2(cpu : Cpu) { | |
def execute(opcode : Int) = opcode match { | |
case 0x06 => LD_nn_n(cpu.registers.b) | |
case 0x0E => LD_nn_n(cpu.registers.b) | |
case 0x16 => LD_nn_n(cpu.registers.d) | |
case 0x1E => LD_nn_n(cpu.registers.e) | |
case 0x26 => LD_nn_n(cpu.registers.h) | |
case 0x2E => LD_nn_n(cpu.registers.l) | |
} | |
def LD_nn_n(register : Int) = { | |
register.value = 0 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment