www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/03/15:57:38

Date: Tue, 04 Mar 1997 09:34:02 +1200
From: Bill Currie <billc AT blackmagic DOT tait DOT co DOT nz>
Subject: Re: DJGPP and ASM
To: Leath Muller <leathm AT solwarra DOT gbrmpa DOT gov DOT au>
Cc: enigma <enigma AT erols DOT com>, djgpp AT delorie DOT com
Reply-to: billc AT blackmagic DOT tait DOT co DOT nz
Message-id: <331B43CA.4894@blackmagic.tait.co.nz>
Organization: Tait Electronics NZ
MIME-version: 1.0
References: <199703030535 DOT PAA13380 AT solwarra DOT gbrmpa DOT gov DOT au>

Leath Muller wrote:
> you could type
> asm volatile ("
>         movl    $10, %eax;
>         movw    %ax, %dx;
>         etc etc etc...
> ");

Actully, in that example you don't need the semi-colons.  The code
between the quotes is copied verbatim (not including register
substitutions in extended asm) into the asm file, INCLUDING the
linefeeds on each line.

> 
> At least the semi-colon is more Cish in my opinion... :) Also, if you

True, but asm is not C (your choice though, see my sig).

> have a look at the DJGPP faq it will give you pointers to relevant pieces
> of information and articles to read, which show you varying methods of
> manipulating registers etc, and how to let gcc which registers to use.
> Personally, I push/pop and use lots of globals, but most people don't
> like my method... ;)

Nah, I prefer extended asm (more control and it usually optimises
better).

Bill
-- 
Leave others their otherness.

- Raw text -


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