aboutsummaryrefslogtreecommitdiff
path: root/parse.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2018-02-10 12:45:04 +0100
committerDimitri Sokolyuk <demon@dim13.org>2018-02-10 12:45:04 +0100
commitdc38e0e417bcf4596584aa01ff25d7027cbf0b3e (patch)
tree6a24832ac8ce723f2e53e734f10c289813d3a963 /parse.go
parente0801f75db8c3a1c53feee026deaf535c6f826e5 (diff)
...
Diffstat (limited to 'parse.go')
-rw-r--r--parse.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse.go b/parse.go
index a117f93..307f2a3 100644
--- a/parse.go
+++ b/parse.go
@@ -76,7 +76,7 @@ func newALU(v uint16) ALU {
TtoR: v&(1<<6) != 0,
NtoAtT: v&(1<<5) != 0,
Rdir: expand[(v>>2)&3],
- Ddir: expand[v&3],
+ Ddir: expand[(v>>0)&3],
}
}
@@ -95,7 +95,7 @@ func (v ALU) value() uint16 {
ret |= 1 << 5
}
ret |= uint16(v.Rdir&3) << 2
- ret |= uint16(v.Ddir & 3)
+ ret |= uint16(v.Ddir&3) << 0
return ret
}