From 32b8722128dfb4ca9e814940a23c2b22a283bb12 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 15 Aug 2020 14:21:52 +0200 Subject: Added some syscall wrappers --- apps/a.c | 6 ++---- apps/b.c | 4 ++-- apps/init.c | 12 +++--------- 3 files changed, 7 insertions(+), 15 deletions(-) (limited to 'apps') diff --git a/apps/a.c b/apps/a.c index 448bedd..b49e7f9 100644 --- a/apps/a.c +++ b/apps/a.c @@ -2,13 +2,11 @@ #include #include -#include void main() { - print("\nA loaded!\n"); - sys0(SYS_LOOP); + print("\nA loaded.\n"); while (1) { - print("a"); + print("A"); } } diff --git a/apps/b.c b/apps/b.c index 1ed9249..504a5fd 100644 --- a/apps/b.c +++ b/apps/b.c @@ -5,8 +5,8 @@ void main() { - print("\nB loaded\n"); + print("\nB loaded.\n"); while (1) { - print("b"); + print("B"); } } diff --git a/apps/init.c b/apps/init.c index 5879c1e..5e88eff 100644 --- a/apps/init.c +++ b/apps/init.c @@ -10,13 +10,7 @@ void main() { print("Init loaded.\n"); - char *buf = malloc(10); - conv_base(42, buf, 8, 0); - printf("\n----\nTEST: %s\n----\n", buf); - /* printf("%x %d %b\n ABC %s", 42, 42, 42, "BAUM"); */ - sys0(SYS_LOOP); - /* sys1(SYS_EXEC, (int)"/a"); */ - while (1) { - print("b"); - }; + exec("/a"); + exec("/b"); + exit(); } -- cgit v1.2.3