Mercurial > hg > CbC > CbC_xv6
view src/usr/usys.S @ 0:83c23a36980d
Init
author | Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 26 May 2017 23:11:05 +0900 |
parents | |
children |
line wrap: on
line source
#include "syscall.h" #define SYSCALL(name) \ .globl name; \ name: \ PUSH {r4};\ MOV r4, r3;\ MOV r3, r2;\ MOV r2, r1;\ MOV r1, r0;\ MOV r0, #SYS_ ## name;\ swi 0x00;\ POP {r4};\ bx lr; SYSCALL(fork) SYSCALL(exit) SYSCALL(wait) SYSCALL(pipe) SYSCALL(read) SYSCALL(write) SYSCALL(close) SYSCALL(kill) SYSCALL(exec) SYSCALL(open) SYSCALL(mknod) SYSCALL(unlink) SYSCALL(fstat) SYSCALL(link) SYSCALL(mkdir) SYSCALL(chdir) SYSCALL(dup) SYSCALL(getpid) SYSCALL(sbrk) SYSCALL(sleep) SYSCALL(uptime)