Added code to get the consoles to be split into their own

Fixed issue where exiting a shell would not close the parent console properly
Changed the way the consoles are linked to the processes by making it a pointer to the console
Added all the console changes for the above
Added a slow maze drawing program similar to the c64 version
This commit is contained in:
iDunnoDev
2022-12-14 01:04:42 +00:00
committed by iDunnoDev
parent 5b21654261
commit 924d90c066
8 changed files with 454 additions and 248 deletions

View File

@ -93,12 +93,12 @@ 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);
//cprintf("Process Console: %d\n", myproc()->consoleptr->consoleindex);
return 0;
}
@ -129,11 +129,11 @@ int sys_screen(void)
{
struct proc *curproc = myproc();
int result = 0;
int consoleindex = -1;
if ((consoleindex = newconsole()) != 0)
struct vconsole* consoleptr = 0;
if ((consoleptr = newconsole()) != 0)
{
curproc->consoleIndex = consoleindex;
switchtoconsole(consoleindex);
curproc->consoleptr = consoleptr;
switchtoconsole(consoleptr);
result = 1;
}
return result;