Re: [fpc-pascal] Converting 32bit intel asm to Pascal or 64bit att asm

2011-03-10 Thread Andrew Haines
On 03/09/11 14:18, Thomas Schatzl wrote: On Wed, 09 Mar 2011 13:23:55 -0500, Andrew Haines wrote: On 03/09/11 12:26, Thomas Schatzl wrote: FYL2X calculates the log to the base 2 of tmp, not log to the base e of tmp? Just a guess. I originally used log2(Tmp) but switched to ln to check if

Re: [fpc-pascal] Converting 32bit intel asm to Pascal or 64bit att asm

2011-03-09 Thread Andrew Haines
On 03/08/11 19:58, Andrew Haines wrote: Hi, I'm trying to convert the following 32bit asm to pascal so it's portable. Also to 64bit asm. It's from ACS audio component suite. What am I doing wrong? For anyone who's interested I fixed the 64bit assembly version which is good enough for

Re: [fpc-pascal] Converting 32bit intel asm to Pascal or 64bit att asm

2011-03-09 Thread Thomas Schatzl
Hi, On Wed, 09 Mar 2011 11:58:08 -0500, Andrew Haines wrote: if Tmp Im then begin //Tmp := ln(Tmp)*LogBase+Shift; // same as the following asm proc? asm FLD LogBase; FLD Tmp; FYL2X; FYL2X calculates the log to the base 2 of tmp, not

Re: [fpc-pascal] Converting 32bit intel asm to Pascal or 64bit att asm

2011-03-09 Thread Andrew Haines
On 03/09/11 12:26, Thomas Schatzl wrote: Hi, On Wed, 09 Mar 2011 11:58:08 -0500, Andrew Haines wrote: if Tmp Im then begin //Tmp := ln(Tmp)*LogBase+Shift; // same as the following asm proc? asm FLD LogBase; FLD Tmp; FYL2X;

Re: [fpc-pascal] Converting 32bit intel asm to Pascal or 64bit att asm

2011-03-09 Thread Thomas Schatzl
On Wed, 09 Mar 2011 13:23:55 -0500, Andrew Haines wrote: On 03/09/11 12:26, Thomas Schatzl wrote: Hi, On Wed, 09 Mar 2011 11:58:08 -0500, Andrew Haines wrote: if Tmp Im then begin //Tmp := ln(Tmp)*LogBase+Shift; // same as the following asm proc? asm

[fpc-pascal] Converting 32bit intel asm to Pascal or 64bit att asm

2011-03-08 Thread Andrew Haines
Hi, I'm trying to convert the following 32bit asm to pascal so it's portable. Also to 64bit asm. It's from ACS audio component suite. What am I doing wrong? I tested my Pascal code with linux 32bit but the output differs from the 32bit asm. In 64bit linux it differs further but this could be