https://github.com/akkartik/mu/blob/main/400.mu
1
2 sig pixel-on-real-screen x: int, y: int, color: int
3 sig draw-grapheme-on-real-screen g: grapheme, x: int, y: int, color: int, background-color: int
4 sig cursor-position-on-real-screen -> _/eax: int, _/ecx: int
5 sig set-cursor-position-on-real-screen x: int, y: int
6 sig draw-cursor-on-real-screen g: grapheme
7
8
9 sig read-key kbd: (addr keyboard) -> _/eax: byte
10
11
12 sig load-first-sector-from-primary-bus-secondary-drive out: (addr stream byte)
13 sig store-first-sector-to-primary-bus-secondary-drive out: (addr stream byte)
14
15
16 sig read-mouse-event -> _/eax: int, _/ecx: int
17
18
19 sig count-test-failure
20 sig num-test-failures -> _/eax: int
21
22 sig string-equal? s: (addr array byte), benchmark: (addr array byte) -> _/eax: boolean
23 sig string-starts-with? s: (addr array byte), benchmark: (addr array byte) -> _/eax: boolean
24 sig check-strings-equal s: (addr array byte), expected: (addr array byte), msg: (addr array byte)
25
26
27 sig clear-stream f: (addr stream _)
28 sig rewind-stream f: (addr stream _)
29 sig stream-data-equal? f: (addr stream byte), s: (addr array byte) -> _/eax: boolean
30 sig check-stream-equal f: (addr stream byte), s: (addr array byte), msg: (addr array byte)
31 sig next-stream-line-equal? f: (addr stream byte), s: (addr array byte) -> _/eax: boolean
32 sig check-next-stream-line-equal f: (addr stream byte), s: (addr array byte), msg: (addr array byte)
33 sig write f: (addr stream byte), s: (addr array byte)
34 sig write-stream f: (addr stream byte), s: (addr stream byte)
35 sig read-byte s: (addr stream byte) -> _/eax: byte
36 sig append-byte f: (addr stream byte), n: int
37
38 sig append-byte-hex f: (addr stream byte), n: int
39 sig write-int32-hex f: (addr stream byte), n: int
40 sig write-int32-hex-bits f: (addr stream byte), n: int, bits: int
41 sig hex-int? in: (addr slice) -> _/eax: boolean
42 sig parse-hex-int in: (addr array byte) -> _/eax: int
43 sig parse-hex-int-from-slice in: (addr slice) -> _/eax: int
44
45 sig hex-digit? c: byte -> _/eax: boolean
46
47 sig parse-decimal-int in: (addr array byte) -> _/eax: int
48 sig parse-decimal-int-from-slice in: (addr slice) -> _/eax: int
49 sig parse-decimal-int-from-stream in: (addr stream byte) -> _/eax: int
50
51 sig decimal-size n: int -> _/eax: int
52
53
54 sig lookup h: (handle _T) -> _/eax: (addr _T)
55 sig handle-equal? a: (handle _T), b: (handle _T) -> _/eax: boolean
56 sig copy-handle src: (handle _T), dest: (addr handle _T)
57
58
59 sig copy-array ad: (addr allocation-descriptor), src: (addr array _T), out: (addr handle array _T)
60
61 sig slice-empty? s: (addr slice) -> _/eax: boolean
62 sig slice-equal? s: (addr slice), p: (addr array byte) -> _/eax: boolean
63 sig slice-starts-with? s: (addr slice), head: (addr array byte) -> _/eax: boolean
64 sig write-slice out: (addr stream byte), s: (addr slice)
65
66 sig slice-to-string ad: (addr allocation-descriptor), in: (addr slice), out: (addr handle array byte)
67 sig write-int32-decimal out: (addr stream byte), n: int
68 sig decimal-digit? c: grapheme -> _/eax: boolean
69 sig to-decimal-digit in: grapheme -> _/eax: int
70
71
72
73 sig next-word line: (addr stream byte), out: (addr slice)
74 sig next-raw-word line: (addr stream byte), out: (addr slice)
75 sig stream-empty? s: (addr stream _) -> _/eax: boolean
76 sig stream-full? s: (addr stream _) -> _/eax: boolean
77 sig stream-to-array in: (addr stream _), out: (addr handle array _)
78 sig unquote-stream-to-array in: (addr stream _), out: (addr handle array _)
79 sig stream-first s: (addr stream byte) -> _/eax: byte
80 sig stream-final s: (addr stream byte) -> _/eax: byte
81
82
83 sig copy-array-object src: (addr array _), dest-ah: (addr handle array _)
84 sig array-equal? a: (addr array int), b: (addr array int) -> _/eax: boolean
85 sig parse-array-of-ints s: (addr array byte), out: (addr handle array int)
86 sig parse-array-of-decimal-ints s: (addr array byte), out: (addr handle array int)
87 sig check-array-equal a: (addr array int), expected: (addr string), msg: (addr string)
88
89 sig integer-divide a: int, b: int -> _/eax: int, _/edx: int