BBC BASIC for Windows
« FPU Instruction fail »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:01pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: FPU Instruction fail  (Read 833 times)
Ric
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 136
xx FPU Instruction fail
« Thread started on: Mar 1st, 2016, 8:17pm »

Can anyone tell me why this code syntax errors at line 1250 Code:
 1230   fld   DWORD        [data%+56]
 1240   fld   DWORD        [data%+60]
 1250   fmul  st(0),st(1)
 1260   fstp  DWORD        [data%+68]
 


I am new to the fpu and highly frustrated!!

Any help is much appreciated.

Ric
User IP Logged

It's always possible, but not necessarily how you first thought. Chin up and try again.
DDRM
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 321
xx Re: FPU Instruction fail
« Reply #1 on: Mar 2nd, 2016, 08:43am »

Hi Ric,

I have even less experience than you, so treat with caution, and I can't test it, but I note in the manual under floating point operands it says you should refer to the registers as ST0, ST1, etc. - is it just a syntax (ie st(0) instead of STO)? Your syntax implies that you are referring to array components.

Best wishes,

D
User IP Logged

Ric
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 136
xx Re: FPU Instruction fail
« Reply #2 on: Mar 2nd, 2016, 12:23pm »

The simple answer to your question about syntax is "I don't know?". I have tried many different syntax and can not get it to work. I agree it looks like I'm trying to access an array (and in a way I suppose I am). The registers I am trying to manipulate are the fp stack st0 to st7. Could you point me in the direction of the location in the manual you were reading from please, I have looked at many sources and all imply the use of brackets, which can't be right otherwise there would be no need for the post.

Cheers Ric
User IP Logged

It's always possible, but not necessarily how you first thought. Chin up and try again.
Ric
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 136
xx Re: FPU Instruction fail
« Reply #3 on: Mar 2nd, 2016, 12:29pm »

Just found the fp section in the assembler part of the manual, the registers are in capital, which is a syntax I have not tried. Will have a go tonight and let you know.

Ric
User IP Logged

It's always possible, but not necessarily how you first thought. Chin up and try again.
Ric
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 136
xx Re: FPU Instruction fail
« Reply #4 on: Mar 2nd, 2016, 5:23pm »

Cheers D
The solution was that the syntax requires capitals and no brackets, must have been the only combination I didn't try last night!! This is an interesting twist because every other example I could find (couldn't find any for bb4w) used lowercase and brackets. Ho hum.

Back to the faster tile transfer routine using fp asm

grin grin grin
User IP Logged

It's always possible, but not necessarily how you first thought. Chin up and try again.
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls