Age | Commit message (Collapse) | Author |
|
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]
|
|
we splitted the implementation of the functions to the commented
declaration so that one can only read the public file and understand
what the library does without having to read the actual code.
|
|
|
|
list_clear(&plist)
the function will run through every elements and clear them.
the prehead is updated (first and size are set to 0)
|
|
leaf functions do not have to contain a prologue nor an epilogue.
|
|
we make use of the struc / endstruc notation of nasm.
this allows us to have change / add / remove some fields of the so said
structures without having to change the whole code.
|
|
this avoids the need of prefixing the redundant label names (e.g. end, loop)
by the name of the function. The latter version is shorter to type and
hides local labels when the object file is desassembled.
Thus, instead of having
function_name:
jmp function_name_end
function_name_end:
we have this
function_name:
jmp .end
.end:
|
|
nasm lets us specify whether global data items are functions or data.
as for us, we do not have any data atm.
every global declaration of function have been changed from
global function_name
to
global function_name:function
|
|
the manual of yasm says that we should avoid declaring [BITS ...]
explicitely.
|
|
the files with '.s' extension are not properly displayed by github.
|
|
This commit includes the following functions:
* list_init
* list_new_raw
* list_new
* list_append
* list_apply
Everything seems to work well but nothing has been optimized so there is
a lot of work remaining.
|