I have Power C and am wondering: I have information on interfacing
C with assembler, but it doesn't show how to return a value from
an assembler function. How do I do that?
Given that nobody with specific knowledge of Power C has replied,
I'll at least say that generally C compilers use the stack for
passing values to/from functions. To return a value, you push the
byte/s on inside the assembly part, then the compiler will pop them
out when it's at the helm.
This implementation is all specific to the compiler though, so you
want to look at the Power C documentation for a real answer including
the specifics of how the stack is used.
Computer Nerd Kev, I thank you for your response. The manual doesn't giveany information on using assembler with C. I have the information on linking C
I didn't find it. :(
Sysop: | digital man |
---|---|
Location: | Riverside County, California |
Users: | 1,033 |
Nodes: | 15 (0 / 15) |
Uptime: | 214:27:43 |
Calls: | 529 |
Calls today: | 23 |
Files: | 95,154 |
D/L today: |
4,404 files (585M bytes) |
Messages: | 298,857 |
Posted today: | 12 |