aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/cpu/opcodes/Misc.kt
diff options
context:
space:
mode:
authorJames Barnett <noreply@jamesbarnett.xyz>2018-07-23 20:16:07 +0100
committerJames Barnett <noreply@jamesbarnett.xyz>2018-07-23 20:16:07 +0100
commit6acdde8f7093c0fb2e95d8dbc14dfab096b0a027 (patch)
treeb9608e85db3704eca7d571cc059e7723448823a9 /src/main/kotlin/cpu/opcodes/Misc.kt
parentc6a953d722b1fdc27a9db6f78f00c52fe43a7222 (diff)
downloadKGB-6acdde8f7093c0fb2e95d8dbc14dfab096b0a027.tar.xz
KGB-6acdde8f7093c0fb2e95d8dbc14dfab096b0a027.zip
Move lambda calls outside of parens
Diffstat (limited to 'src/main/kotlin/cpu/opcodes/Misc.kt')
-rw-r--r--src/main/kotlin/cpu/opcodes/Misc.kt42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/main/kotlin/cpu/opcodes/Misc.kt b/src/main/kotlin/cpu/opcodes/Misc.kt
index a72f6dc..cb02c9e 100644
--- a/src/main/kotlin/cpu/opcodes/Misc.kt
+++ b/src/main/kotlin/cpu/opcodes/Misc.kt
@@ -7,47 +7,47 @@ import BitManipulation as bm
var misc = mapOf(
- 0x27 to Operation("DAA", 0, 4, {r, _, _ ->
+ 0x27 to Operation("DAA", 0, 4) { r, _, _ ->
// TODO
- }),
+ },
- 0x2F to Operation("CPL", 0, 4, {r, _, _ ->
+ 0x2F to Operation("CPL", 0, 4) { r, _, _ ->
r.A = r.A.inv() and 0xFF
r.setFlag(Flag.SUBTRACT)
r.setFlag(Flag.HALF_CARRY)
- }),
+ },
- 0x3F to Operation("CCF", 0, 4, {r, _, _ ->
+ 0x3F to Operation("CCF", 0, 4) { r, _, _ ->
r.setFlagFromBool(Flag.CARRY, r.getFlag(Flag.CARRY) == 0)
r.clearFlag(Flag.SUBTRACT)
r.clearFlag(Flag.HALF_CARRY)
- }),
+ },
- 0x37 to Operation("SCF", 0, 4, {r, _, _ ->
+ 0x37 to Operation("SCF", 0, 4) { r, _, _ ->
r.clearFlag(Flag.SUBTRACT)
r.clearFlag(Flag.HALF_CARRY)
r.setFlag(Flag.CARRY)
- }),
+ },
- 0x00 to Operation("NOP", 0, 4, {_, _, _ -> }),
+ 0x00 to Operation("NOP", 0, 4) { _, _, _ -> },
// TODO - interrupt related
- 0x76 to Operation("HALT", 0, 4, {_, _, _ -> }),
- 0x10 to Operation("STOP", 0, 4, {_, _, _ -> }),
- 0xD3 to Operation("DI", 0, 4, {_, _, _ -> }),
- 0xFB to Operation("EI", 0, 4, {_, _, _ -> })
+ 0x76 to Operation("HALT", 0, 4) { _, _, _ -> },
+ 0x10 to Operation("STOP", 0, 4) { _, _, _ -> },
+ 0xD3 to Operation("DI", 0, 4) { _, _, _ -> },
+ 0xFB to Operation("EI", 0, 4) { _, _, _ -> }
)
val miscExtended = mapOf(
- 0x37 to Operation("SWAP A", 0, 8, {r, _, _ -> r.A = swap(r.A, r)}),
- 0x30 to Operation("SWAP B", 0, 8, {r, _, _ -> r.B = swap(r.B, r)}),
- 0x31 to Operation("SWAP C", 0, 8, {r, _, _ -> r.C = swap(r.C, r)}),
- 0x32 to Operation("SWAP D", 0, 8, {r, _, _ -> r.D = swap(r.D, r)}),
- 0x33 to Operation("SWAP E", 0, 8, {r, _, _ -> r.E = swap(r.E, r)}),
- 0x34 to Operation("SWAP H", 0, 8, {r, _, _ -> r.H = swap(r.H, r)}),
- 0x35 to Operation("SWAP L", 0, 8, {r, _, _ -> r.L = swap(r.L, r)}),
- 0x36 to Operation("SWAP (HL)", 0, 16, {r, m, _ -> m.writeByte(r.HL, swap(m.readByte(r.HL), r))})
+ 0x37 to Operation("SWAP A", 0, 8) { r, _, _ -> r.A = swap(r.A, r)},
+ 0x30 to Operation("SWAP B", 0, 8) { r, _, _ -> r.B = swap(r.B, r)},
+ 0x31 to Operation("SWAP C", 0, 8) { r, _, _ -> r.C = swap(r.C, r)},
+ 0x32 to Operation("SWAP D", 0, 8) { r, _, _ -> r.D = swap(r.D, r)},
+ 0x33 to Operation("SWAP E", 0, 8) { r, _, _ -> r.E = swap(r.E, r)},
+ 0x34 to Operation("SWAP H", 0, 8) { r, _, _ -> r.H = swap(r.H, r)},
+ 0x35 to Operation("SWAP L", 0, 8) { r, _, _ -> r.L = swap(r.L, r)},
+ 0x36 to Operation("SWAP (HL)", 0, 16) { r, m, _ -> m.writeByte(r.HL, swap(m.readByte(r.HL), r))}
)