diff options
Diffstat (limited to 'src/sysbin/shell')
-rw-r--r-- | src/sysbin/shell/Makefile | 12 | ||||
-rw-r--r-- | src/sysbin/shell/main.c | 27 |
2 files changed, 39 insertions, 0 deletions
diff --git a/src/sysbin/shell/Makefile b/src/sysbin/shell/Makefile new file mode 100644 index 0000000..80d1009 --- /dev/null +++ b/src/sysbin/shell/Makefile @@ -0,0 +1,12 @@ + +OBJ = main.o + +LIB = ../../lib/libkogata/libkogata.lib + +CFLAGS = -I ./include -I ../../common/include -I ../../lib/include + +LDFLAGS = -T ../linker.ld -Xlinker -Map=shell.map + +OUT = shell.bin + +include ../../rules.make diff --git a/src/sysbin/shell/main.c b/src/sysbin/shell/main.c new file mode 100644 index 0000000..54cec06 --- /dev/null +++ b/src/sysbin/shell/main.c @@ -0,0 +1,27 @@ +#include <string.h> +#include <malloc.h> +#include <user_region.h> +#include <debug.h> + +#include <stdio.h> + +#include <syscall.h> + +int main(int argc, char **argv) { + dbg_printf("[shell] Starting\n"); + + /*fctl(stdio, FC_SET_BLOCKING, 0);*/ + + puts("Hello, world!\n"); + + while(true) { + puts("> "); + char buf[256]; + getline(buf, 256); + printf("You said: '%s'. I don't understand a word of that.\n\n", buf); + } + + return 0; +} + +/* vim: set ts=4 sw=4 tw=0 noet :*/ |