From fe237ee215fafd2012e6f4e5da88e3c2b8f9d33d Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 23 Oct 2018 10:12:50 +0200 Subject: Lots of hacking: - Turn Keyboard into a CharacterDevice (85,1) at /dev/keyboard. - Implement MM::unmapRegionsForTask() and MM::unmapRegion() - Save SS correctly on interrupt. - Add a simple Spawn syscall for launching another process. - Move a bunch of IO syscall debug output behind DEBUG_IO. - Have ASSERT do a "cli" immediately when failing. This makes the output look proper every time. - Implement a bunch of syscalls in LibC. - Add a simple shell ("sh"). All it can do now is read a line of text from /dev/keyboard and then try launching the specified executable by calling spawn(). There are definitely bugs in here, but we're moving on forward. --- LibC/stdio.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'LibC/stdio.cpp') diff --git a/LibC/stdio.cpp b/LibC/stdio.cpp index dd5b26f9a5..31f0d14d41 100644 --- a/LibC/stdio.cpp +++ b/LibC/stdio.cpp @@ -141,7 +141,8 @@ extern "C" { int putchar(int ch) { - return ch; + Syscall::invoke(Syscall::PutCharacter, ch); + return (byte)ch; } int printf(const char* fmt, ...) -- cgit v1.2.3