delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/28/14:13:07

Xref: news2.mv.net comp.os.msdos.djgpp:4301
From: lehmann AT mathematik DOT th-darmstadt DOT de (Alexander Lehmann)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: How are args passed in DJGPP?
Date: 28 May 1996 12:52:29 GMT
Organization: Technische Hochschule Darmstadt
Lines: 26
Distribution: world
Message-ID: <4oesud$bad@rs18.hrz.th-darmstadt.de>
References: <philpri DOT 22 DOT 833228994 AT ee2 DOT ee DOT cit DOT ac DOT nz>
NNTP-Posting-Host: fb0407.mathematik.th-darmstadt.de
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Richard Philp (philpri AT ee2 DOT ee DOT cit DOT ac DOT nz) wrote:

: Hi all,
:   Just a simple question. I've got some assembler that I've assembled and 
: then use o2c to convert it to COFF. The thing is I can't get the assembler 
: to pass the correct value back to the program.

: Are the output from a program passed in the registers? If so which one(s)?

: Or

: Are they passed on the stack? And if so how?

Well, the easiest way to solve this problem is to compile same sample C code
with -S -O and look at the resulting .s file.
int results are returned in eax, I'm not sure how floats, longlongs and
structs are handled, but this should be obvious with the compiler asm output.


bye, Alexander

--
Alexander Lehmann,                                  |  "On the Internet,
alex AT hal DOT rhein-main DOT de  (plain, MIME, NeXT)         |   nobody knows
lehmann AT mathematik DOT th-darmstadt DOT de (plain)          |   you're a dog."
!!CHANGED!! <URL:http://www.mathematik.th-darmstadt.de/~lehmann/>

- Raw text -


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