delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/11/23/00:11:20

Xref: news-dnh.mv.net comp.os.msdos.djgpp:3395
Newsgroups: comp.os.msdos.djgpp
Path: news-dnh.mv.net!mv!news.sprintlink.net!demon!tank.news.pipex.net!pipex!news.mathworks.com!newsfeed.internetmci.com!swrinde!sdd.hp.com!usc!math.ohio-state.edu!cis.ohio-state.edu!nntp.sei.cmu.edu!bb3.andrew.cmu.edu!cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!oitnews.harvard.edu!cfanews!cfa0!peprbv
From: peprbv AT cfa0 DOT harvard DOT edu (Bob Babcock)
Subject: Re: ASM functions returning values
Sender: news AT cfanews DOT harvard DOT edu
Reply-To: rbabcock AT cfa DOT harvard DOT edu
Organization: Smithsonian Astrophysical Observatory, Cambridge, MA, USA
References: <48sk3q$qmj AT osfb DOT aber DOT ac DOT uk>
Date: Wed, 22 Nov 1995 18:48:15 GMT
Lines: 11
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

NIGEL  HUGHES (ngh94 AT aber DOT ac DOT uk) wrote:
: Dear All,
: 	Quick question. I have some asm routines (in a separate
: .S file which I link in) and have parameters being passed OK no
: probs. The question I have is, where do I leave a value so it
: is returned by the function? Stack a register (%eax sounds likely) or what?

The easiest way to get the answer to this sort of question for any C
compiler is to write a trivial C program which returns a value of the
same type, get assembly language output from the compiler, and see how
the compiler did it.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019