Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Need help understanding what is assembler/y

Experienced Elementalist
Joined
Jun 27, 2006
Messages
248
Reaction score
6
1st. What is the difference between Assembly and Assembler?
2st. I found some guides in the internet and different forums, and most of the people is speaking about the processor and "This assembler is not for this processor" I mean assembly is not for writing programs? then wth it got to do with processor type??

Thanks for helpers ^_^
 
Custom Title Activated
Loyal Member
Joined
Aug 8, 2004
Messages
3,892
Reaction score
20
1. There is little to no difference as far as I know.
2. Assembler directly talks to your computers hardware, because its a low-level language. Its hardly ever used these days because higher level languages like C++ are compiled first and thus made ready to run on different platforms, without the fuss of having to rewrite your programs for each different platform.
 
Divine Celestial
Loyal Member
Joined
Jul 7, 2004
Messages
853
Reaction score
5
Alright, this is going to be somewhat lengthy. The use of the two terms is as controversial as the programming vs scripting issue, although not as much. Here is the currently recommended terminology:

Assembly: The act of assembling a program written in Asm.

Assembler: The program which translates Asm source code into binary output.

Now, the issue is that some programmers and educators are referring to the language itself using the above two terms, which further causes confusion among the community. As such, "writing in assembly" and "writing in assembler" are both commonly encountered, although neither usage should really have been allowed. The recommended term to use is "Asm" for the name of the language, and usage of "Assembly" and "Assembler" should be restricted to those noted above.

("Assembly" is also the name of a demoscene party that is also known as "ASM" -- for more info, see )

----
I found some guides in the internet and different forums, and most of the people is speaking about the processor and "This assembler is not for this processor" I mean assembly is not for writing programs? then wth it got to do with processor type??
There are many dialects of Asm specific to specific processor architectures. These can be grouped into several large families, the largest of which is currently the Intel IA32/IA64 (which includes the base 16-bit x86). Others include M68K, Z80/x80/x85, PPC, etc.

@FragFrog: With the gradual convergence to one architecture (see what happened to the Mac?) in the PC industry, this argument may be losing effectiveness. However, outside the PC industry, in devices such as PDAs and phones, etc. where the hardware still has not standardised, this argument still holds.
 
Custom Title Activated
Loyal Member
Joined
Aug 8, 2004
Messages
3,892
Reaction score
20
@FragFrog: With the gradual convergence to one architecture (see what happened to the Mac?) in the PC industry, this argument may be losing effectiveness. However, outside the PC industry, in devices such as PDAs and phones, etc. where the hardware still has not standardised, this argument still holds.

Interesting point, however, on the other hand there are also new architectures arising which demand different core code to run efficiently. For example Intels hyperthreading which they plan to reintroduce in the next few years, multi-core sollutions as the core2-duo and 64 bit CPU's as AMD's X64 will benefit greatly from cpu-specific optimalisation. Seeing how there are a lot more different CPU's then there used to be (5 years ago for regular users it was just the celeron / P4 versus the Athlon XP / Duron, and all of those at least used mainly the same 32 bit architecture) and more are being introduced all the time (see for instance the 8 core CELL CPU used in the PS3) I think instead of lower most programmers will seek higher level languages. I expect the group that knows ASM will be next to extinct in no more then a decade, much the same way as COBOL and Lisp are now almost only used by the group that was around when they were invented in the sixties :smile:
 
Master Summoner
Joined
Feb 7, 2005
Messages
532
Reaction score
0
Interesting point, however, on the other hand there are also new architectures arising which demand different core code to run efficiently. For example Intels hyperthreading which they plan to reintroduce in the next few years, multi-core sollutions as the core2-duo and 64 bit CPU's as AMD's X64 will benefit greatly from cpu-specific optimalisation. Seeing how there are a lot more different CPU's then there used to be (5 years ago for regular users it was just the celeron / P4 versus the Athlon XP / Duron, and all of those at least used mainly the same 32 bit architecture) and more are being introduced all the time (see for instance the 8 core CELL CPU used in the PS3) I think instead of lower most programmers will seek higher level languages. I expect the group that knows ASM will be next to extinct in no more then a decade, much the same way as COBOL and Lisp are now almost only used by the group that was around when they were invented in the sixties :smile:

There is a COBOL class in my college, i supose its kinda good for business apps. I still dunno why the hell anyone would want to use it though.
 
Joined
Sep 30, 2003
Messages
1,270
Reaction score
10
just a lil side note, any optimized code of ASM will allways run faster then any higher language compiled code since you lack the costumization at lower levels

so if you are aiming for high performance objectives you'll most prolly have to deal with asm to optimize your code to the max
 
Divine Celestial
Loyal Member
Joined
Jul 7, 2004
Messages
853
Reaction score
5
Interesting point, however, on the other hand there are also new architectures arising which demand different core code to run efficiently. For example Intels hyperthreading which they plan to reintroduce in the next few years, multi-core sollutions as the core2-duo and 64 bit CPU's as AMD's X64 will benefit greatly from cpu-specific optimalisation. Seeing how there are a lot more different CPU's then there used to be (5 years ago for regular users it was just the celeron / P4 versus the Athlon XP / Duron, and all of those at least used mainly the same 32 bit architecture) and more are being introduced all the time (see for instance the 8 core CELL CPU used in the PS3) I think instead of lower most programmers will seek higher level languages. I expect the group that knows ASM will be next to extinct in no more then a decade, much the same way as COBOL and Lisp are now almost only used by the group that was around when they were invented in the sixties :smile:
Intel's newer CPUs just enhance the x86/IA32/IA64 instruction sets with more instructions. A program written for the 4.77MHz 8088 in the PC of the early 1980s is 100% directly compatible at the binary level with the latest CPU from Intel (quad core?) or AMD.

The fact that most of the instructions in the x86/IA32/IA64 instruction set have been there since 1978 shows how things that work don't change for no reason, unlike in software...

Asm will never die; although its use has decreased, it is still highly regarded in the demoscene/"elite"-coding subculture/community. Courses in Asm are still being provided, and Asm is still being taught in computer hardware courses -- how else would one be able to understand how the hardware works?

Comparing Asm with COBOL and Lisp isn't really purposeful, as COBOL died (not really -- it's just not being used much for new development, but the existing codebase is huge) simply because it did not have many advantages over other languages; Lisp is still being used widely in areas of artificial intelligence research and as an integrated scripting facility in large programs, e.g. AutoCAD.
just a lil side note, any optimized code of ASM will allways run faster then any higher language compiled code since you lack the costumization at lower levels

so if you are aiming for high performance objectives you'll most prolly have to deal with asm to optimize your code to the max
...and with that, I leave you with this 4096-byte intro:

One word describes it: Awesome.
 
Experienced Elementalist
Joined
Jun 27, 2006
Messages
248
Reaction score
6
It's so... complicated :S
So if I wanna learn ASM to build a program, then I will need to make several version so it will match all processors types?
 
Divine Celestial
Loyal Member
Joined
Jul 7, 2004
Messages
853
Reaction score
5
It's so... complicated :S
So if I wanna learn ASM to build a program, then I will need to make several version so it will match all processors types?
No, unless you're doing some embedded systems/non-PC programming. As I've already stated, all PCs are based on x86 architecture.
 
Custom Title Activated
Loyal Member
Joined
Aug 8, 2004
Messages
3,892
Reaction score
20
just a lil side note, any optimized code of ASM will allways run faster then any higher language compiled code since you lack the costumization at lower levels

Thats simply not true anymore. Recent compilers, especially for C++, are capable of optimizing your code just as good as you would be able to, at least for anything larger then a few thousend lines. Using ASM for bigger projects makes no sense, even if they have to be fast. Or why else do you think most recent game engines are written in C++ / C# instead of ASM, even though a gameengine should be as optimized as possible?

As for backwards compatibility: I didn't say the code wouldn't run, I said it wouldn't run optimized. If you use ASM to write code for any CPU you're limiting yourself to an old set of instructions that make no use of newer feautures which you would have been able to use with higher level languages. Apart maybe from educational purposes there really isn't much use for ASM in pc-programming.

Ow and btw, NOT all pc's are based on the x86 architecture. Intel uses the IA-64 architecture for its Opteron CPU, IBM uses the Power architecture for its PowerPC and dozend of others such as the SPARC, z/Architecture, MIPS, etc. still exist.
 
Back
Top