repo.or.cz
/
mascara-docs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* more re-work
[mascara-docs.git]
/
i386
/
junos
/
MIT
/
src.xv6
/
initcode.S
blob
109341a44190299c1b94b16df56474f55d51925c
1
# Initial process execs /init.
2
3
#include "syscall.h"
4
#include "traps.h"
5
6
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
15
16
# for(;;) exit();
17
exit:
18
movl $SYS_exit, %eax
19
int $T_SYSCALL
20
jmp exit
21
22
# char init[] = "/init\0";
23
init:
24
.string "/init\0"
25
26
# char *argv[] = { init, 0 };
27
.p2align 2
28
argv:
29
.long init
30
.long 0
31