aboutsummaryrefslogtreecommitdiff
path: root/parse.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-05-26 01:55:42 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-05-26 01:55:42 +0200
commit50eb8eaccf27b6f87570a612349d103f7a976de1 (patch)
treeb7fffe765db7d088bd9d31d966bc615ca851ce0d /parse.go
parent114a327dd3b6a2901166a518becbe04099a062da (diff)
..
Diffstat (limited to 'parse.go')
-rw-r--r--parse.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/parse.go b/parse.go
index fbc553e..f94e861 100644
--- a/parse.go
+++ b/parse.go
@@ -31,7 +31,7 @@ func Decode(v uint16) Instruction {
case v&(7<<13) == 0:
return newJump(v)
case v&(7<<13) == 1<<13:
- return newCondJump(v)
+ return newCond(v)
case v&(7<<13) == 1<<14:
return newCall(v)
case v&(7<<13) == 3<<13:
@@ -56,11 +56,11 @@ func newJump(v uint16) Jump { return Jump(v << 1) }
func (v Jump) String() string { return fmt.Sprintf("UBRANCH %0.4X", uint16(v)) }
func (v Jump) isInstruction() {}
-type CondJump uint16
+type Cond uint16
-func newCondJump(v uint16) CondJump { return CondJump(v << 1) }
-func (v CondJump) String() string { return fmt.Sprintf("0BRANCH %0.4X", uint16(v)) }
-func (v CondJump) isInstruction() {}
+func newCond(v uint16) Cond { return Cond(v << 1) }
+func (v Cond) String() string { return fmt.Sprintf("0BRANCH %0.4X", uint16(v)) }
+func (v Cond) isInstruction() {}
type Call uint16