summaryrefslogtreecommitdiff
path: root/public.asm
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2014-02-17 01:49:25 +0100
committerOlivier Gayot <duskcoder@gmail.com>2014-02-17 01:49:25 +0100
commit45376fd12154eac48069a5c19c4e3b268f27f98a (patch)
tree6ea705652379ec382f2ca18198f842d58a4225e7 /public.asm
parent10feec2708dadeb3adfe81844b1766691b9d058a (diff)
add the function list_insert.HEADmaster
the function inserts a new element at the position specified in its third argument. example: list_clear(&list); list_insert(&list, 2, 0); list_insert(&list, 1, 0); list_insert(&list, 3, 2); list_insert(&list, 0, 0); the list will contain [0, 1, 2, 3]
Diffstat (limited to 'public.asm')
-rw-r--r--public.asm4
1 files changed, 4 insertions, 0 deletions
diff --git a/public.asm b/public.asm
index 0a90fe8..f4c216f 100644
--- a/public.asm
+++ b/public.asm
@@ -40,6 +40,10 @@ global list_clear:function
;; otherwise (on success), $rax will be set to 0
global list_append:function
+;; like list_append but instead of adding at the end of the list, this
+;; function adds at the position $rdx
+global list_insert:function
+
;; for every element in the list stored at address $rdi, call the function
;; pointed to by $rsi with the value of the current element.
global list_apply:function