From 82171a0fdfa28251cbc360dcf205392fee2c7eeb Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Mon, 31 May 2021 10:47:05 -0700 Subject: . --- html/318counter.subx.html | 92 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 html/318counter.subx.html (limited to 'html/318counter.subx.html') diff --git a/html/318counter.subx.html b/html/318counter.subx.html new file mode 100644 index 00000000..a892f566 --- /dev/null +++ b/html/318counter.subx.html @@ -0,0 +1,92 @@ + + + + +Mu - 318counter.subx + + + + + + + + + + +https://github.com/akkartik/mu/blob/main/318counter.subx +
+ 1 # A rudimentary counter that can be called from anywhere.
+ 2 
+ 3 == code
+ 4 
+ 5 count-event:
+ 6     # . prologue
+ 7     55/push-ebp
+ 8     89/<- %ebp 4/r32/esp
+ 9     #
+10     ff 0/subop/increment *Foo
+11 $count-event:end:
+12     # . epilogue
+13     89/<- %esp 5/r32/ebp
+14     5d/pop-to-ebp
+15     c3/return
+16 
+17 count-of-events:  # -> _/eax: int
+18     # . prologue
+19     55/push-ebp
+20     89/<- %ebp 4/r32/esp
+21     #
+22     8b/-> *Foo 0/r32/eax
+23 $count-of-events:end:
+24     # . epilogue
+25     89/<- %esp 5/r32/ebp
+26     5d/pop-to-ebp
+27     c3/return
+28 
+29 == data
+30 Foo:
+31   0/imm32
+
+ + + -- cgit 1.4.1-2-gfad0