diff options
author | Benedikt Böhm <bb@xnull.de> | 2009-07-06 21:21:19 +0200 |
---|---|---|
committer | Benedikt Böhm <bb@xnull.de> | 2009-07-06 21:21:19 +0200 |
commit | ac4fb25412982447af2e718d3824e6acf7d3a2dd (patch) | |
tree | 4eb8d49be8363dda95e3e1851e8dc04e6c3cb4f5 /src/emu/syscall.c | |
parent | 37aec7789434c3ade9a1df630b1eec6c997487b2 (diff) | |
download | swppy-ac4fb25412982447af2e718d3824e6acf7d3a2dd.tar.gz swppy-ac4fb25412982447af2e718d3824e6acf7d3a2dd.tar.xz swppy-ac4fb25412982447af2e718d3824e6acf7d3a2dd.zip |
implement print statement
Diffstat (limited to 'src/emu/syscall.c')
-rw-r--r-- | src/emu/syscall.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/emu/syscall.c b/src/emu/syscall.c index 625bbf4..aba3448 100644 --- a/src/emu/syscall.c +++ b/src/emu/syscall.c @@ -1,5 +1,6 @@ #include <unistd.h> #include <stdlib.h> +#include <inttypes.h> #include "cpu.h" #include "mem.h" @@ -13,11 +14,8 @@ void do_syscall(void) case SYS_exit: exit(arg(1)); break; - case SYS_read: - push(read(arg(1), &MEM[arg(2)], arg(3))); - break; - case SYS_write: - push(write(arg(1), &MEM[arg(2)], arg(3))); + case SYS_print: + printf("%"PRIu32"\n", arg(1)); break; default: push(-1); |