about summary refs log tree commit diff stats
path: root/307size.subx
blob: 9d2be695173f91314cc74c36d462eb000adb6921 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Size of an array in bytes.

== code

size:  # in: (addr array _) -> result/eax: int
    # . prologue
    55/push-ebp
    89/<- %ebp 4/r32/esp
    # eax = in
    8b/-> *(ebp+8) 0/r32/eax
    #
    8b/-> *eax 0/r32/eax
$size:end:
    # . epilogue
    89/<- %esp 5/r32/ebp
    5d/pop-to-ebp
    c3/return