Move test in a specific folder

This commit is contained in:
Fabio Scotto di Santolo
2025-11-29 18:47:37 +01:00
parent c59b4004e5
commit 7eaf73e6fe
6 changed files with 0 additions and 0 deletions

21
example/asm.c Normal file
View File

@@ -0,0 +1,21 @@
#include <stdio.h>
int add(int a, int b)
{
int result;
asm volatile (
"addl %2, %1;" // Add b
"movl %1, %0;"
: "=r" (result)
: "r" (a), "r" (b)
: "cc"
);
return result;
}
int main(void)
{
int x = 10, y = 20;
printf("%d + %d = %d\n", x, y, add(x, y));
return 0;
}