about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-07-22 17:40:10 -0700
committerKartik Agaram <vc@akkartik.com>2019-07-22 17:40:10 -0700
commit372ec293670aded06f77f77fe836b279be31abfb (patch)
treed175abdf6738b2eaf1b11d17e1fe7cb373704251
parent4dc5dfa56f1ed1dbf31c1eaade739eda7ba6b046 (diff)
downloadmu-372ec293670aded06f77f77fe836b279be31abfb.tar.gz
5450
A couple of scripts that help debug discrepancies in the self-hosted translator.
-rwxr-xr-xsubx/diff_ntranslate6
-rwxr-xr-xsubx/diff_translate6
2 files changed, 12 insertions, 0 deletions
diff --git a/subx/diff_ntranslate b/subx/diff_ntranslate
new file mode 100755
index 00000000..a6fb3737
--- /dev/null
+++ b/subx/diff_ntranslate
@@ -0,0 +1,6 @@
+#!/usr/bin/env zsh
+
+subx translate $* -o a0.elf
+xxd a0.elf > a0.xxd
+./ntranslate $*  # into a.elf and a.xxd
+diff a0.xxd a.xxd
diff --git a/subx/diff_translate b/subx/diff_translate
new file mode 100755
index 00000000..d0224fd7
--- /dev/null
+++ b/subx/diff_translate
@@ -0,0 +1,6 @@
+#!/usr/bin/env zsh
+
+subx translate $* -o a0.elf
+xxd a0.elf > a0.xxd
+./translate $*  # into a.elf and a.xxd
+diff a0.xxd a.xxd