|
From: Marco R. <ma...@ne...> - 2004-06-25 14:02:56
|
Hello all, =20 I got a free version of Dev-c++ version 5. To be more specific, =20 Dev-C++ 5.0 beta 8 (4.9.8.0) (12 MB) with Mingw/GCC 3.2 =20 From the site, =20 http://www.bloodshed.net/dev/devcpp.html. =20 Now, my problem is that it=B4s not possible to program assembler with = it. The __asm instruction is not working!!! =20 Can someone please tell me why? Or can someone tell me where to download another free c++ compiler with this feature working ? =20 Next I present a little program (console), and the respective compile = log, =20 PROGRAM: =20 #include <iostream> #include <stdlib.h> =20 using namespace std; =20 int main(int argc, char *argv[]) { __asm=20 { mov ax,0h }=20 system("PAUSE"); =20 return 0; } =20 COMPILE LOG: =20 Compiler: Default compiler Building Makefile: "C:\Dev-Cpp\my_projects\prj1\Makefile.win" Executing make... make.exe -f "C:\Dev-Cpp\my_projects\prj1\Makefile.win" all g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/include/c++" -I"C:/Dev-Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward" -I"C:/Dev-Cpp/include" =20 main.cpp: In function `int main(int, char**)': main.cpp:9: parse error before `{' token main.cpp:10: invalid suffix on integer constant main.cpp: At global scope: main.cpp:12: ISO C++ forbids declaration of `system' with no type main.cpp:12: `int system' redeclared as different kind of symbol C:/Dev-Cpp/include/stdlib.h:373: previous declaration of `int = system(const=20 char*)' main.cpp:12: invalid conversion from `const char*' to `int' main.cpp:13: parse error before `return' make.exe: *** [main.o] Error 1 Execution terminated =20 =20 Thanks =20 Marco=20 =20 |