aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.go b/main.go
index 609cf86..ed78f90 100644
--- a/main.go
+++ b/main.go
@@ -51,11 +51,11 @@ func Decode(v uint16) string {
case v&(1<<15) == 1<<15:
return fmt.Sprintf("LIT %0.4X", v&0x7fff)
case v&(7<<13) == 0:
- return fmt.Sprintf("UBRANCH %0.4X", v&0x1fff)
+ return fmt.Sprintf("UBRANCH %0.4X", v<<1)
case v&(7<<13) == 1<<13:
- return fmt.Sprintf("0BRANCH %0.4X", v&0x1fff)
+ return fmt.Sprintf("0BRANCH %0.4X", v<<1)
case v&(7<<13) == 1<<14:
- return fmt.Sprintf("CALL %0.4X", v&0x1fff)
+ return fmt.Sprintf("CALL %0.4X", v<<1)
case v&(7<<13) == 3<<13:
op := (v >> 8) & 15
s := "ALU " + opcodes[op]