aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-06-18 12:50:14 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-06-18 12:50:14 +0200
commit6d65226144694ff1d40145f7b05488a10162e55a (patch)
tree8865579c6098f788d3fbd15972d2ea772cf2660e
parent6a57e671b8d534b45d07316ec751a2d99e380803 (diff)
Fix noop
-rw-r--r--basewords.go2
-rw-r--r--basewords_test.go6
2 files changed, 5 insertions, 3 deletions
diff --git a/basewords.go b/basewords.go
index 47e92c5..17ee32d 100644
--- a/basewords.go
+++ b/basewords.go
@@ -1,7 +1,7 @@
package j1
var BaseWords = map[string][]ALU{
- "noop": {{Opcode: opN}},
+ "noop": {{Opcode: opT}},
"+": {{Opcode: opTplusN, Ddir: -1}},
"xor": {{Opcode: opTxorN, Ddir: -1}},
"and": {{Opcode: opTandN, Ddir: -1}},
diff --git a/basewords_test.go b/basewords_test.go
index 769036d..a1dd917 100644
--- a/basewords_test.go
+++ b/basewords_test.go
@@ -5,9 +5,11 @@ import "testing"
func TestBaseWords(t *testing.T) {
for word, alu := range BaseWords {
t.Run(word, func(t *testing.T) {
- for _, ins := range alu {
- t.Logf("%4.0X", ins.Compile())
+ buf := make([]uint16, len(alu))
+ for i, ins := range alu {
+ buf[i] = ins.Compile()
}
+ t.Logf("%4.0X", buf)
})
}
}