intermediate-level computer language that is less complex to use than a machine language. Assembly languages use abbreviations or mnemonic codes to replace the 0s and 1s of machine language (A for "add," C for "compare," and MP for "multiply"). A translator is required to convert the assembly language program into machine language that can be executed by the computer. This translator is the assembly program. Every command in assembly language has a corresponding command in machine language. The assembly language differs among computers, and thus these programs are not easily transferable to machines of a different type from the one on which they were written.
computer language in which each statementcorresponds to one machine language statement. Assembly languages are more cumbersome to use than regular or high-level programming languages, but they are much easier to use than pure machine languages, which require that all instructions be written in binary code.
a computer language in which each statement corresponds to one of the binary instructions recognized by the CPU. Assembly-language programs are translated into machine code by an assembler.
Assembly languages are more cumbersome to use than regular (or high-level) programming languages, but they are much easier to use than pure machine languages, which require that all instructions be written in binary code.
Complete computer programs are seldom written in assembly language. Instead, assembly language is used for short procedures that must run as fast as possible or must do special things to the computer hardware. For example, Figure 17 shows a short routine that takes a number, checks whether it is in the range 97 to 122 inclusive, and subtracts 32 if so, otherwise leaving the number unchanged. (That particular subtraction happens to convert all lowercase ASCII codes to their uppercase equivalents.)
This particular assembly language is for the Intel 8086 family of processors (which includes all PC-compatible computers); assembly languages for other processors are different. Everything after the semicolon in each line is a comment, ignored by the computer. Two lines (PROC and ENDP) are pseudo instructions; they tell the assembler how the program is organized. All the other lines translate directly into binary codes for the CPU.
Many of the most common operations in computer programming are hard to implement in assembly language. For example, there are no assembly language statements to open a file, print a number, or compute a square root. For these functions the programmer must write complicated routines from scratch, use services provided by the operating system, or call routines in a previously written library.