A programming language that is one step away from machine language. Each assembly language statement is translated into a machine instruction by the assembler. Programmers must be well versed in the computer's architecture, and, undocumented assembly language programs are difficult to maintain. Assembly languages are hardware dependent; there is a different one for each CPU series.
It Used to All Be Assembly Language
In the past, control programs (operating systems, database managers, etc.) and many applications were written in assembly language to maximize the machine's performance. Today, C/C++ is widely used instead. Like assembly language, C/C++ can manipulate the bits at the machine level, but it is also portable to different computer platforms. There are C/C++ compilers for almost all computers. See compiler
Assembly Language Vs. Machine Language
Although often used synonymously, assembly language and machine language are not the same. Assembly language is turned into machine language. For example, the assembly instruction compare a,b
might be translated into COMPARE contents of bytes 32340-32350 with 54567-54577 (where A and B happen to be located in RAM at the moment). The actual binary format of the machine instruction is specific to the computer it is running in. See machine language
They Can Be Quite Different
Assembly languages are quite different between computers as is evident below, which takes 16 lines of code for the HP and 82 lines for the x86. This example changes Fahrenheit to Celsius.
byte array b'string(*) = string;
integer ftemp, ctemp, len;
move buffer:= "Enter Fahrenheit ";
ctemp:= (ftemp-32) * 5 / 9;
move buffer:= "Celsius is ";
move buffer(14) := string, (-len);
PC (Intel x86)
cseg segment para public 'CODE'
msgstr db 'Enter Fahrenheit '
crlf db 13,10,'$'
nine db 9
five db 5
outstr db 'Centrigrade is $'
start1: push ds
mov dx,offset cseg:msgstr
cent: call getnumb
mov dx,offset cseg:outstr
cl: mul five
mov dx,offset cseg:crlf
exit: pop ds
llp: mov dl,0ffh
llr: mov dx,offset cseg:crlf
putval: xor bx,bx
llg: xor dx,dx
bloop: pop dx