diff options
| author | James Barnett <noreply@jamesbarnett.xyz> | 2018-07-23 20:16:07 +0100 |
|---|---|---|
| committer | James Barnett <noreply@jamesbarnett.xyz> | 2018-07-23 20:16:07 +0100 |
| commit | 6acdde8f7093c0fb2e95d8dbc14dfab096b0a027 (patch) | |
| tree | b9608e85db3704eca7d571cc059e7723448823a9 /src/main/kotlin/cpu/opcodes/Jumps.kt | |
| parent | c6a953d722b1fdc27a9db6f78f00c52fe43a7222 (diff) | |
| download | KGB-6acdde8f7093c0fb2e95d8dbc14dfab096b0a027.tar.xz KGB-6acdde8f7093c0fb2e95d8dbc14dfab096b0a027.zip | |
Move lambda calls outside of parens
Diffstat (limited to 'src/main/kotlin/cpu/opcodes/Jumps.kt')
| -rw-r--r-- | src/main/kotlin/cpu/opcodes/Jumps.kt | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/main/kotlin/cpu/opcodes/Jumps.kt b/src/main/kotlin/cpu/opcodes/Jumps.kt index 6e0ea3e..a1b81e4 100644 --- a/src/main/kotlin/cpu/opcodes/Jumps.kt +++ b/src/main/kotlin/cpu/opcodes/Jumps.kt @@ -6,17 +6,17 @@ import BitManipulation as bm val jumps = mapOf( - 0xC3 to Operation("JP nn", 2, 12, {r, _, a -> r.PC = bm.argsToWord(a)}), - 0xC2 to Operation("JP NZ,nn", 2, 12, {r, _, a -> if(r.getFlag(Flag.ZERO) == 0) r.PC = bm.argsToWord(a)}), - 0xCA to Operation("JP Z,nn", 2, 12, {r, _, a -> if(r.getFlag(Flag.ZERO) == 1) r.PC = bm.argsToWord(a)}), - 0xD2 to Operation("JP NC,nn", 2, 12, {r, _, a -> if(r.getFlag(Flag.CARRY) == 0) r.PC = bm.argsToWord(a)}), - 0xDA to Operation("JP C,nn", 2, 12, {r, _, a -> if(r.getFlag(Flag.CARRY) == 1) r.PC = bm.argsToWord(a)}), - 0xE9 to Operation("JP (HL)", 0, 4, {r, m, _ -> r.PC = m.readByte(r.HL)}), + 0xC3 to Operation("JP nn", 2, 12) { r, _, a -> r.PC = bm.argsToWord(a)}, + 0xC2 to Operation("JP NZ,nn", 2, 12) { r, _, a -> if(r.getFlag(Flag.ZERO) == 0) r.PC = bm.argsToWord(a)}, + 0xCA to Operation("JP Z,nn", 2, 12) { r, _, a -> if(r.getFlag(Flag.ZERO) == 1) r.PC = bm.argsToWord(a)}, + 0xD2 to Operation("JP NC,nn", 2, 12) { r, _, a -> if(r.getFlag(Flag.CARRY) == 0) r.PC = bm.argsToWord(a)}, + 0xDA to Operation("JP C,nn", 2, 12) { r, _, a -> if(r.getFlag(Flag.CARRY) == 1) r.PC = bm.argsToWord(a)}, + 0xE9 to Operation("JP (HL)", 0, 4) { r, m, _ -> r.PC = m.readByte(r.HL)}, - 0x18 to Operation("JR n", 1, 8, {r, _, a -> r.addSignedByteToPC(a[0])}), - 0x20 to Operation("JR NZ,n", 1, 8, {r, _, a -> if(r.getFlag(Flag.ZERO) == 0) r.addSignedByteToPC(a[0])}), - 0x28 to Operation("JR Z,n", 1, 8, {r, _, a -> if(r.getFlag(Flag.ZERO) == 1) r.addSignedByteToPC(a[0])}), - 0x30 to Operation("JR NC,n", 1, 8, {r, _, a -> if(r.getFlag(Flag.CARRY) == 0) r.addSignedByteToPC(a[0])}), - 0x38 to Operation("JR C,n", 1, 8, {r, _, a -> if(r.getFlag(Flag.CARRY) == 1) r.addSignedByteToPC(a[0])}) + 0x18 to Operation("JR n", 1, 8) { r, _, a -> r.addSignedByteToPC(a[0])}, + 0x20 to Operation("JR NZ,n", 1, 8) { r, _, a -> if(r.getFlag(Flag.ZERO) == 0) r.addSignedByteToPC(a[0])}, + 0x28 to Operation("JR Z,n", 1, 8) { r, _, a -> if(r.getFlag(Flag.ZERO) == 1) r.addSignedByteToPC(a[0])}, + 0x30 to Operation("JR NC,n", 1, 8) { r, _, a -> if(r.getFlag(Flag.CARRY) == 0) r.addSignedByteToPC(a[0])}, + 0x38 to Operation("JR C,n", 1, 8) { r, _, a -> if(r.getFlag(Flag.CARRY) == 1) r.addSignedByteToPC(a[0])} )
\ No newline at end of file |