https://github.com/akkartik/mu/blob/main/baremetal/400.mu
1
2 sig pixel screen: (addr screen), x: int, y: int, color: int
3 sig draw-grapheme screen: (addr screen), g: grapheme, x: int, y: int, color: int
4 sig cursor-position screen: (addr screen) -> _/eax: int, _/ecx: int
5 sig set-cursor-position screen: (addr screen), x: int, y: int
6
7
8 sig read-key kbd: (addr keyboard) -> _/eax: byte
9
10
11 sig count-test-failure
12 sig num-test-failures -> _/eax: int
13
14
15 sig clear-stream f: (addr stream _)
16 sig rewind-stream f: (addr stream _)
17 sig write f: (addr stream byte), s: (addr array byte)
18 sig append-byte f: (addr stream byte), n: int
19 sig read-byte s: (addr stream byte) -> _/eax: byte
20 sig stream-empty? s: (addr stream _) -> _/eax: boolean