What is Assembly Language Programming?
An Assembly Language is the most basic programming language available for any processor. With assembly language, a program works only with operations that are implemented directly on the physical CPU.
An assembly language is a low-level programming language for microprocessors and other programmable devices. It is not just a single language, but rather a group of languages. An assembly language implements a symbolic representation of the machine code needed to program a given CPU architecture.
Assembly Language is also known as assembly code or symbolic machine code. The term is also often used synonymously with 2 GL.
Assembly languages generally lack high-level conveniences such as variables and functions, and they are not portable between various families of processors. They have the same structures and set of commands as a machine language, but allows a programmer to use names instead of numbers. This language is still useful for programmers when speed is necessary or when they need to carry out an operation that is not possible in high-level languages.
Assembly code is converted into executable machine code by a utility program referred to as an assembler. The conversion process is referred to as assembly or assembling the source code. Assembly language usually has one statement per machine instruction, but comments and statements that are assembler directives, macros, and symbolic labels of program and memory locations are often also supported.
Each assembly language is specific to particular computer architecture and sometimes to an operating system. However, some assembly languages do not provide specific syntax for operating system calls, and most assembly languages can be used universally with any operating system, as the language provides access to all the real capabilities of the processor, upon which all system call mechanisms ultimately rest. In contrast to assembly languages, most high-level programming languages are generally portable across multiple architectures but require interpreting or compiling.
Learning Assembly Language
Assembly Language isn’t “just another language”.
To learn an assembly language is to learn the architecture of the CPU in question -- at least, the parts of it made visible to machine instructions. If you don’t know anything about how CPUs work, you need to learn something about that first -- or at the same time as learning the assembly for the CPU. One cannot learn just the one without learning a fair amount of the other.
Specifically, one needs to have some notion about registers (which on some machines come in several flavors, e.g. bit-vector/integer, floating point, machine address), how ALUs work, and for any serious work, why circuits are clocked and why some instructions may take more than one clock, how first and second level caches work, etc -- and more, like how MMUs and DMA work, for OS or embedded work. One needn’t know electronic design peruse, but this is right at the border between software and hardware, so it helps to know the basics of digital design. Conversely, many have begun to learn things about digital design by starting with assembly language.
Learning assembly is about learning about low-level machine details and how to implement algorithms when customary features are missing, a task greatly simplified when the student doesn't have to learn about low-level OS details at the same time. What’s more, high-level assemblers are infinitely flexible. They can provide a C- or Pascal-like language in one section of the code and the most reactionary, machine-oriented assembler in another, without requiring the student to waste his time learning multiple toolsets and fiddling about with foreign function interfaces. Accidental details don’t build character”, they merely waste time.
Comments