I have to make a work for collegue in which I have to write everything in assembly lenguage for the AMD64.
I'm allowed to import some C functions from C Standar Library (as a matter of facts, some are compulsory), yet I have no idea how to make the VA_LIST work. (Which I've been informed is necessary to make some of those functions work)
Here you have what some other user of StackOverflow gently suggested me to see: What is the format of the x86_64 va_list structure?
And this is what I did so far:
section .data
va_list:
dd 0; gp
dd 0; fp
dq 0; overflow
dq 0; reg
<code>
mov [va_list+16], _direction_of_the_int_I_want_to_pass;
mov rdx, va_list
call _function_I_want_to_call
This for some reason isn't working. Should I create the va_list structure in a different way? Should the other data be different than 0? (I mean, I don't use any stack on my function)