about summary refs log tree commit diff stats
path: root/ex1.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-04-05 21:10:45 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-04-05 21:15:06 -0700
commit928fd47d680a5cbdfa798c4a66ee61f693407faf (patch)
tree769ffeaa141867939ed4e80ef41222c0e4430c66 /ex1.mu
parent463878a4a4690392455080282287316879a5a649 (diff)
downloadmu-928fd47d680a5cbdfa798c4a66ee61f693407faf.tar.gz
snapshot: stupid debugging session
I spent a while building a little keyboard scancode printer:

  $ ./translate ex1.mu &&  qemu-system-i386 disk.img

..and wondering why up-arrow was 0x48 in hex but 724 in decimal. I ended
up paranoidly poking at a bunch of crap (though there _is_ a cool chromatography-based
debugging technique in 126write-int-decimal.subx) before I realized:

  - 724 just has one extra digit over the correct answer
  - the 0xe0 scan code is a 3-digit number in decimal -- and the final digit is '4'

There's nothing actually wrong.
Diffstat (limited to 'ex1.mu')
-rw-r--r--ex1.mu3
1 files changed, 3 insertions, 0 deletions
diff --git a/ex1.mu b/ex1.mu
new file mode 100644
index 00000000..0b379f60
--- /dev/null
+++ b/ex1.mu
@@ -0,0 +1,3 @@
+fn main screen: (addr screen), keyboard: (addr keyboard), data-disk: (addr disk) {
+  loop
+}