aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/BitManipulation.kt
diff options
context:
space:
mode:
authorJames Barnett <noreply@jamesbarnett.xyz>2018-06-15 22:10:47 +0100
committerJames Barnett <noreply@jamesbarnett.xyz>2018-06-15 22:10:47 +0100
commitd8dbfe55f4741a9cf70c1b95762461e08eb08f22 (patch)
tree779df3fc4192b251da8f9f1e9e712376d9f096c9 /src/main/kotlin/BitManipulation.kt
parent22f3463e3128947df69cb6444c82bd73350d5cc5 (diff)
downloadKGB-d8dbfe55f4741a9cf70c1b95762461e08eb08f22.tar.xz
KGB-d8dbfe55f4741a9cf70c1b95762461e08eb08f22.zip
Add all 8-Bit Load opcodes
Diffstat (limited to 'src/main/kotlin/BitManipulation.kt')
-rw-r--r--src/main/kotlin/BitManipulation.kt4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/kotlin/BitManipulation.kt b/src/main/kotlin/BitManipulation.kt
index a9f9493..b4215e8 100644
--- a/src/main/kotlin/BitManipulation.kt
+++ b/src/main/kotlin/BitManipulation.kt
@@ -4,6 +4,10 @@ object BitManipulation {
return msb.shl(8) + lsb
}
+ fun argsToWord(args: IntArray): Int {
+ return bytesToWord(args[1], args[0])
+ }
+
fun getMsb(value: Int): Int {
return value.shr(8)
}