summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2022-09-28 12:19:04 -0400
committerKyle Gunger <kgunger12@gmail.com>2022-09-28 12:19:04 -0400
commitdedd1d1e4bcc2607a626776507ef1136ef44af8d (patch)
treeb875023def40233b1b6d4ab1deceb4eb033b03ea
parentf927b5126ef7e219bc5d4aa875523df1f6ea6d83 (diff)
malloc hooks
-rw-r--r--tnslc/dummy.tnsl30
1 files changed, 25 insertions, 5 deletions
diff --git a/tnslc/dummy.tnsl b/tnslc/dummy.tnsl
index f53a658..2a624a2 100644
--- a/tnslc/dummy.tnsl
+++ b/tnslc/dummy.tnsl
@@ -1,8 +1,28 @@
-/; main
- ;asm "mov $0, %eax"
- ;asm "call doug"
+/; _alloc
+ ;asm "mov %rax, %rdi"
+ ;asm "push %r8"
+ ;asm "push %r9"
+ ;asm "push %r10"
+ ;asm "mov $0, %r10"
+ ;asm "call malloc"
+ ;asm "pop %r10"
+ ;asm "pop %r9"
+ ;asm "pop %r8"
;/
-/; doug
+/; _delete
+ ;asm "mov %rax, %rdi"
+ ;asm "push %r9"
+ ;asm "push %r10"
+ ;asm "mov $0, %r10"
+ ;asm "call free"
+ ;asm "pop %r10"
+ ;asm "pop %r9"
+;/
-;/ \ No newline at end of file
+/; main
+ ;asm "mov $10, %rax"
+ ;asm "call _alloc"
+ ;asm "call _delete"
+ ;asm "mov $0, %rax"
+;/