Fixing the memory, adding a shell, and other minor bugs to gdt and idt and the types, also adds .github files for bug reports and feature requests.

This commit is contained in:
2023-07-14 20:10:20 -07:00
parent eb7b7ff201
commit d98d2d4292
12 changed files with 214 additions and 14 deletions

32
src/shell/shell.c Normal file
View File

@@ -0,0 +1,32 @@
#include "shell.h"
#include <stdio.h>
#include <string.h>
void shell_loop()
{
char input[256];
while (1)
{
printf("> ");
fgets(input, sizeof(input), stdin);
// Remove newline character from input
input[strcspn(input, "\n")] = '\0';
// Parse input and execute commands
// ...
// Exit the shell if the user enters "exit"
if (strcmp(input, "exit") == 0)
{
break;
}
}
}
int main()
{
shell_loop();
return 0;
}

13
src/shell/shell.h Normal file
View File

@@ -0,0 +1,13 @@
#ifndef SHELL_H
#define SHELL_H
// Function to read user input
char *read_input();
// Function to parse user input
char **parse_input(char *input);
// Function to execute a command
int execute_command(char **args);
#endif