Author |
Topic: FPU Instruction fail (Read 833 times) |
|
Ric
Full Member
member is offline


Gender: 
Posts: 136
|
 |
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
|
|
Logged
|
It's always possible, but not necessarily how you first thought. Chin up and try again.
|
|
|
DDRM
Administrator
member is offline


Gender: 
Posts: 321
|
 |
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
|
|
Logged
|
|
|
|
Ric
Full Member
member is offline


Gender: 
Posts: 136
|
 |
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
|
|
Logged
|
It's always possible, but not necessarily how you first thought. Chin up and try again.
|
|
|
Ric
Full Member
member is offline


Gender: 
Posts: 136
|
 |
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
|
|
Logged
|
It's always possible, but not necessarily how you first thought. Chin up and try again.
|
|
|
Ric
Full Member
member is offline


Gender: 
Posts: 136
|
 |
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
|
|
Logged
|
It's always possible, but not necessarily how you first thought. Chin up and try again.
|
|
|
|