Add support for some basic system calls and args handling correctly. #29

Merged
sb3923 merged 49 commits from system-calls into master 2024-11-07 19:36:30 +00:00
5 changed files with 346 additions and 7 deletions
Showing only changes of commit 6a3cf67d33 - Show all commits

View File

@@ -147,7 +147,7 @@ start_process (void *file_name_)
/* Push a null pointer sentinel inside argv. */ /* Push a null pointer sentinel inside argv. */
if_.esp -= sizeof (char *); if_.esp -= sizeof (char *);
*(char *) if_.esp = NULL; *(char *) if_.esp = 0;
/* Push pointer to the process file name to the stack. */ /* Push pointer to the process file name to the stack. */
char **argv; char **argv;
@@ -173,7 +173,7 @@ start_process (void *file_name_)
/* Push fake return address (null pointer). */ /* Push fake return address (null pointer). */
if_.esp -= sizeof (char *); if_.esp -= sizeof (char *);
*(char *) if_.esp = NULL; *(char *) if_.esp = 0;
/* If load failed, quit. */ /* If load failed, quit. */
palloc_free_page (file_name_); palloc_free_page (file_name_);