mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:18:13 +00:00
Virtual consoles kinda work!
We now make three VirtualConsoles at boot: tty0, tty1, and tty2. We launch an instance of /bin/sh in each one. You switch between them with Alt+1/2/3 How very very cool :^)
This commit is contained in:
parent
68739dc43e
commit
7a7956a595
24 changed files with 251 additions and 103 deletions
|
@ -3,6 +3,7 @@
|
|||
#include "types.h"
|
||||
#include "string.h"
|
||||
#include "errno.h"
|
||||
#include "unistd.h"
|
||||
#include <Kernel/Syscall.h>
|
||||
#include <AK/printf.cpp>
|
||||
|
||||
|
@ -10,13 +11,14 @@ extern "C" {
|
|||
|
||||
int putchar(int ch)
|
||||
{
|
||||
Syscall::invoke(Syscall::PutCharacter, ch);
|
||||
write(0, &ch, 1);
|
||||
//Syscall::invoke(Syscall::PutCharacter, ch);
|
||||
return (byte)ch;
|
||||
}
|
||||
|
||||
static void sys_putch(char*, char ch)
|
||||
static void sys_putch(char*&, char ch)
|
||||
{
|
||||
Syscall::invoke(Syscall::PutCharacter, ch);
|
||||
putchar(ch);
|
||||
}
|
||||
|
||||
int printf(const char* fmt, ...)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue