delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/01/29/21:20:35

Date: Mon, 29 Jan 1996 21:13:22 -0500
From: dj (DJ Delorie)
To: ewillard AT hertz DOT elee DOT calpoly DOT edu
CC: djgpp AT delorie DOT com
In-reply-to: <4egpq9$mtf@isnews.csc.calpoly.edu> (ewillard@hertz.elee.calpoly.edu)
Subject: Re: Assembly Questions

>   1. What is the "start comment" character under 'as'?  The '/' char-
>      acter seems to work fine for comments that take the whole line,
>      but I have seen odd error messages if I use it after an argument.
>      The 'info' docs don't say anything about i386 comments.

I prefer to use regular C comments, and pass the source through the
preprocessor (cpp) by using "gcc foo.S" instead of "gcc foo.s" (note
case).

>   2. If I write a class's member function in assembly, what registers
>      can I modify without saving?  Based on the assembly I've seen
>      generated by GPP, I can freely modify %eax, %ecx, and %edx.  What
>      about %ebx, %esi, and %edi?

ebx, esi, edi, and ebp must be preserved across all function calls.

- Raw text -


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