diff --git a/test/6_args.sy b/test/6_args.sy new file mode 100644 index 0000000..8e2647c --- /dev/null +++ b/test/6_args.sy @@ -0,0 +1,15 @@ +int func(int aa, int bb, int cc, int dd, int ee, int ff){ + int rr = aa + bb + cc + dd + ee + ff; + return rr; +} + +int main(){ + int a = 1; + int b = 2; + int c = 3; + int d = 4; + int e = 5; + int f = 6; + int r = func(a, b, c, d, e, f); + return r; +} \ No newline at end of file diff --git a/test/func.sy b/test/func.sy new file mode 100644 index 0000000..07b0e67 --- /dev/null +++ b/test/func.sy @@ -0,0 +1,8 @@ +void func(){ + ; +} + +int main(){ + func(); + return 0; +} \ No newline at end of file diff --git a/test/global.sy b/test/global.sy new file mode 100644 index 0000000..5c478cb --- /dev/null +++ b/test/global.sy @@ -0,0 +1,15 @@ +//test globalvalue +// CMD +// arm-none-eabi-gcc .\global.c -O0 -S -o .\global.S + +int g1; +int g2 = 5; +int g3 = 6; + +int main(){ + int a, b; + a = 10; + b = 2; + int c = g2; + return a + b + c; +}