detailed review of the 8085 instruction set

22
Detailed Review of the 8085 Instruction Set

Upload: rachel

Post on 05-Jan-2016

79 views

Category:

Documents


7 download

DESCRIPTION

Detailed Review of the 8085 Instruction Set. 8085 Instruction Set. The 8085 instructions can be classified as follows: Data transfer operations Arithmetic operations (ADD, SUB, INR, DCR) Logic operations Branching operations (JMP, CALL, RET). Between registers - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Detailed Review of the  8085 Instruction Set

Detailed Review of the 8085 Instruction Set

Page 2: Detailed Review of the  8085 Instruction Set

8085 Instruction Set

The 8085 instructions can be classified as follows:

Data transfer operations

Arithmetic operations (ADD, SUB, INR, DCR)

Logic operations

Branching operations (JMP, CALL, RET)

• Between registers• Between memory location and a register• Direct write to a register / memory• Between I/O device and accumulator

Page 3: Detailed Review of the  8085 Instruction Set

8085 Instruction Types

Page 4: Detailed Review of the  8085 Instruction Set

8085 Instruction Types

Page 5: Detailed Review of the  8085 Instruction Set

8085 Instruction Types

Page 6: Detailed Review of the  8085 Instruction Set

Simple Data Transfer Operations

Examples:

MOV B,A 47 From ACC to REG MOV C,D 4A Between two REGs MVI D,47 16 Direct-write into REG D

47

Page 7: Detailed Review of the  8085 Instruction Set

Simple Data Transfer Operations

Example:

OUT 05 D305

Contents of ACC sent to output port number 05.

Page 8: Detailed Review of the  8085 Instruction Set

Simple Memory Access Operations

Page 9: Detailed Review of the  8085 Instruction Set

Simple Memory Access Operations

Page 10: Detailed Review of the  8085 Instruction Set

Arithmetic Operations

Page 11: Detailed Review of the  8085 Instruction Set

Arithmetic Operations

Page 12: Detailed Review of the  8085 Instruction Set

Arithmetic Operations

Page 13: Detailed Review of the  8085 Instruction Set

Arithmetic Operations

Page 14: Detailed Review of the  8085 Instruction Set

Overview of Logic Operations

Page 15: Detailed Review of the  8085 Instruction Set

Logic Operations

Page 16: Detailed Review of the  8085 Instruction Set

Logic Operations

Page 17: Detailed Review of the  8085 Instruction Set

Logic Operations

Page 18: Detailed Review of the  8085 Instruction Set

Branching Operations

Note: This is an unconditional jump operation. It will always force the program counter to a fixed memory address continuous loop !

Page 19: Detailed Review of the  8085 Instruction Set

Branching Operations

Conditional jump operations are very useful for decision making during the execution of the program.

Page 20: Detailed Review of the  8085 Instruction Set

Example

Write a 8085 machine code program:

Read two different memory locations

Add the contents

Send the result to output port 02 (display) if there is no overflow

Display “FF” if there is an overflow

Stop

Page 21: Detailed Review of the  8085 Instruction Set

Example

2000 LDA 2050 3A2001 502002 202003 MOV B,A 472004 LDA 2051 3A2005 512006 202007 ADD B 802008 JNC XXYY D22009 YY2010 XX2011 MVI A,FF 3E2012 FF2013 OUT 02 D32014 022015 HLT 76

Load contents of memory location 2050 into accumulator

Load contents of memory location 2051 into accumulator

Save the first number in B

Add accumulator with B

Jump to YYXX if no carry !

Direct write FF into accumulator

Display accumulator contents at output port 02

Stop

Page 22: Detailed Review of the  8085 Instruction Set

Updated Code

2000 LDA 2050 3A2001 502002 202003 MOV B,A 472004 LDA 2051 3A2005 512006 202007 ADD B 802008 JNC 2013 D22009 132010 202011 MVI A,FF 3E2012 FF2013 OUT 02 D32014 022015 HLT 76

Load contents of memory location 2050 into accumulator

Load contents of memory location 2051 into accumulator

Save the first number in B

Add accumulator with B

Jump to 2013 if no carry !

Direct write FF into accumulator

Display accumulator contents at output port 02

Stop