www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/06/15:34:21

Date: Thu, 07 Nov 1996 09:18:34 +0000
From: Bill Currie <billc AT blackmagic DOT tait DOT co DOT nz>
Subject: Re: Protection disabling & Asm
To: Aaron Dwyer <adwyer AT galaxy DOT csc DOT calpoly DOT edu>
Cc: djgpp AT delorie DOT com
Reply-to: billc AT blackmagic DOT tait DOT co DOT nz
Message-id: <3281A96A.2575@blackmagic.tait.co.nz>
Organization: Tait Electronics NZ
MIME-version: 1.0
References: <3280684D DOT 55B7 AT galaxy DOT csc DOT calpoly DOT edu>

Aaron Dwyer wrote:
> 1.      Should I really regret turning off protection so I can write my
> buffer to vidmem?  It's just a safety net, correct?  I won't be risking
> a crash or an incompatibility as long as I can handle my memory
> correctly, right?

There may be some compatibility problems, but if your code is (memory)
bug free,
there shouldn't be any problems.

> 2.      Check out this inline asm block:
> 
>    //sin(t)->st, cos(t)->ct
> 
>    asm (
>       "flds %2\n"    //line 0
>       "fsincos\n"    //line 1
>       "fstps %1\n"   //line 2
>       "fstps %0\n"   //line 3
>         : "=g" (st), "=g" (ct)
>         : "g" (t)
>        );

I think you need to change the 'g's. 'm' will force memory and I think
'f' is for the 
floating point registers. See the info docs on constraints. (a search
should find the node).

Bill
-- 
Leave others their otherness.

- Raw text -


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