🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.language.basm
Article #31

floating point asm

#31
From: Spine
Date: Wed, 05 Sep 2007 13:37
26 lines
1411 bytes
Hi,

I am just trying a bit around using assembler, and run into problems.

just multiplying integers a and b to res as result. this works fine.
 int a = 2,b = 3,res;
 for (int i=0;i<100;i++) {
  __asm{
   mov eax, a
   mov ecx, b
   mul ecx
   mov res, eax
  } }

then why does this not work? that is, it works fine for 4 iterations or so, 
then it comes up with illegal flaoting point operation. even if I only have 
"fld d_a" it throws the error.
 double d_a = 1.1, d_b = 1.2, d_res;
 for (int i=0;i<100;i++) {
  __asm{
   fld d_a
   fmul d_b
   fst d_res
  } }

Sipke 
Technical Details
Message-ID: <46dfc4ba$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 107b11,2ff544b33be6fabc,start
X-Google-Attributes: gid107b11,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Spine" <boterkuipje@hotmail.com>
Newsgroups: borland.public.cppbuilder.language.basm
Subject: floating point asm
Date: Wed, 5 Sep 2007 15:37:31 +0200
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 85.148.236.85
Message-ID: <46dfc4ba$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1189070010 85.148.236.85 (6 Sep 2007 02:13:30 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail