函数调用正常

This commit is contained in:
2025-04-17 15:35:32 +08:00
parent 1eb2785984
commit 333cc57c99
4 changed files with 86 additions and 37 deletions

View File

@@ -1,10 +1,13 @@
int add(int a, int b) {
return a+b;
}
int main()
{
int a=1;
int b=2;
int c=a+b;
int c = add(a, b);
return c;
}

View File

@@ -3,6 +3,8 @@
.globl _start
.type _start,@function
.extern main
_start:
la sp, _sp
la sp, _sp
j main