diff options
Diffstat (limited to 'tnslc/dummy.tnsl')
-rw-r--r-- | tnslc/dummy.tnsl | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/tnslc/dummy.tnsl b/tnslc/dummy.tnsl index 003e428..60fe913 100644 --- a/tnslc/dummy.tnsl +++ b/tnslc/dummy.tnsl @@ -1,28 +1,17 @@ -/; raw _alloc +/; _alloc (uint bytes) [~void] ;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" ;/ -/; raw _delete +/; _delete (~void ptr) ;asm "mov %rax, %rdi" - ;asm "push %r9" - ;asm "push %r10" ;asm "mov $0, %r10" ;asm "call free" - ;asm "pop %r10" - ;asm "pop %r9" ;/ /; main [int] - ;asm "mov $10, %rax" - ;asm "call _alloc" - ;asm "call _delete" - ;asm "mov $0, %rax" + ;~void ptr = _alloc(10) + ;_delete(ptr) + ;return 0 ;/ |