![]() |
Am going to learn about "Assembly langauge" can someone please explain to me what exactly is Assembly language?
Thank you so much. Student. |
"high-level" or "third-generation" languages are like C++ and java and C and fortran and BASIC, etc. with these you tell the computer to do something and it does it. binary code is the "on-off" ("one" or "zero") language the computer reads. assembly is in the middle. it is processor-specific and it tells the computer things like "move this bit here" and "move that bit here" with a syntax slightly more intelligible than: 0100101010000101001010001001001001100010100100100100100101010010010010010010010100110101011010101010010101010011111111111100000010101101000010110100100
you literally tell the processor what bits to move where. the "C" language allows you to integrate this into your code for the sake of speed. this is mainly because people programmed with assembly in the 70's with punchcards and shit. now, processors are so fast that it probably doesn't matter in most situations, but it is important for learning how the computer WORKS. :ph34r: |
Assembly language is the lowest level programming language available without having to write your code in machine code.
Each assembly instruction has direct relation to a specific machine code instruction while higher level languages such as C++ actually expand to several machine code instructions. |
so ASM is the general group for C++, C, and java?
err Im a bit confused between the C++ and ASM? Also off topic, what is C#? Thanks |
C++, C, Java, etc. are what are called "high-level" languages. In a high level language, one instruction, such as printf(), could take dozens of actual processor instructions to execute.
In a low-level language like assembly, you tell the computer, one by one, what processor instructions to execute. So it could take many lines of assembly to do the same thing as one line of C. And in regard to your question about C#, C# is basically Microsoft's version of Java. |
Assembly is used to
1. Speed up a C program 2. To code an OS But it is mainly used to make bootloader, since it's the only language that can. mov 0x123 |
well don't forget:
3. To make use of cool stuff such as MMX,SSE[1-3],3Dnow!, etc -- stuff that many compilers can't make use of, well, not in a sane way at least... (I wonder if any comiler can make use of the parallellism of SIMD (single instruction, multiple data - eg, do 2-8 integer additions with one instruction with saturation (ie values 255+1 = 255 for bytes, normal add instruction make 255+1 = 0 for byte, btw))) :ph34r: showoff: paddusb (~"Add unsigned with saturation on byte") will do 8 byte additions in one(sic) instruction cycle (MMX instruction) - actually, it's not that hard to "decode" the MMX instructions, once one has learned it, one way to describe the packed add instruction is (unless I'm misstaken): /padd([u]?[s]?[bw]|[bwd])/ |
| All times are GMT -5. The time now is 3:50 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC