Assembly Language
Assembly Language
L 8,3000
Assembler
An assembler is a program that takes basic computer instructions
and converts them into a pattern of bits that the
computer's processor can use to perform its basic operations.
Some people call these instructions assembler language and
others use the term assembly language.
Assembly language
While assembly languages differ between processor architectures, they often
include similar instructions and operators. Below are some examples of
instructions supported by x86 processors.
• MOV - move data from one location to another
• ADD - add two values
• SUB - subtract a value from another value
• PUSH - push data onto a stack
• POP - pop data from a stack
• JMP - jump to another location
• INT - interrupt a process
the following assembly language can be used to add the numbers 3 and 4:
mov eax, 3 - loads 3 into the register "eax"
mov ebx, 4 - loads 4 into the register "ebx"
add eax, ebx, ecx - adds "eax" and "ebx" and stores the result (7) in "ecx"
Assembly language
limitations of assembly language
• No Symbolic names for memory locations. You need to keep track of the exact
memory location that a piece of data is stored. That is, you must manipulate
memory locations directly.
• Code is still machine dependent. We haven't really moved that far away from
the machine language - just put psuedo-English labels on it. We still need to
rewrite every piece of code for every machine.