https://github.com/akkartik/mu/blob/main/apps/ex12.mu
1
2
3
4
5
6
7
8
9
10
11
12 fn main screen: (addr screen), keyboard: (addr keyboard), data-disk: (addr disk) {
13 var fg/ecx: int <- copy 0
14 var prev-timer-counter/edx: int <- copy 0
15 {
16 var dummy/eax: int <- draw-text-rightward screen, "hello from baremetal Mu!", 0x10/x, 0x400/xmax, 0x10/y, fg, 0/bg
17
18 {
19 var curr-timer-counter/eax: int <- timer-counter
20 compare curr-timer-counter, prev-timer-counter
21 loop-if-=
22 prev-timer-counter <- copy curr-timer-counter
23 }
24
25 fg <- increment
26 loop
27 }
28 }