From 1a21dda59c69685fcc11d81e5fb3178f7220e021 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 10 Feb 2018 15:36:27 +0100 Subject: ... --- parse.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parse.go b/parse.go index cac3549..c3ef27d 100644 --- a/parse.go +++ b/parse.go @@ -68,6 +68,9 @@ type ALU struct { Ddir int8 } +// expand 2 bit unsigned to 8 bit signed +var expand = map[uint16]int8{0: 0, 1: 1, 2: -2, 3: -1} + func newALU(v uint16) ALU { return ALU{ Opcode: (v >> 8) & 15, @@ -101,9 +104,6 @@ func (v ALU) value() uint16 { func (v ALU) compile() uint16 { return v.value() | (3 << 13) } -// expand 2 bit unsigned to 8 bit signed -var expand = map[uint16]int8{0: 0, 1: 1, 2: -2, 3: -1} - const ( opT = iota // 0 opN // 1 -- cgit v1.2.3