This question is asked because the author is building a compiler (src โ asm) and is in the process of writing code to generate assembly code.
One of the first things that happen when a program runs on a Linux operating system (on any OS) is that the stack is installed and the SP register is assigned a memory address at the beginning of the stack.
I was curious if I was not responsible for the above tasks using the program or the OS itself. If so, then the responsibility lies with the program, how is this achieved by the program (in particular, in the base Linux environment)?
What other actions should a separate program perform before it can begin to perform its main function?
Examples with comments on the i386 assembler NASM are welcome. In addition, any web resource that could help the author in his goal would be greatly appreciated.
assembly linux
jimka
source share