So I'm having trouble figuring out how to call a function using in line assembly
void print_test(const char* str1, int int1) {
printf("%s-%d", str1, int1);
}
int main() {
const char * str1 = "test"
int int1 = 1;
//asm function call here
}
I tried doing the following:
asm(
"push %1;"
"push %0;"
"call *%2;"
:"=r"(str1), "=r"(int1)
:"1"(str1), "0"(int1)
:
);
If someone could explain why this isn't working/how to go about doing this, that'd be greatly appreciated.