repo.or.cz
/
xv6-db.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
added base src
[xv6-db.git]
/
initcode.S
blob
41e84f419f7d96120a93c83b282aaf0dae3acee1
1
# Initial process execs /init.
2
3
#include "syscall.h"
4
#include "traps.h"
5
6
# exec(init, argv)
7
.globl start
8
start:
9
pushl $argv
10
pushl $init
11
pushl $0 // where caller pc would be
12
movl $SYS_exec, %eax
13
int $T_SYSCALL
14
15
# for(;;) exit();
16
exit:
17
movl $SYS_exit, %eax
18
int $T_SYSCALL
19
jmp exit
20
21
# char init[] = "/init\0";
22
init:
23
.string "/init\0"
24
25
# char *argv[] = { init, 0 };
26
.p2align 2
27
argv:
28
.long init
29
.long 0
30