thats C++
what are the differences .. like stuff that Im going to have to change in case I want to port some code from ANSI C++ to DJGPP or viceversa
either way one thing that I know is the inline ASM
but cant someone actually mod the GPP compiller and just make this:
"asm{" a keyword so when someone uses it then the compiller knows its inline asm that follows it
and } closes it
but I dunno... if its not that hard .. Ill prolly do that to make it more compiller portable, though
WHAT ARE THE OTHER DIFFERENCES
ignore the libraries cuz Ill prolly use my own
thanks,
later
DJGPP vs ANSI C++++
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:DJGPP vs ANSI C++++
imho, the asm { ... } is not an ANSI keyword ... it's specific to Borland and Microsoft compilers ...
Re:DJGPP vs ANSI C++++
asm is ANSI C++ and ISO C99; what you put inside asm {} blocks isn't (because it depends on the target processor).
In any case, GCC expects asm("code" : stuff), not asm { code }
In any case, GCC expects asm("code" : stuff), not asm { code }
Re:DJGPP vs ANSI C++++
thanks but are there any other differences??
cuz I can handle that or I maybe will just modify DJGPP(too much code to read though) to have asm{ as a key word and to close it with }
but OTHER DIFFERENCES.. are there any???
thanks again
cuz I can handle that or I maybe will just modify DJGPP(too much code to read though) to have asm{ as a key word and to close it with }
but OTHER DIFFERENCES.. are there any???
thanks again
Re:DJGPP vs ANSI C++++
Yes, there are a lot of differences between the BC++ asm {} block and the gcc __asm__() block. gcc's inline assembler is more powerful than any other I've used, so I'd recommend you learn how to use gcc's asm.
Re:DJGPP vs ANSI C++++
Im not talking about the ASM.. Im talking about the ACTUALL C++ SYNTAX... I myself dont even use asm.. and dont need powerful stuff
I only use the asm{ to call in interupt or something like that.. I am a C++ programmer
so thats what Im asking... is there a diference in the C++ syntax??
thanks
I only use the asm{ to call in interupt or something like that.. I am a C++ programmer
so thats what Im asking... is there a diference in the C++ syntax??
thanks
Re:DJGPP vs ANSI C++++
There is no difference in the word "asm" (gcc and BC++ use the same keyword because it's standard C++) but there is a huge difference in what comes after.
BC++:
gcc:
BC++:
Code: Select all
num = 0x102;
asm
{
mov eax, num
int 30h
}
Code: Select all
asm volatile ("mov %0, %%eax\n"
"int $0x30" : : "g" (num));
Re:DJGPP vs ANSI C++++
I think that the Using and Porting the GNU Compiler Collection (GCC) FAQ has the information you want, particularly the sections entitled, Language Standards Supported by GCC, Extensions to the C Language Family and Extensions to the C++ Language. Note that gcc C++ is a superset of ANSI C++, AFAIK, and most ANSI code should compile correctly in it. Furthermore, there are various command-line options which specify which standard and version to adhere to, and how closely.