Skip to content

Instantly share code, notes, and snippets.

@dbousamra
Created July 30, 2011 05:45
Show Gist options
  • Save dbousamra/1115243 to your computer and use it in GitHub Desktop.
Save dbousamra/1115243 to your computer and use it in GitHub Desktop.
def run(breakPoint : Int) = {
var x = 0
while (x < breakPoint) {
val opcode = memory.readByte8(this, registers.pc)
registers.pc = (registers.pc + 1) & 0xFFFF //prevent overflow
opcodes.execute(opcode, this)
if (DEBUG_MODE) {
println(debugTraces(opcode))
}
x += 1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment