aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMarvin Borner2020-08-15 14:21:52 +0200
committerMarvin Borner2020-08-15 14:21:52 +0200
commit32b8722128dfb4ca9e814940a23c2b22a283bb12 (patch)
tree80c881a7717dc129fd11baaf98cd8b226fd30c67 /apps
parent162c84cfe6b4652bae213776944b910390553d41 (diff)
Added some syscall wrappers
Diffstat (limited to 'apps')
-rw-r--r--apps/a.c6
-rw-r--r--apps/b.c4
-rw-r--r--apps/init.c12
3 files changed, 7 insertions, 15 deletions
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 <def.h>
#include <print.h>
-#include <sys.h>
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();
}