Added buffer to the console
Added hotkeys to switch between console buffers and to return to the home one Added clear screen command Added debug text outputs to the hello command and when loading sh
This commit is contained in:
25
sysproc.c
25
sysproc.c
@ -95,6 +95,10 @@ int sys_uptime(void)
|
||||
int sys_greeting(void)
|
||||
{
|
||||
cprintf("Hello again\n");
|
||||
cprintf("Using Console: %d\n", getcurrentconsoleindex());
|
||||
cprintf("Current PID: %d\n", myproc()->pid);
|
||||
cprintf("Current Parent PID: %d\n", myproc()->parent->pid);
|
||||
cprintf("Process Console: %d\n", myproc()->consoleIndex);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -119,4 +123,25 @@ int sys_shutdown(void)
|
||||
outw(0x604, 0x2000);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sys_screen(void)
|
||||
{
|
||||
struct proc *curproc = myproc();
|
||||
int result = 0;
|
||||
int consoleindex = -1;
|
||||
if ((consoleindex = newconsole()) != 0)
|
||||
{
|
||||
curproc->consoleIndex = consoleindex;
|
||||
switchtoconsole(consoleindex);
|
||||
wakeup(myproc()->chan);
|
||||
result = 1;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
int sys_cls(void)
|
||||
{
|
||||
clearscreen();
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user