https://github.com/akkartik/mu/blob/main/104test.subx
 1 # Some helpers needed only because Mu doesn't support globals at the moment.
 2 
 3 == code
 4 
 5 count-test-failure:
 6     # . prologue
 7     55/push-ebp
 8     89/<- %ebp 4/r32/esp
 9     #
10     ff 0/subop/increment *Num-test-failures
11 $count-test-failure:end:
12     # . epilogue
13     89/<- %esp 5/r32/ebp
14     5d/pop-to-ebp
15     c3/return
16 
17 num-test-failures:  # -> _/eax: int
18     # . prologue
19     55/push-ebp
20     89/<- %ebp 4/r32/esp
21     #
22     8b/-> *Num-test-failures 0/r32/eax
23 $num-test-failures:end:
24     # . epilogue
25     89/<- %esp 5/r32/ebp
26     5d/pop-to-ebp
27     c3/return
28 
29 running-tests?:  # -> _/eax: int
30     # . prologue
31     55/push-ebp
32     89/<- %ebp 4/r32/esp
33     #
34     8b/-> *Running-tests? 0/r32/eax
35 $running-tests?:end:
36     # . epilogue
37     89/<- %esp 5/r32/ebp
38     5d/pop-to-ebp
39     c3/return
40 
41 == data
42 
43 Num-test-failures:
44   0/imm32
45 
46 Running-tests?:
47   1/imm32/true