How's return value implemented in assembly level? -
int main(void){ printf("hello world"); return 0; }
how 0 passed return value in assembly level? there dedicated cpu register job?
update
here's 2 tables on passing/return data in pdf, doesn't seems have exact info on how calling convention of api determined , register used storing return address:
that depends on architecture. couple of examples, on x86 eax register used return values. on x86-64, it's rax. on sparc, it'll show in %o0.
Comments
Post a Comment