summaryrefslogtreecommitdiff
path: root/initcode.S
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2019-05-31 09:45:59 -0400
committerRobert Morris <[email protected]>2019-05-31 09:45:59 -0400
commit2ec1959fd1016a18ef3b2d154ce7076be8f237e4 (patch)
tree1aa75252085964283b3a2c735771f4da02346517 /initcode.S
parent0f90388c893d1924e89e2e4d2187eda0004e9d73 (diff)
downloadxv6-labs-2ec1959fd1016a18ef3b2d154ce7076be8f237e4.tar.gz
xv6-labs-2ec1959fd1016a18ef3b2d154ce7076be8f237e4.tar.bz2
xv6-labs-2ec1959fd1016a18ef3b2d154ce7076be8f237e4.zip
fork/wait/exit work
Diffstat (limited to 'initcode.S')
-rw-r--r--initcode.S17
1 files changed, 7 insertions, 10 deletions
diff --git a/initcode.S b/initcode.S
index e097394..ca76972 100644
--- a/initcode.S
+++ b/initcode.S
@@ -2,22 +2,20 @@
# This code runs in user space.
#include "syscall.h"
-#include "traps.h"
-
# exec(init, argv)
.globl start
start:
- mov $init, %rdi
- mov $argv, %rsi
- mov $SYS_exec, %rax
- syscall
+ la a0, init
+ la a1, argv
+ li a7, SYS_exec
+ ecall
# for(;;) exit();
exit:
- mov $SYS_exit, %rax
- syscall
- jmp exit
+ li a7, SYS_exit
+ ecall
+ jal exit
# char init[] = "/init\0";
init:
@@ -28,4 +26,3 @@ init:
argv:
.long init
.long 0
-