Soul of a tiny new machine. More thorough tests → More comprehensible and rewrite-friendly software → More resilient society.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

31 lines
511 B

# A rudimentary counter that can be called from anywhere.
== code
count-event:
# . prologue
55/push-ebp
89/<- %ebp 4/r32/esp
#
ff 0/subop/increment *Foo
$count-event:end:
# . epilogue
89/<- %esp 5/r32/ebp
5d/pop-to-ebp
c3/return
count-of-events: # -> _/eax: int
# . prologue
55/push-ebp
89/<- %ebp 4/r32/esp
#
8b/-> *Foo 0/r32/eax
$count-of-events:end:
# . epilogue
89/<- %esp 5/r32/ebp
5d/pop-to-ebp
c3/return
== data
Foo:
0/imm32