www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/01/19/12:46:35

Date: Thu, 19 Jan 95 11:15:18 -0500
From: dj AT stealth DOT ctron DOT com (DJ Delorie)
To: A DOT D DOT Brown AT bradford DOT ac DOT uk
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: DJGPP assembler documentation

> (I've had to experiment by using gcc -S and learning from the output)

That and reading the target files in the sources.

> 1) In assembly routines, which registers can you safely clobber.  I know
> that eax is used for the return value, but changing edi without saving it
> caused some really psychadelic bugs.  (Asthetic maybe, but not desirable)

ebx, esi, edi, ebp must be preserved.

> 3) Turbo assembler makes the reference of passed variables very easy by
> allowing you to specify them.  While it looks like this is possible using
> inline assembler, is it possible in as?

Only with macros, using a .S extension (passes it through cpp).
Normally, inline assembler is what you would use.

> 4) I've looked at inline assembly that other people have done and can't find
> any documentation on it with djgpp.  For example, when you specify which
> registers are clobbered, I guess that "d" means edx, "D" means edi, etc.
> Is this right?  Does "I" mean integer?  Where can I find documentation?

In gcc's info files.


- Raw text -


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