added c source files back

This commit is contained in:
PurplePower
2024-01-23 21:35:09 +08:00
parent b3738b8f63
commit b9294c0bd1
4 changed files with 62 additions and 2 deletions

12
lab2/csrc/simpletest.c Normal file
View File

@@ -0,0 +1,12 @@
extern void enable_interrupt();
void trap_handler(void *epc, unsigned int cause){
*((int*)0x4) = 0x2022;
}
int main(){
*((int*)0x4) = 0xDEADBEEF;
enable_interrupt();
for(;;);
}