From c0156f9d2d8588f927e301e8c18cee6eea7376e5 Mon Sep 17 00:00:00 2001 From: Kyle Cardoza Date: Sun, 31 Mar 2024 01:30:48 -0400 Subject: [PATCH] work on interrupts --- src/interrupts.s | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/interrupts.s b/src/interrupts.s index a0b90ea..0c3fe14 100644 --- a/src/interrupts.s +++ b/src/interrupts.s @@ -586,9 +586,36 @@ cop_get_working_directory: cop_set_working_directory: cop_rti + +; ----------------------------------------------------------------------------- +; Function 21: Execute User program +; +; Given an open file handle, load the file into memory as a PGZ-format binary, +; and branch to its entry point. The user program will replace any user program +; already loaded and running, and will inherit the current environment and +; file handles. This function is used by the shell, which suspends itself and +; waits for the exit system call to pick up with the exit code of the user +; program. +; +; Arguments: +; A: File handle +; Return Value: +; A: Error code + cop_exec: cop_rti +; ----------------------------------------------------------------------------- +; Function 22: Exit user program +; +; If there is a user program running, it will be terminated, and the kernel will +; return to the shell. The calling program provides a 16-bit exit code, which will +; be passed back to the shell. +; +; Arguments: +; C: Exit status +; Return Value: None + cop_exit: cop_rti