aboutsummaryrefslogtreecommitdiff
path: root/cmd/dump/main.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-05-28 15:17:02 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-05-28 15:17:02 +0200
commit42a28d800ef7959e5dedc58ef8cbf1614f48da4a (patch)
tree096b686a70a00632733d5e0c9f103146c57244d7 /cmd/dump/main.go
parent72103d06b5f2ef5670c029ed50a99525375dd62f (diff)
package
Diffstat (limited to 'cmd/dump/main.go')
-rw-r--r--cmd/dump/main.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/cmd/dump/main.go b/cmd/dump/main.go
new file mode 100644
index 0000000..451b934
--- /dev/null
+++ b/cmd/dump/main.go
@@ -0,0 +1,18 @@
+package main
+
+import (
+ "fmt"
+
+ "dim13.org/j1"
+)
+
+func main() {
+ body, err := j1.ReadBin("testdata/j1.bin")
+ if err != nil {
+ panic(err)
+ }
+ for i, v := range body {
+ inst := j1.Decode(v)
+ fmt.Printf("%0.4X %0.4X\t%s\n", 2*i, v, inst)
+ }
+}