From 5945986cc5c743345938403d553fe9a4edf655fd Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sun, 14 Jun 2020 00:40:16 -0700 Subject: 6521 - new primitive: array size in bytes --- 106size.subx | 17 +++++++++++++++++ apps/mu | Bin 280373 -> 280389 bytes 2 files changed, 17 insertions(+) create mode 100644 106size.subx diff --git a/106size.subx b/106size.subx new file mode 100644 index 00000000..9d2be695 --- /dev/null +++ b/106size.subx @@ -0,0 +1,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 diff --git a/apps/mu b/apps/mu index 5b65cf19..ffea66a5 100755 Binary files a/apps/mu and b/apps/mu differ -- cgit 1.4.1-2-gfad0