I found it. :) Sorry for wasting your time. :(
On Sat 14-Dec-2019 5:17a, Harry Potter@3:770/3.0 said to Harry Potter:as
I found it. :) Sorry for wasting your time. :(
It is never a waste of time to ask a question, especially in a public forum
others do learn from the dialog. You never know when a simple questions that has been asked before may spark insights or the imagination of the other readers.
In your case, I am now courious how Power C does handle passing arguments and the return value from a function in assembler?
[+] K-Guide
It seems that I have to pass the return value in the TOS, but what if the function has no parameters or too few parameters?
Using the stack makes alot of since for the return value of the assembler function. In the case of no parameter, I suspect you can just call theroutine
via a function pointer in C. Set that to the address of your assemblerroutine
and call the function. Please bear in mind I am not a Power C programmer,but
am just guessing based on other platforms I program on. If you haveparameters
there could be some documemtation on how to pass them via registers in the compiler docs. Compilers seem to have their own style for stuff like that.It
also could be that you just need to drop the values into a certain memory location as the assember routine expects it there.
Not sure I follow you about the too few parameters.
The docs. I have reveal that the return value seems to overwrite the last parameter passed to the function. That's why I am worried about the too few parameters.
Sysop: | altere |
---|---|
Location: | Houston, TX |
Users: | 68 |
Nodes: | 4 (0 / 4) |
Uptime: | 24:01:38 |
Calls: | 1,018 |
Calls today: | 3 |
Files: | 8,022 |
D/L today: |
3 files (35K bytes) |
Messages: | 298,183 |