about summary refs log tree commit diff stats
path: root/subx_debugging.md
Commit message (Expand)AuthorAgeFilesLines
* 7401 - clean up support for non-Linux platformsKartik Agaram2020-12-251-19/+17
* 6640Kartik Agaram2020-07-121-0/+6
* 6633Kartik Agaram2020-07-111-0/+122
id='n28' href='#n28'>28 29 30 31






























                                                         
# 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