Instruction Set and Assembly Language Programming
Instruction Set and Assembly Language Programming
TOPIC 3:
LANGUAGE PROGRAMMING
OUTLINE:
Understand instruction set and assembly language
Assembly language
3.1 Understand instruction set and assembly language
Instruction Set
A collection of machine instruction for a given machine
• The term addressing modes refers to the way in which the operand of an
instruction is specified.
• Information contained in the instruction code is the value of the operand
or the address of the result/operand.
• Types of addressing mode
1 Immediate
-The address field of the instruction where the effective address is stored in memory.
-An address is specified in a register (pointer) and the MPU looks up the address
in that register
-Example: (A1), D1
o Register
o Register Indirect
o Displacement (Indexed)
o Stack
3.2 Assembly language
.B Byte MOVE.B
.W Word MULU.W
.L Longword ADD.L
2 Opcode data format
4 bit = H = nibble
8 bit = HH = byte
o Examples of instruction
Examples of instruction
o Examples of instruction
o Examples of instruction
o Examples of instruction
o Examples of instruction
o Examples of instruction