* more re-work
[mascara-docs.git] / i386 / junos / MIT / src.xv6 / initcode.S
blob109341a44190299c1b94b16df56474f55d51925c
1 # Initial process execs /init.
3 #include "syscall.h"
4 #include "traps.h"
7 # exec(init, argv)
8 .globl start
9 start:
10   pushl $argv
11   pushl $init
12   pushl $0  // where caller pc would be
13   movl $SYS_exec, %eax
14   int $T_SYSCALL
16 # for(;;) exit();
17 exit:
18   movl $SYS_exit, %eax
19   int $T_SYSCALL
20   jmp exit
22 # char init[] = "/init\0";
23 init:
24   .string "/init\0"
26 # char *argv[] = { init, 0 };
27 .p2align 2
28 argv:
29   .long init
30   .long 0