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/Shifts.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/Shifts.kt')
| -rw-r--r-- | src/main/kotlin/cpu/opcodes/Shifts.kt | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/main/kotlin/cpu/opcodes/Shifts.kt b/src/main/kotlin/cpu/opcodes/Shifts.kt index 04e68bc..d34006b 100644 --- a/src/main/kotlin/cpu/opcodes/Shifts.kt +++ b/src/main/kotlin/cpu/opcodes/Shifts.kt @@ -7,32 +7,32 @@ import BitManipulation as bm val shiftsExtended = mapOf( - 0x27 to Operation("SLA A", 0, 8, {r, _, _ -> r.A = shiftLeft(r.A, r) }), - 0x20 to Operation("SLA B", 0, 8, {r, _, _ -> r.A = shiftLeft(r.B, r) }), - 0x21 to Operation("SLA C", 0, 8, {r, _, _ -> r.A = shiftLeft(r.C, r) }), - 0x22 to Operation("SLA D", 0, 8, {r, _, _ -> r.A = shiftLeft(r.D, r) }), - 0x23 to Operation("SLA E", 0, 8, {r, _, _ -> r.A = shiftLeft(r.E, r) }), - 0x24 to Operation("SLA H", 0, 8, {r, _, _ -> r.A = shiftLeft(r.H, r) }), - 0x25 to Operation("SLA L", 0, 8, {r, _, _ -> r.A = shiftLeft(r.L, r) }), - 0x26 to Operation("SLA (HL)", 0, 16, {r, m, _ -> m.writeByte(r.HL, shiftLeft(m.readByte(r.HL), r))}), - - 0x2F to Operation("SRA A", 0, 8, {r, _, _ -> r.A = shiftRight(r.A, r) }), - 0x28 to Operation("SRA B", 0, 8, {r, _, _ -> r.A = shiftRight(r.B, r) }), - 0x29 to Operation("SRA C", 0, 8, {r, _, _ -> r.A = shiftRight(r.C, r) }), - 0x2A to Operation("SRA D", 0, 8, {r, _, _ -> r.A = shiftRight(r.D, r) }), - 0x2B to Operation("SRA E", 0, 8, {r, _, _ -> r.A = shiftRight(r.E, r) }), - 0x2C to Operation("SRA H", 0, 8, {r, _, _ -> r.A = shiftRight(r.H, r) }), - 0x2D to Operation("SRA L", 0, 8, {r, _, _ -> r.A = shiftRight(r.L, r) }), - 0x2E to Operation("SRA (HL)", 0, 16, {r, m, _ -> m.writeByte(r.HL, shiftRight(m.readByte(r.HL), r))}), - - 0x3F to Operation("SRL A", 0, 8, {r, _, _ -> r.A = shiftRightMsb0(r.A, r) }), - 0x38 to Operation("SRL B", 0, 8, {r, _, _ -> r.A = shiftRightMsb0(r.B, r) }), - 0x39 to Operation("SRL C", 0, 8, {r, _, _ -> r.A = shiftRightMsb0(r.C, r) }), - 0x3A to Operation("SRL D", 0, 8, {r, _, _ -> r.A = shiftRightMsb0(r.D, r) }), - 0x3B to Operation("SRL E", 0, 8, {r, _, _ -> r.A = shiftRightMsb0(r.E, r) }), - 0x3C to Operation("SRL H", 0, 8, {r, _, _ -> r.A = shiftRightMsb0(r.H, r) }), - 0x3D to Operation("SRL L", 0, 8, {r, _, _ -> r.A = shiftRightMsb0(r.L, r) }), - 0x3E to Operation("SRL (HL)", 0, 16, {r, m, _ -> m.writeByte(r.HL, shiftRightMsb0(m.readByte(r.HL), r))}) + 0x27 to Operation("SLA A", 0, 8) { r, _, _ -> r.A = shiftLeft(r.A, r) }, + 0x20 to Operation("SLA B", 0, 8) { r, _, _ -> r.A = shiftLeft(r.B, r) }, + 0x21 to Operation("SLA C", 0, 8) { r, _, _ -> r.A = shiftLeft(r.C, r) }, + 0x22 to Operation("SLA D", 0, 8) { r, _, _ -> r.A = shiftLeft(r.D, r) }, + 0x23 to Operation("SLA E", 0, 8) { r, _, _ -> r.A = shiftLeft(r.E, r) }, + 0x24 to Operation("SLA H", 0, 8) { r, _, _ -> r.A = shiftLeft(r.H, r) }, + 0x25 to Operation("SLA L", 0, 8) { r, _, _ -> r.A = shiftLeft(r.L, r) }, + 0x26 to Operation("SLA (HL)", 0, 16) { r, m, _ -> m.writeByte(r.HL, shiftLeft(m.readByte(r.HL), r))}, + + 0x2F to Operation("SRA A", 0, 8) { r, _, _ -> r.A = shiftRight(r.A, r) }, + 0x28 to Operation("SRA B", 0, 8) { r, _, _ -> r.A = shiftRight(r.B, r) }, + 0x29 to Operation("SRA C", 0, 8) { r, _, _ -> r.A = shiftRight(r.C, r) }, + 0x2A to Operation("SRA D", 0, 8) { r, _, _ -> r.A = shiftRight(r.D, r) }, + 0x2B to Operation("SRA E", 0, 8) { r, _, _ -> r.A = shiftRight(r.E, r) }, + 0x2C to Operation("SRA H", 0, 8) { r, _, _ -> r.A = shiftRight(r.H, r) }, + 0x2D to Operation("SRA L", 0, 8) { r, _, _ -> r.A = shiftRight(r.L, r) }, + 0x2E to Operation("SRA (HL)", 0, 16) { r, m, _ -> m.writeByte(r.HL, shiftRight(m.readByte(r.HL), r))}, + + 0x3F to Operation("SRL A", 0, 8) { r, _, _ -> r.A = shiftRightMsb0(r.A, r) }, + 0x38 to Operation("SRL B", 0, 8) { r, _, _ -> r.A = shiftRightMsb0(r.B, r) }, + 0x39 to Operation("SRL C", 0, 8) { r, _, _ -> r.A = shiftRightMsb0(r.C, r) }, + 0x3A to Operation("SRL D", 0, 8) { r, _, _ -> r.A = shiftRightMsb0(r.D, r) }, + 0x3B to Operation("SRL E", 0, 8) { r, _, _ -> r.A = shiftRightMsb0(r.E, r) }, + 0x3C to Operation("SRL H", 0, 8) { r, _, _ -> r.A = shiftRightMsb0(r.H, r) }, + 0x3D to Operation("SRL L", 0, 8) { r, _, _ -> r.A = shiftRightMsb0(r.L, r) }, + 0x3E to Operation("SRL (HL)", 0, 16) { r, m, _ -> m.writeByte(r.HL, shiftRightMsb0(m.readByte(r.HL), r))} ) |