You are on page 1of 0

Session 3

8086 Program
and
Stack Memory Addressing Modes




8086 Program and Stack Memory Addressing Modes Page 29
Session Objectives

At the end of this session, the learner will be able to:

Recall the concepts of J MP and CALL instructions in 8085 processor
Differentiate between program memory and data memory in a processor
List program memory addressing modes of 8086 processor
Illustrate program memory addressing modes
Understand the concepts of stack memory addressing


Teaching Learning Material

Board
Presentations



Page 30 8086 Program and Stack Memory Addressing Modes
Session Plan

Time
(in min)
Content
Learning Aid /
Methodology
Faculty
Approach
Typical Student
Activity
Skill/Competency
Developed
10
Recap: 8086 Program
and Stack Memory
Addressing Modes
Show and Tell Facilitates Participates
Knowledge
Comprehension
Intrapersonal
30
Program Memory
Addressing
Presentation
Impersonation
Explains
Facilitates
Listens
Participates
Knowledge
Application
Interpersonal
Linguistic
15
Stack Memory
Addressing
Board Activity
Facilitates
Explains
Listens
Participates
Knowledge
Comprehension
Application
Analysis
Intrapersonal
Linguistic
05
Conclusion and
Summary
Group Quiz Facilitates
Participates
Answers
Knowledge
Analyze
Interpersonal
Intrapersonal
Linguistic







8086 Program and Stack Memory Addressing Modes Page 31
Session Inputs

Recap: 8086 Program and Stack Memory Addressing Modes


Let us recapitulate the branching instructions of 8085 to introduce
program memory addressing modes.

By introducing a simple assembly language code through Show and Tell
activity, we can revisit the concepts of J MP and CALL instructions.

Suggested Activity: Show and Tell
The sample code for show and tell activity is:
MVI A, 8FH
ADI 72H
J C DISPLAY
OUT PORT1
HLT
DISPLAY: XRA A
OUT PORT1
HLT
In the given assembly language code, let the learners identify the role of J C
instruction and direct the output at port1 after execution of the above
mentioned code.



Summarize the other branching instructions like J NZ, J C and J Z.

After the discussion on the above mentioned branching instructions, we shall
now focus on program execution control and on program memory
addressing modes. These addressing modes are useful in controlling program
memory.





Page 32 8086 Program and Stack Memory Addressing Modes
Based on the functionalities, as already seen in the previous session, there are
3 types of addressing modes:
Data Memory Addressing Modes
Program Memory Addressing Modes
Stack Memory Addressing Modes

In the previous session, we had focused on data memory addressing mode,
in this session we shall concentrate on the program memory and stack
memory addressing modes.

Program Memory Addressing Modes

Before discussing the program memory addressing, let us first revisit the
concepts of program memory and data memory in a processor.

Use the suggested block diagram to emphasize the concept of program and
data memory in a Microprocessor diagram.





Since, 8086 supports much larger memory compared to 8085 processor,
hence there is a separate class of addressing modes to address the program
memory in 8086 processor.

Give the classification of program memory addressing and explain the
program memory addressing with simple diagrams.




8086 Program and Stack Memory Addressing Modes Page 33

Based on the addressing mechanism, the program memory
addressing modes are classified as:
Direct program memory addressing
Relative program memory addressing
Indirect program memory addressing

Direct Program Memory Addressing

In direct program memory addressing, the address is stored with the opcode.
For example, consider the instruction:

JUMP [1000H]

In this example, if the program control jumps to memory location 10000H for
the next instruction, the contents of address (10000H) helps in fetching the
next instruction.



The above diagram shows the J MP instruction and the four bytes required to
store the address 10000H. This J MP instruction loads Code Segment (CS) with
1000H and Instruction Pointer (IP) with 0000H to jump to memory location
10000H for the next instruction.



Use similar approach to explain the other two program memory
addressing modes. We could explain the same with an activity.

Suggested Activity: Impersonation

Form three teams to demonstrate the program memory addressing modes.
Provide notes on program memory addressing modes to the teams for
discussion. Suggest the team to incorporate simple analogy during
impersonation.




Page 34 8086 Program and Stack Memory Addressing Modes


Having seen the program memory addressing modes, let us now
discuss stack addressing modes.


Stack Addressing Modes

Let us recall the stack related operations that we have studied in the earlier
sessions by randomly asking the learners to elaborate on the following key
words:
PUSH
POP
TOP OF STACK
Stack pointer
FIFO
LIFO

Please note that when we are using the above stack related operations like
push and pop, we will be using the stack memory. Addressing this stack
memory is known as stack addressing modes.

The stack addressing is similar in 8085 and 8086. However, 8085 processor
supports a stack size of 8 bits whereas 8086 processor has a stack size of 32
bits.

The PUSH and POP operations related to stack memory in 8086 is depicted in
the diagram where (a) represents PUSH operation and (b) represents POP
operation.





8086 Program and Stack Memory Addressing Modes Page 35

We could explain the PUSH and POP operations in 8086 in
comparison with 8085.


Conclusion


To conclude this session on program and stack memory addressing
modes, we can facilitate a group quiz activity.

Suggested Activity: Group Quiz

The first group will frame questions on program memory addressing modes.
The second group will frame questions on stack memory addressing modes.
Each group will get 5 minutes and would be expected to frame 3 questions.
Each group will ask the questions to the other group and we could score the
results.


Sample Questions:

1. Suppose that DS=1000H SS=2000H, BP=1000H and DI=0100H. Determine
the memory address accessed by each of the following instructions,
assuming real mode operation:
MOV AL, [BP+DI]
MOV CX,[DI]
MOV EDX,[BP]

2. Which base register addresses data in the stack segment?

3. Form a JMP instruction that jumps to the address pointed by the BX
register.




Page 36 8086 Program and Stack Memory Addressing Modes
Summary

In this session, we learnt to:

Identify the program memory addressing modes like:
Direct program memory addressing
Relative program memory addressing
Indirect program memory addressing
Describe the PUSH and POP operations related to stack memory.
Compare the stack operations of 8085 and 8086.





























8086 Program and Stack Memory Addressing Modes Page 37
Assignments

1. Refer the data sheets of Renisas processors and identify the size of
stack memory in different processors.

2. Refer the data sheet of Intel PXA 270 processor and identify the size of
cache memory and comment on program memory and data
memory.



































Page 38 8086 Program and Stack Memory Addressing Modes

Notes

You might also like