xv6/initcode.S

34 lines
463 B
ArmAsm
Raw Normal View History

# Initial process execs /init.
#include "syscall.h"
#include "traps.h"
# exec(init, argv)
2007-08-27 23:32:16 +00:00
.globl start
start:
movl $SYS_init, %eax
int $T_SYSCALL
pushl $argv
pushl $init
2009-07-12 02:26:01 +00:00
pushl $0 // where caller pc would be
movl $SYS_exec, %eax
int $T_SYSCALL
# for(;;) exit();
exit:
movl $SYS_exit, %eax
int $T_SYSCALL
jmp exit
2007-08-24 19:37:24 +00:00
# char init[] = "/init\0";
init:
.string "/init\0"
2007-08-24 19:37:24 +00:00
# char *argv[] = { init, 0 };
.p2align 2
argv:
.long init
.long 0