mirror of
https://github.com/handsomezhuzhu/2025-yatcpu.git
synced 2026-02-21 04:20:14 +00:00
added c source files back
This commit is contained in:
12
lab2/csrc/simpletest.c
Normal file
12
lab2/csrc/simpletest.c
Normal 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(;;);
|
||||
}
|
||||
Reference in New Issue
Block a user