TIP: Click on subject to list as thread! ANSI
echo: cbm
to: HARRY POTTER
from: COMPUTER NERD KEV
date: 2019-12-13 20:51:00
subject: Re: Power C/asm: returnin

Harry Potter  wrote:
> 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.

--
__          __
#_ < |\| |< _#

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.