15 lines
260 B
C
15 lines
260 B
C
|
|
||
|
int add(int a, int b) {
|
||
|
return a + b; // 待调试的函数
|
||
|
}
|
||
|
|
||
|
int main() {
|
||
|
int x = 5;
|
||
|
int y = 3;
|
||
|
int result = add(x, y);
|
||
|
volatile char *tohost_addr = (volatile char *)(0x80001000 - 4);
|
||
|
*tohost_addr = 0xff;
|
||
|
*tohost_addr = result;
|
||
|
return 0;
|
||
|
}
|