Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » Assmbley with Upp
Assmbley with Upp [message #8212] |
Tue, 20 February 2007 02:30  |
_Seven_
Messages: 35 Registered: April 2006
|
Member |
|
|
Hi. I have lessons about programming with assembly in C. My professor show me this funcion as example:
Quote: |
float AreaCirc(float ray){
float area;
asm{
finit
fld dword ptr ray
fmul st,st(0)
fldpi
fmul
fstp dword ptr area
fwait
}
return area;
}
|
and compiling the code appear some erros in this funcion. They are:
Quote: |
C:\MyApps\teste\teste.cpp: In function `float AreaCirc(float)':
C:\MyApps\teste\teste.cpp:6: error: expected `(' before '{' token
C:\MyApps\teste\teste.cpp:6: error: expected asm body before '{' token
C:\MyApps\teste\teste.cpp:8: error: `finit' undeclared (first use this function)
C:\MyApps\teste\teste.cpp:8: error: (Each undeclared identifier is reported only once for each function it appears in.)
C:\MyApps\teste\teste.cpp:8: error: expected `;' before "fld"
|
Well, was my teacher that made the code and for this reason the code is right, so where is the problem? I think that he use Borland C or MVS.
Thanks for your help.
|
|
|
|
Goto Forum:
Current Time: Sat Apr 26 14:44:46 CEST 2025
Total time taken to generate the page: 0.00868 seconds
|