07-24-2023, 12:22 PM
int main(void){
printf("Hello World");
return 0;
}
How is **0** passed as return value in assembly level? Is there a dedicated CPU register for this job?
**UPDATE**
Here's the 2 tables on passing/return data in the pdf, but doesn't seems to have the exact info on how the calling convention of an API is determined and which register is used for storing return address:
![alt text][1]
![alt text][2]
[1]:
[2]:
printf("Hello World");
return 0;
}
How is **0** passed as return value in assembly level? Is there a dedicated CPU register for this job?
**UPDATE**
Here's the 2 tables on passing/return data in the pdf, but doesn't seems to have the exact info on how the calling convention of an API is determined and which register is used for storing return address:
![alt text][1]
![alt text][2]
[1]:
[2]: