xv6-65oo2/initcode.S
2007-08-24 19:37:24 +00:00

30 lines
380 B
ArmAsm

# Initial process execs /init.
#include "syscall.h"
#include "traps.h"
# exec(init, argv)
start:
pushl $argv
pushl $init
pushl $0
movl $SYS_exec, %eax
int $T_SYSCALL
# for(;;) exit();
exit:
movl $SYS_exit, %eax
int $T_SYSCALL
jmp exit
# char init[] = "/init\0";
init:
.string "/init\0"
# char *argv[] = { init, 0 };
.p2align 2
argv:
.long init
.long 0