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