1 Star 0 Fork 11

爪哇岛主/xv6-public

forked from dodo1900/xv6-public 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
initcode.S 455 Bytes
一键复制 编辑 原始数据 按行查看 历史
Robert Morris 提交于 2016-08-11 15:41 . nothing much
# Initial process execs /init.
# This code runs in user space.
#include "syscall.h"
#include "traps.h"
# exec(init, argv)
.globl start
start:
pushl $argv
pushl $init
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
# char init[] = "/init\0";
init:
.string "/init\0"
# char *argv[] = { init, 0 };
.p2align 2
argv:
.long init
.long 0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/seaghdh-wu/xv6-public.git
git@gitee.com:seaghdh-wu/xv6-public.git
seaghdh-wu
xv6-public
xv6-public
master

搜索帮助