

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An introduction to assembly language, explaining its role as an intermediate language between high-level programming languages and machine code. It covers the format of assembly language instructions, the use of labels, and the functions of an assembler. The document also touches upon data variables and expression expansion.
Typology: Slides
1 / 3
This page cannot be seen from the preview
Don't miss anything!


temp = v[k]; v[k] = v[k+1]; v[k+1] = temp;
lw $15, 0($2) lw $16, 4($2) sw $16, 0($2) sw $15, 4($2)
0000 1001 1100 0110 1010 1111 0101 1000 1010 1111 0101 1000 0000 1001 1100 0110 1100 0110 1010 1111 0101 1000 0000 1001 0101 1000 0000 1001 1100 0110 1010 1111
ALUOP[0:3] <= InstReg[9:11] & MASK
High Level Language Program
Assembly Language Program
Machine Language Program
Control Signal Specification
Compiler
Assembler
Machine Interpretation
° °
Machine language programming is very useful for small programs. but requires the programmer/digital designer to have an in-depth
Example : 1001 0000 0101 0011 Load Register1 into ACC 0101 1100 1010 0010 Decrement value in Register
Therefore, the programmer/digital designer is forced to memorise each machine instruction. -- or continuously refer to the manual !!
ADD add ANDI AND immediate MUL multiply JMP jump/goto CMP compare
Each instruction takes 0, 1, 2 or 3 operands (rarely more than 3).
Usually we can consider an operand to be one of the following:
For each line of assembly language a LABEL is optional.
Hence the following would be converted as, ANDI TEN : ANDI # CMP #THRESHOLD : CMP #$
2. Program Code Location and DATA Memory Location
$
$
MEMORY
$
$
Program Memory
Data Memory
Data Memory
MEMORY