6 - Chapter 6 Addressing Modes 1 Learning Outcomes Be able...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Chapter 6 Addressing Modes
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Learning Outcomes Be able to explain the operation of each data-addressing mode and use them to form assembly language statements. Be able to explain the operation of each program memory-addressing mode and use them to form assembly and machine language statements. Be able to describe the sequence of events that place data onto stack or remove data from the stack.
Background image of page 2
3 Assembly Codes LABEL: stores a symbolic name for the memory location. OPCODE: holds the instruction or operation code (opcode). OPERAND: contains information used by the opcode. COMMENT: contains comments/info about an instruction or a group of instructions.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Assembled Codes When the program is assembled, a few numbers are generated by the assembler: offset address, machine-coded instructions, machine-coded data. Offset Address Machine-coded instruction Machine-coded data
Background image of page 4
5 Addressing Modes In order to write a program, addressing modes (data, program, stack) must be thoroughly understood. There are many addressing modes, but the most common are easy to master and represent most instructions in most programs. Register addressing, immediate addressing, direct addressing, and simple forms of indirect addressing are the most common data addressing modes.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 Program memory-addressing mode used with JMP (jump) and CALL instructions, consists of 3 forms: direct, relative and indirect. It allows programmer to skip sections of a program and branch to any part of the memory for the next instruction. Stack memory-addressing mode is used with the PUSH and POP instructions to place or remove data to and from register/memory location to stack memory. Addressing Modes
Background image of page 6
7 Data Addressing Modes Data addressing modes are presented with the MOV instruction because it is so far the most common instruction in a program. MOV copies the source data into the destination. MOV never picks up the data and moves it. MOV changes the destination data but not the source data.
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
8
Background image of page 8
9
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10 Register Addressing Transfers a copy of a byte/word from the source register to the destination register. Destination and source register must have same sizes. Examples:
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/23/2011 for the course BME KUEU taught by Professor Ting during the Fall '10 term at Universiti Teknologi Malaysia.

Page1 / 34

6 - Chapter 6 Addressing Modes 1 Learning Outcomes Be able...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online