From 1e4a254674f668839e5de273916024c16814b045 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sun, 13 Sep 2020 03:19:57 -0400 Subject: (basic, not much tested) keyboard, better panic --- src/user/highway/highway.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/user/highway/highway.c (limited to 'src/user/highway/highway.c') diff --git a/src/user/highway/highway.c b/src/user/highway/highway.c new file mode 100644 index 0000000..effc131 --- /dev/null +++ b/src/user/highway/highway.c @@ -0,0 +1,21 @@ +#include +#include +#include + +//TODO: load a user environment file containing a PATH-like setting. +//TODO: have an active disk and/or directory + +void main() { + char path_buf[1024 + 4] = "BIN/"; + char *const line_buf = path_buf + 4; + while (1) { + tell_user_sz("> "); + ask_user_line_sz(line_buf, 1023); + if (blockequ(line_buf, "exit", 5)) + return; + if (try_run_command(path_buf)) + yield_task(); + else + tell_user_sz("An error occured trying to run that command.\n"); + } +} \ No newline at end of file -- cgit v1.2.3