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-code-point-on-real-screen c: code-point, x: int, y: int, color: int, background-color: int -> _/eax: int
4 sig draw-code-point-on-screen-array screen-data: (addr array byte), c: code-point, x: int, y: int, color: int, background-color: int, screen-width: int, screen-height: int -> _/eax: int
5 sig wide-code-point? c: code-point -> _/eax: boolean
6 sig cursor-position-on-real-screen -> _/eax: int, _/ecx: int
7 sig set-cursor-position-on-real-screen x: int, y: int
8 sig draw-cursor-on-real-screen c: code-point
9 sig color-rgb color: int -> _/ecx: int, _/edx: int, _/ebx: int
10
11
12 sig timer-counter -> _/eax: int
13
14
15 sig read-key kbd: (addr keyboard) -> _/eax: byte
16
17
18 sig read-ata-disk disk: (addr disk), lba: int, n: int, out: (addr stream byte)
19 sig write-ata-disk disk: (addr disk), lba: int, n: int, out: (addr stream byte)
20
21
22 sig read-mouse-event -> _/eax: int, _/ecx: int
23
24
25 sig count-test-failure
26 sig num-test-failures -> _/eax: int
27 sig running-tests? -> _/eax: boolean
28
29 sig string-equal? s: (addr array byte), benchmark: (addr array byte) -> _/eax: boolean
30 sig string-starts-with? s: (addr array byte), benchmark: (addr array byte) -> _/eax: boolean
31 sig check-strings-equal s: (addr array byte), expected: (addr array byte), msg: (addr array byte)
32
33
34 sig check-stack
35 sig show-stack-state
36 sig debug-print x: (addr array byte), fg: int, bg: int
37 sig debug-print? -> _/eax: boolean
38 sig turn-on-debug-print
39 sig turn-off-debug-print
40 sig abort e: (addr array byte)
41 sig dump-call-stack
42 sig heap-bound -> _/eax: int
43
44 sig count-event
45 sig count-of-events -> _/eax: int
46
47
48 sig clear-stream f: (addr stream _)
49 sig rewind-stream f: (addr stream _)
50 sig stream-data-equal? f: (addr stream byte), s: (addr array byte) -> _/eax: boolean
51 sig streams-data-equal? a: (addr stream byte), b: (addr stream byte) -> _/eax: boolean
52 sig check-stream-equal f: (addr stream byte), s: (addr array byte), msg: (addr array byte)
53 sig check-streams-data-equal s: (addr stream _), expected: (addr stream _), msg: (addr array byte)
54 sig next-stream-line-equal? f: (addr stream byte), s: (addr array byte) -> _/eax: boolean
55 sig check-next-stream-line-equal f: (addr stream byte), s: (addr array byte), msg: (addr array byte)
56 sig write f: (addr stream byte), s: (addr array byte)
57 sig try-write f: (addr stream byte), s: (addr array byte) -> _/eax: boolean
58
59 sig stream-size f: (addr stream byte) -> _/eax: int
60 sig space-remaining-in-stream f: (addr stream byte) -> _/eax: int
61 sig write-stream f: (addr stream byte), s: (addr stream byte)
62 sig write-stream-immutable f: (addr stream byte), s: (addr stream byte)
63 sig read-byte s: (addr stream byte) -> _/eax: byte
64 sig peek-byte s: (addr stream byte) -> _/eax: byte
65 sig append-byte f: (addr stream byte), n: int
66
67 sig append-byte-hex f: (addr stream byte), n: int
68 sig write-int32-hex f: (addr stream byte), n: int
69 sig write-int32-hex-bits f: (addr stream byte), n: int, bits: int
70 sig hex-int? in: (addr slice) -> _/eax: boolean
71 sig parse-hex-int in: (addr array byte) -> _/eax: int
72 sig parse-hex-int-from-slice in: (addr slice) -> _/eax: int
73
74 sig hex-digit? c: byte -> _/eax: boolean
75
76 sig parse-decimal-int in: (addr array byte) -> _/eax: int
77 sig parse-decimal-int-from-slice in: (addr slice) -> _/eax: int
78 sig parse-decimal-int-from-stream in: (addr stream byte) -> _/eax: int
79
80 sig decimal-size n: int -> _/eax: int
81
82
83 sig lookup h: (handle _T) -> _/eax: (addr _T)
84 sig handle-equal? a: (handle _T), b: (handle _T) -> _/eax: boolean
85 sig copy-handle src: (handle _T), dest: (addr handle _T)
86
87
88 sig copy-array ad: (addr allocation-descriptor), src: (addr array _T), out: (addr handle array _T)
89
90 sig slice-empty? s: (addr slice) -> _/eax: boolean
91 sig slice-equal? s: (addr slice), p: (addr array byte) -> _/eax: boolean
92 sig slice-starts-with? s: (addr slice), head: (addr array byte) -> _/eax: boolean
93 sig write-slice out: (addr stream byte), s: (addr slice)
94
95 sig slice-to-string ad: (addr allocation-descriptor), in: (addr slice), out: (addr handle array byte)
96 sig write-int32-decimal out: (addr stream byte), n: int
97 sig decimal-digit? c: grapheme -> _/eax: boolean
98 sig to-decimal-digit in: grapheme -> _/eax: int
99
100
101
102 sig next-word line: (addr stream byte), out: (addr slice)
103 sig next-raw-word line: (addr stream byte), out: (addr slice)
104 sig skip-chars-matching in: (addr stream byte), delimiter: byte
105 sig skip-chars-matching-whitespace in: (addr stream byte)
106 sig skip-chars-not-matching in: (addr stream byte), delimiter: byte
107 sig skip-chars-not-matching-whitespace in: (addr stream byte)
108 sig stream-empty? s: (addr stream _) -> _/eax: boolean
109 sig stream-full? s: (addr stream _) -> _/eax: boolean
110 sig stream-to-array in: (addr stream _), out: (addr handle array _)
111 sig unquote-stream-to-array in: (addr stream _), out: (addr handle array _)
112 sig stream-first s: (addr stream byte) -> _/eax: byte
113 sig stream-final s: (addr stream byte) -> _/eax: byte
114
115
116 sig copy-array-object src: (addr array _), dest-ah: (addr handle array _)
117 sig array-equal? a: (addr array int), b: (addr array int) -> _/eax: boolean
118 sig parse-array-of-ints s: (addr array byte), out: (addr handle array int)
119 sig parse-array-of-decimal-ints s: (addr array byte), out: (addr handle array int)
120 sig check-array-equal a: (addr array int), expected: (addr array byte), msg: (addr array byte)
121
122 sig integer-divide a: int, b: int -> _/eax: int, _/edx: int