From 117a710a9d04c7176ce192cdb26134d2828478f9 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sat, 16 Jan 2021 16:24:38 -0800 Subject: 7530 - baremetal: print ints to screen --- baremetal/400.mu | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'baremetal/400.mu') 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 -- cgit 1.4.1-2-gfad0