So ive been teaching myself x86 over the last couple days now im trying to call c functions and am getting segmentation faults. if someone could explain how to call them properly that would be great.
here is my code:
print integer is just he control string %d as i am trying to read and wrint integers
lea rax, print_int push rax push 10 push 0 call fgets pop rax pop rax pop rax
on a seperate note here is my attempt to use atoi:
lea rax, x push rax call atoi
should i be adjusting the stack after calling functions?
what is the proper push order for fgets atoi and printf?
where do atoi and fgets place their results?
do pop and push automaticly adjust the stack?
Edited 3 Years Ago by DarkLightning7