view src/initcode.S @ 280:21a5761e3e7a

mv_extraction_dg_compile_sources Context2Util
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Tue, 28 Jan 2020 15:20:34 +0900
parents 83c23a36980d
children
line wrap: on
line source

# Initial process execs /init.

#include "syscall.h"

.globl start

# exec(init, argv)
start:
    LDR     r1, =init
    LDR     r2, =argv
    MOV     r0, #SYS_exec
    SWI     0x00

exit:
    MOV     r0, #SYS_exit
    SWI     0x00
    B       exit

# char init[] = "/init\0";
init:
    .string "/init\0"

# char *argv[] = { init, 0 };
.p2align 2
argv:
    .word init
    .word 0