Skip to content

Instantly share code, notes, and snippets.

@dbousamra
Created August 1, 2011 09:52
Show Gist options
  • Save dbousamra/1117870 to your computer and use it in GitHub Desktop.
Save dbousamra/1117870 to your computer and use it in GitHub Desktop.
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