S2, 2008 COMP9032 Week3 1
Microprocessors & Interfacing
AVR Programming (II)
Lecturer : Dr. Annie Guo
S2, 2008 COMP9032 Week3 2
Lecture Overview
- Assembly program structure
– Assembler directives – Assembler expressions – Macros
- Memory access
- Assembly process
– First pass – Second pass
S2, 2008 COMP9032 Week3 3
Assembly Program Structure
- An assembly program basically consists of
– Assembler directives
- E.g. .def temp = r15
– Executable instructions
- E.g. add r1, r2
- An input line in an assembly program takes
- ne of the following forms :
– [label:] directive [operands] [Comment] – [label:] instruction [operands] [Comment] – Comment – Empty line
S2, 2008 COMP9032 Week3 4
Assembly Program Structure (cont.)
- The label for an instruction is associated with
the memory location address of that instruction.
- All instructions are not case sensitive