diff options
| author | James Barnett <noreply@jamesbarnett.xyz> | 2018-06-15 22:10:47 +0100 |
|---|---|---|
| committer | James Barnett <noreply@jamesbarnett.xyz> | 2018-06-15 22:10:47 +0100 |
| commit | d8dbfe55f4741a9cf70c1b95762461e08eb08f22 (patch) | |
| tree | 779df3fc4192b251da8f9f1e9e712376d9f096c9 /src/main/kotlin/BitManipulation.kt | |
| parent | 22f3463e3128947df69cb6444c82bd73350d5cc5 (diff) | |
| download | KGB-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.kt | 4 |
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) } |