I am using FASM 1.41 beta x and am having problems assembling the following

fsubr <no operand>
fsubr STx ;single operand

it gives me an 'invalid operand' message, and if I'm reading the intel manuals correct this shouldn't happen
I also get the same error for FISUBR instruction also, and there maybe more.
Posted on 2002-10-10 12:56:29 by GorillaCoder
Available syntaxes are documented (clearly I hope) in the fasm.pdf file. And - as states my Intel Instruction Set Reference (order number 245372-007) - only fsubrp allows syntax without operand. Valid syntax is for example fsubr st1,st0
Posted on 2002-10-10 13:13:31 by Tomasz Grysztar

Available syntaxes are documented (clearly I hope) in the fasm.pdf file. And - as states my Intel Instruction Set Reference (order number 245372-007) - only fsubrp allows syntax without operand. Valid syntax is for example fsubr st1,st0


I was wrong about the FISUBR instruction.
This is the code snip I was converting from (I think MASM) format to FASM format

Mrandom proc near
_Mrandom label near
call mbrandom
mov edx,eax
shr eax,12
or eax,3ff00000h
shl edx,20
mov dword ptr ,eax
mov dword ptr ,edx
fld1
fld qword ptr
fsubr ;???
ret
mrandom endp

Original intel instruction info:
D8 E8+i FSUBR ST(0), ST(i) Subtract ST(0) from ST(i) and store result in ST(0)
DC E0+i FSUBR ST(i), ST(0) Subtract ST(i) from ST(0) and store result in ST(i)

after looking at the info above i am kind of confused as to how a single or no operand instruction would work, but yet it is used in the code snip above. ?????
Posted on 2002-10-10 16:47:50 by GorillaCoder
The no operand instructions such as fadd, fmul as they are in Masm can be written in Fasm as faddp st1,st0.

Or (if I'm interepting Privalovs response correctly) you need only add the p (Never tried this though)
Posted on 2002-10-11 03:25:42 by Eóin