init: init nachos hw01, should pass jenkins os_group_20_hw job but fail on os_group_20_ta job

This commit is contained in:
TA
2024-09-19 18:59:13 +08:00
commit 6ad2fa368f
267 changed files with 71977 additions and 0 deletions

20
code/test/add.c Normal file
View File

@@ -0,0 +1,20 @@
/* add.c
* Simple program to test whether the systemcall interface works.
*
* Just do a add syscall that adds two values and returns the result.
*
*/
#include "syscall.h"
int
main()
{
int result;
result = Add(42, 23);
PrintInt(result);
// printf("result is %d\n", result);
Halt();
/* not reached */
}