Code: Select all
mov esp, _sys_stack ; points the stack to our new area
push eax ; Multiboot magic number
push ebx ; Multiboot info structure
extern _main
call _main
Code: Select all
#include "multiboot.h"
// Stuff ...
int main(multiboot_info_t* mbd, unsigned int magic)
{
...
Code: Select all
main.c:8: warning: first argument of `main' should be `int'
main.c:8: warning: second argument of `main' should be `char **'
I already tried to push ebx first and eax later, but neither the compiler and the linker change their opinion (the linker actually doesn't say a thing, everything seems correct) and that's why I'm thinking that this problem might originates in something else but not the asm/c combination...