about summary refs log tree commit diff stats
path: root/baremetal/400.mu
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2021-01-16 16:24:38 -0800
committerKartik Agaram <vc@akkartik.com>2021-01-16 16:27:58 -0800
commit117a710a9d04c7176ce192cdb26134d2828478f9 (patch)
tree27049218b292f865ad55c907bacc1824e5022cfb /baremetal/400.mu
parent6efc1ebed7131a8cd88aafdce8eaa8ee0260d692 (diff)
downloadmu-117a710a9d04c7176ce192cdb26134d2828478f9.tar.gz
7530 - baremetal: print ints to screen
Diffstat (limited to 'baremetal/400.mu')
-rw-r--r--baremetal/400.mu14
1 files changed, 13 insertions, 1 deletions
diff --git a/baremetal/400.mu b/baremetal/400.mu
index 94820e68..4dfb9951 100644
--- a/baremetal/400.mu
+++ b/baremetal/400.mu
@@ -15,8 +15,17 @@ sig num-test-failures -> _/eax: int
 sig clear-stream f: (addr stream _)
 sig rewind-stream f: (addr stream _)
 sig write f: (addr stream byte), s: (addr array byte)
-sig append-byte f: (addr stream byte), n: int
 sig read-byte s: (addr stream byte) -> _/eax: byte
+sig append-byte f: (addr stream byte), n: int
+#sig to-hex-char in/eax: int -> out/eax: int
+sig append-byte-hex f: (addr stream byte), n: int
+sig write-int32-hex f: (addr stream byte), n: int
+sig write-int32-hex-bits f: (addr stream byte), n: int, bits: int
+sig is-hex-int? in: (addr slice) -> _/eax: boolean
+sig parse-hex-int in: (addr array byte) -> _/eax: int
+sig parse-hex-int-from-slice in: (addr slice) -> _/eax: int
+#sig parse-hex-int-helper start: (addr byte), end: (addr byte) -> _/eax: int
+sig is-hex-digit? c: byte -> _/eax: boolean
 #sig allocate ad: (addr allocation-descriptor), n: int, out: (addr handle _)
 #sig allocate-raw ad: (addr allocation-descriptor), n: int, out: (addr handle _)
 sig lookup h: (handle _T) -> _/eax: (addr _T)
@@ -26,4 +35,7 @@ sig copy-handle src: (handle _T), dest: (addr handle _T)
 #sig allocate-array ad: (addr allocation-descriptor), n: int, out: (addr handle _)
 sig copy-array ad: (addr allocation-descriptor), src: (addr array _T), out: (addr handle array _T)
 #sig zero-out start: (addr byte), size: int
+sig write-int32-decimal out: (addr stream byte), n: int
+sig is-decimal-digit? c: grapheme -> _/eax: boolean
+sig to-decimal-digit in: grapheme -> _/eax: int
 sig stream-empty? s: (addr stream _) -> _/eax: boolean