I see, so they generally concentrate on one language, and do al little of some others, what are the most common ones that C++ programmers do?
I see, so they generally concentrate on one language, and do al little of some others, what are the most common ones that C++ programmers do?
~Thank you~
some have it, some don't, watch out for those who do....
>I see, so they generally concentrate on one language, and do al little of some others, <
yeah this doesn't mean they don't master half of them it just means they usually start with a learning language(or not, i didn't) pick another one and then master that, and during or after pick up on some others.
>what are the most common ones that C++ programmers do?
that greatly depends on the job, but what seems typical is C/C++ programmers usually go for some at least minor knowledge Assembler.
ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.
So once you know C++ and a little of Assembly, you pretty much have complete control over your computer?
is assembly a lot faster to do than C++?
and a lot harder?
Last edited by UneducatedOne; 09-27-2001 at 02:25 AM.
~Thank you~
some have it, some don't, watch out for those who do....
No unless you are using DOS or windows 9x you won't have
access to certain stuft unless your a privilage user.
I don't think so but I would have to benchmarkis assembly a lot faster to do than C++?
a assembly program compared to a c++ program.
So you still need a compiler for the assembly language?
~Thank you~
some have it, some don't, watch out for those who do....
I don't need a c compiler, you need an assembler and a linker.
Your c compiler will probably come with some sort
of assembler.
Is assembly mostly the same as C++?
what is the difference?
would my DevC++ compiler have an assembly compiler and linker?
~Thank you~
some have it, some don't, watch out for those who do....
You can use inline assembly in DevC++ but however it's quite annoying. Example:
This code will display the number '25' (provided I have written it correct). In clean assembly (MASM) it could be written like this:Code:long b = 5; long a = 5; asm(" imul %1,%2 " : "=r" (a) /* Move register back into 'a'*/ : "r" (a), "r" (b) /* Put 'a' and 'b' into two registers */ ); printf("%d", a);
Code:.data frmt db "%d",0 .code something PROC LOCAL a:DWORD, b:DWORD mov eax,a mov ecx,b imul eax,ecx invoke printf,ADDR frmt, eax something ENDP
Last edited by gliptic; 09-28-2001 at 01:36 AM.
// Gliptic
>Is assembly mostly the same as C++?
it's a considerable bit different.
>what is the difference?
asm is lower level more compicated, i can't really go into depth about the difference since i can't program assembly yet, but im slowly learning it.
>would my DevC++ compiler have an assembly compiler and
linker?
well a quike look at the FAQ says yes,
NOTE: its AT&T Assembler not Intel
Example:
int AdrIO ;
static char ValIO ;
void MyFunction(..........)
{
__asm("mov %dx,_AdrIO") ; // loading 16 bits register
__asm("mov %al,_ValIO") ; // loading 8 bits register
/*
Don't forget the underscore _ before each global variable names !
*/
__asm("mov %dx,%ax") ; // AX --> DX
}
Intel asm looks some waht different like this
// taken from a post by DavidP
void initGraph (void)
{
// might need an underscore here or two.
asm {
mov ax, 13h
int 10h
}
}
also remember this inline asmembler not pure asmembler, that is its compiled with a C program not on its own.
Yes, you can access global variables with just the name preceded by an underscore but local variables has to be used in the way I showed.
The difference between AT&T syntax and intel syntax is mainly that almost all instruction operands are swapped. For example in AT&T syntax you write 'mov src,dest' instead of 'mov dest,src' in intel syntax. That means that the example you showed (mov %dx, %ax) moves the value in dx to ax.
The other difference is that you can't write 'mov DWORD PTR[eax], 5' instead you have to write 'movl (%eax), $5'.
The 'l' after the instruction name tells the assembler that you want to write a DWORD to the memory position. All registers must have a '%' prefix but when you are using inline assembly in DevC++ you must add one more '%' (%%reg) because the '%' character is used to access arguments passed to the asm-statement. All immediate values must have a '$' prefix also.
I think the AT&T syntax is quite annoying. The Intel syntax is much better together with VC++.
Last edited by gliptic; 09-28-2001 at 01:40 AM.
// Gliptic
So people generally learn C/C++ before assembly?
alos, whats pascal. basic, qbasic, java and javascript?, all computer programming languages? all similar?
~Thank you~
some have it, some don't, watch out for those who do....
I learned assembler before C++ actually.
BASIC/QBASIC: Simple languages which are RAD-tools but not as much features like C++. These languages are often 16-bit DOS.
JAVA: Looks quite much like C++. It's platform independent because the code is compiled to pseudo instructions which are interpreted later. Applets (that's what applications done with Java are called) are mostly found on the Internet.
JAVASCRIPT: Scripting language which also looks much like C++. Used on the client-side on the Internet to create more interactive pages.
PASCAL: Quite good language. The new, Windows based Pascal is named Delphi. Delphi can be compared to Visual Basic but I think Pascal is a bit faster.
Thank you.
What is 'pseudo'?
And those languages are the main ones?, I mean there is no others?, or there is, just not as easy to use or well known?
....
~Thank you~
some have it, some don't, watch out for those who do....
> What is 'pseudo'?
Kind of
> And those languages are the main ones?, I mean there is no others?, or there is, just not as easy to use or well known?
They're the more common ones. There's tons of them out there - they're just not used as much. If you wanted everything, you could throw in lisp, php, delphi, fortran, cobol, asm, and about a million others...
-Govtcheez
[email protected]