Implemented the basis for syscalls

A software interrupt with vector 0x50 will cause a syscall to start executing.
The EAX register will hold the syscall_num.
Other registers and the stack can be used to hold further arguments.
This commit is contained in:
2023-02-27 00:34:30 +01:00
parent 2d0bb16fad
commit 5781f730d9
7 changed files with 141 additions and 143 deletions

View File

@ -6,6 +6,8 @@
bool isRunning = true;
extern "C" void startSuperVisorTerminal()
{
/*
* Show a little banner for cuteness
*/
@ -62,7 +64,8 @@ extern "C" void startSuperVisorTerminal()
{
// Show version information
printf("========= Version ========\n");
printf("Kernel v%d\n", 0);
asm volatile ("movl $0x666, %eax; int $0x50");
}
if(strncmp("CLEAR", command, characterCount) == 0)