aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/syscall/actions
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/syscall/actions')
-rw-r--r--src/kernel/syscall/actions/sys_read.c5
-rw-r--r--src/kernel/syscall/actions/sys_write.c10
2 files changed, 15 insertions, 0 deletions
diff --git a/src/kernel/syscall/actions/sys_read.c b/src/kernel/syscall/actions/sys_read.c
index 673d2d9..f04f3ef 100644
--- a/src/kernel/syscall/actions/sys_read.c
+++ b/src/kernel/syscall/actions/sys_read.c
@@ -13,4 +13,9 @@ uint32_t sys_read(char *buf)
}
memcpy(buf, keyboard_buffer, strlen(keyboard_buffer));
return strlen(buf);
+}
+
+uint32_t sys_readc()
+{
+ return getch();
} \ No newline at end of file
diff --git a/src/kernel/syscall/actions/sys_write.c b/src/kernel/syscall/actions/sys_write.c
index f159335..554ac5f 100644
--- a/src/kernel/syscall/actions/sys_write.c
+++ b/src/kernel/syscall/actions/sys_write.c
@@ -7,4 +7,14 @@ uint32_t sys_write(char *buf)
{
printf(buf);
return strlen((const char *) buf);
+}
+
+uint32_t sys_writec(char ch)
+{
+ serial_write_hex(ch);
+ serial_write("\n");
+ serial_put(ch);
+ serial_write("\n\n");
+ writec(ch);
+ return 0;
} \ No newline at end of file