8085 Instruction Set (1)

Post on 07-Aug-2018

218 views 0 download

Transcript of 8085 Instruction Set (1)

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 1/82

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 2/82

Instruction Set of

8085An instruction is a binary pattern designed inside a

microprocessor to perform a specic function.

 The entire group of instructions that amicroprocessor supports is called Instruction Set .

8085 has 246 instructions.

Each instruction is represented by an 8-bit binaryvalue.

 These 8-bits of binary value is called Op-Code orInstruction Byte.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 3/82

Classication of

Instruction Set

Data Transfer nstruction

Arithmetic nstructions

!ogical nstructions

"ranching nstructions

#ontrol nstructions

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 4/82

Data Transfer

Instructions These instructions move data bet$een

registers% or bet$een memory and registers.

 These instructions copy data from source todestination.

&hile copying% the contents of source are not

modied.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 5/82

Data Transfer

InstructionsOpcode Operand Description

'() *d% *s'% *s*d% '

#opy from source to destination.

 This instruction copies the contents of the sourceregister into the destination register.

 The contents of the source register are not

altered.

f one of the operands is a memory location% itslocation is specied by the contents of the +!registers.

Example '() "% # or '() "% '

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 6/82

Data Transfer

InstructionsOpcode Operand Description

') *d% Data'% Data

'ove immediate 8-bit

 The 8-bit data is stored in the destinationregister or memory.

f the operand is a memory location% itslocation is specied by the contents of the +-!registers.

Example ') "% 5,+ or ') '% 5,+

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 7/82

Data Transfer

InstructionsOpcode Operand Description

!DA -bit address !oad Accumulator

 The contents of a memory location% speciedby a -bit address in the operand% are copiedto the accumulator.

 The contents of the source are not altered.

Example !DA /01+

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 8/82

Data Transfer

InstructionsOpcode Operand Description

!DA2 "3D *egister4air

!oad accumulator indirect

 The contents of the designated register pair point to amemory location.

 This instruction copies the contents of that memorylocation into the accumulator.

 The contents of either the register pair or the memorylocation are not altered.

Example !DA2 "

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 9/82

Data Transfer

InstructionsOpcode Operand Description

!2 *eg. pair% -bit data

!oad register pair immediate

 This instruction loads -bit data in theregister pair.

Example !2 +% /01 +

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 10/82

Data Transfer

InstructionsOpcode Operand Description

!+!D -bit address !oad +-! registers direct

 This instruction copies the contents ofmemory location pointed out by -bitaddress into register !.

t copies the contents of net memorylocation into register +.

Example !+!D /010 +

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 11/82

Data Transfer

InstructionsOpcode Operand Description

6TA -bit address 6tore accumulator direct

 The contents of accumulator are copied intothe memory location specied by theoperand.

Example 6TA /500 +

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 12/82

Data Transfer

InstructionsOpcode Operand Description

6TA2 *eg. pair 6tore accumulator indirect

 The contents of accumulator are copied intothe memory location specied by the contentsof the register pair.

Example 6TA2 "

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 13/82

Data Transfer

InstructionsOpcode Operand Description

6+!D -bit address 6tore +-! registers direct

 The contents of register ! are stored intomemory location specied by the -bitaddress.

 The contents of register + are stored into thenet memory location.

Example 6+!D /550 +

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 14/82

Data Transfer

InstructionsOpcode Operand Description

2#+7 one Echange +-! $ith D-E

 The contents of register + are echanged $iththe contents of register D.

 The contents of register ! are echanged $ith

the contents of register E.

Example 2#+7

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 15/82

Data Transfer

InstructionsOpcode Operand Description

64+! one #opy +-! pair to the 6tac9 4ointer :64;

 This instruction loads the contents of +-! pairinto 64.

Example 64+!

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 16/82

Data Transfer

InstructionsOpcode Operand Description

2T+! one Echange +<! $ith top of stac9

 The contents of ! register are echanged $iththe location pointed out by the contents of the64.

 The contents of + register are echanged $iththe net location :64 = ;.

Example 2T+!

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 17/82

Data Transfer

InstructionsOpcode Operand Description

4#+! one !oad program counter $ith +-!contents

 The contents of registers + and ! are copiedinto the program counter :4#;.

 The contents of + are placed as the high-

order byte and the contents of ! as the lo$-order byte.

Example 4#+!

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 18/82

Data Transfer

InstructionsOpcode Operand Description

4>6+ *eg. pair 4ush register pair onto stac9

 The contents of register pair are copied ontostac9.

64 is decremented and the contents of high-order

registers :"% D% +% A; are copied into stac9.

64 is again decremented and the contents of lo$-order registers :#% E% !% ?lags; are copied intostac9.

Example 4>6+ "

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 19/82

Data Transfer

InstructionsOpcode Operand Description

4(4 *eg. pair 4op stac9 to register pair

 The contents of top of stac9 are copied intoregister pair.

 The contents of location pointed out by 64 are

copied to the lo$-order register :#% E% !% ?lags;.

64 is incremented and the contents of location arecopied to the high-order register :"% D% +% A;.

Example 4(4 +

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 20/82

Data Transfer

InstructionsOpcode Operand Description

(>T 8-bit portaddress

#opy data from accumulator to a port$ith 8-bit address

 The contents of accumulator are copied intothe 3( port.

Example (>T ,8 +

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 21/82

Data Transfer

InstructionsOpcode Operand Description

8-bit portaddress

#opy data to accumulator from a port$ith 8-bit address

 The contents of 3( port are copied intoaccumulator.

Example  8# +

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 22/82

!rit"metic

Instructions These instructions perform the operations

li9e@

Addition

6ubtract

ncrement

Decrement

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 23/82

!dditionAny 8-bit number% or the contents of register%

or the contents of memory location can beadded to the contents of accumulator.

 The result :sum; is stored in the accumulator.

o t$o other 8-bit registers can be added

directly.

Example The contents of register " cannotbe added directly to the contents of register #.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 24/82

Su#tractionAny 8-bit number% or the contents of register% or

the contents of memory location can besubtracted from the contents of accumulator.

 The result is stored in the accumulator.

6ubtraction is performed in /s complement form.

f the result is negative% it is stored in /scomplement form.

o t$o other 8-bit registers can be subtracteddirectly.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 25/82

Increment $

Decrement The 8-bit contents of a register or a memory

location can be incremented or decrementedby .

 The -bit contents of a register pair can beincremented or decremented by .

ncrement or decrement can be performed onany register or a memory location.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 26/82

!rit"metic

InstructionsOpcode Operand Description

ADD *'

Add register or memory to accumulator

 The contents of register or memory are added to thecontents of accumulator.

 The result is stored in accumulator.

f the operand is memory location% its address is specied by+-! pair.

All Bags are modied to reBect the result of the addition.

Example ADD " or ADD '

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 27/82

!rit"metic

InstructionsOpcode Operand Description

AD# *'

Add register or memory to accumulator$ith carry

 The contents of register or memory and #arry ?lag :#C; areadded to the contents of accumulator.

 The result is stored in accumulator.

f the operand is memory location% its address is specied by+-! pair.

All Bags are modied to reBect the result of the addition.

Example AD# " or AD# '

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 28/82

!rit"metic

InstructionsOpcode Operand Description

AD 8-bit data Add immediate to accumulator

 The 8-bit data is added to the contents ofaccumulator.

 The result is stored in accumulator.

All Bags are modied to reBect the result ofthe addition.

Example AD 15 +

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 29/82

!rit"metic

InstructionsOpcode Operand Description

A# 8-bit data Add immediate to accumulator $ithcarry

 The 8-bit data and the #arry ?lag :#C; are addedto the contents of accumulator.

 The result is stored in accumulator.

All Bags are modied to reBect the result of theaddition.

Example A# 15 +

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 30/82

!rit"metic

InstructionsOpcode Operand Description

DAD *eg. pair Add register pair to +-! pair

 The -bit contents of the register pair are addedto the contents of +-! pair.

 The result is stored in +-! pair.

f the result is larger than bits% then #C is set.

o other Bags are changed.

Example DAD "

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 31/82

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 32/82

!rit"metic

InstructionsOpcode Operand Description

6"" *'

6ubtract register or memory fromaccumulator $ith borro$

 The contents of the register or memory location and "orro$?lag :i.e. #C; are subtracted from the contents of theaccumulator.

 The result is stored in accumulator.

f the operand is memory location% its address is specied by+-! pair.

All Bags are modied to reBect the result of subtraction.

Example 6"" " or 6"" '

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 33/82

!rit"metic

InstructionsOpcode Operand Description

6> 8-bit data 6ubtract immediate from accumulator

 The 8-bit data is subtracted from the contents ofthe accumulator.

 The result is stored in accumulator.

All Bags are modied to reBect the result ofsubtraction.

Example 6> 15 +

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 34/82

!rit"metic

InstructionsOpcode Operand Description

6" 8-bit data 6ubtract immediate from accumulator$ith borro$

 The 8-bit data and the "orro$ ?lag :i.e. #C; issubtracted from the contents of the accumulator.

 The result is stored in accumulator.

All Bags are modied to reBect the result ofsubtraction.

Example 6" 15 +

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 35/82

!rit"metic

InstructionsOpcode Operand Description

* *'

ncrement register or memory by

 The contents of register or memory location areincremented by .

 The result is stored in the same place.

f the operand is a memory location% its address isspecied by the contents of +-! pair.

Example * " or * '

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 36/82

!rit"metic

InstructionsOpcode Operand Description

2 * ncrement register pair by

 The contents of register pair are incrementedby .

 The result is stored in the same place.

Example 2 +

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 37/82

!rit"metic

InstructionsOpcode Operand Description

D#* *'

Decrement register or memory by

 The contents of register or memory location aredecremented by .

 The result is stored in the same place.

f the operand is a memory location% its address isspecied by the contents of +-! pair.

Example D#* " or D#* '

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 38/82

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 39/82

%o&ical Instructions These instructions perform logical operations ondata stored in registers% memory and status Bags.

 The logical operations are@

AD

(*

2(*

*otate

#ompare

#omplement

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 40/82

!'D( O)( *O)Any 8-bit data% or the contents of register% or

memory location can logically have

AD operation

(* operation

2(* operation

  $ith the contents of accumulator.

 The result is stored in accumulator.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 41/82

)otateEach bit in the accumulator can be shifted

either left or right to the net position.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 42/82

CompareAny 8-bit data% or the contents of register% or

memory location can be compares for@

Euality

7reater Than

!ess Than

  $ith the contents of accumulator.

 The result is reBected in status Bags.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 43/82

Complement The contents of accumulator can be

complemented.

Each 0 is replaced by and each is replacedby 0.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 44/82

%o&ical InstructionsOpcode Operand Description

#'4 *'

#ompare register or memory $ithaccumulator

 The contents of the operand :register ormemory; are compared $ith the contents ofthe accumulator.

"oth contents are preserved .

 The result of the comparison is sho$n bysetting the Bags of the 46& as follo$s@

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 45/82

%o&ical InstructionsOpcode Operand Description

#'4 *'

#ompare register or memory $ithaccumulator

if :A; :reg3mem;@ carry Bag is set

if :A; F :reg3mem;@ Gero Bag is set

if :A; H :reg3mem;@ carry and Gero Bags arereset.

Example #'4 " or #'4 '

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 46/82

%o&ical InstructionsOpcode Operand Description

#4 8-bit data #ompare immediate $ith accumulator

 The 8-bit data is compared $ith the contentsof accumulator.

 The values being compared remain

unchanged.

 The result of the comparison is sho$n bysetting the Bags of the 46& as follo$s@

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 47/82

%o&ical InstructionsOpcode Operand Description

#4 8-bit data #ompare immediate $ith accumulator

if :A; data@ carry Bag is set

if :A; F data@ Gero Bag is set

if :A; H data@ carry and Gero Bags are reset

Example #4 8I+

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 48/82

%o&ical InstructionsOpcode Operand Description

AA *'

!ogical AD register or memory $ithaccumulator

 The contents of the accumulator are logically ADed $iththe contents of register or memory.

 The result is placed in the accumulator.

f the operand is a memory location% its address is specied

by the contents of +-! pair.6% J% 4 are modied to reBect the result of the operation.

#C is reset and A# is set.

Example AA " or AA '.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 49/82

%o&ical InstructionsOpcode Operand Description

A 8-bit data !ogical AD immediate $ithaccumulator

 The contents of the accumulator are logicallyADed $ith the 8-bit data.

 The result is placed in the accumulator.

6% J% 4 are modied to reBect the result.

#C is reset% A# is set.

Example A 8+.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 50/82

%o&ical InstructionsOpcode Operand Description

2*A *'

Eclusive (* register or memory $ithaccumulator

 The contents of the accumulator are 2(*ed $ith the contents of the registeror memory.

 The result is placed in the accumulator.

f the operand is a memory location% its address is specied by the contents

of +-! pair.

6% J% 4 are modied to reBect the result of the operation.

#C and A# are reset.

 Example  2*A " or 2*A '.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 51/82

%o&ical InstructionsOpcode Operand Description

(*A *'

!ogical (* register or memory $ithaccumulator

 The contents of the accumulator are logically (*ed $ith the contents of theregister or memory.

 The result is placed in the accumulator.

f the operand is a memory location% its address is specied by the contents

of +-! pair.

6% J% 4 are modied to reBect the result.

#C and A# are reset.

 Example  (*A " or (*A '.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 52/82

%o&ical InstructionsOpcode Operand Description

(* 8-bit data !ogical (* immediate $ith accumulator

 The contents of the accumulator are logically(*ed $ith the 8-bit data.

 The result is placed in the accumulator.

6% J% 4 are modied to reBect the result.

#C and A# are reset.

Example  (* 8+.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 53/82

%o&ical InstructionsOpcode Operand Description

2*A *'

!ogical 2(* register or memory $ithaccumulator

 The contents of the accumulator are 2(*ed $ith thecontents of the register or memory.

 The result is placed in the accumulator.

f the operand is a memory location% its address is

specied by the contents of +-! pair.6% J% 4 are modied to reBect the result of the

operation.

#C and A# are reset.

Example 2*A " or 2*A '.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 54/82

%o&ical InstructionsOpcode Operand Description

2* 8-bit data 2(* immediate $ith accumulator

 The contents of the accumulator are 2(*ed$ith the 8-bit data.

 The result is placed in the accumulator.

6% J% 4 are modied to reBect the result.

#C and A# are reset.

Example 2* 8+.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 55/82

%o&ical InstructionsOpcode Operand Description

*!# one *otate accumulator left

Each binary bit of the accumulator is rotated leftby one position.

"it D, is placed in the position of D0 as $ell as inthe #arry Bag.

#C is modied according to bit D,.

6% J% 4% A# are not aKected.

Example *!#.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 56/82

%o&ical InstructionsOpcode Operand Description

**# one *otate accumulator right

Each binary bit of the accumulator is rotated rightby one position.

"it D0 is placed in the position of D, as $ell as inthe #arry Bag.

#C is modied according to bit D0.

6% J% 4% A# are not aKected.

Example **#.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 57/82

%o&ical InstructionsOpcode Operand Description

*A! one *otate accumulator left through carry

Each binary bit of the accumulator is rotated leftby one position through the #arry Bag.

"it D, is placed in the #arry Bag% and the #arryBag is placed in the least signicant position D0.

#C is modied according to bit D,.

6% J% 4% A# are not aKected.

Example *A!.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 58/82

%o&ical InstructionsOpcode Operand Description

*A* one *otate accumulator right through carry

Each binary bit of the accumulator is rotated rightby one position through the #arry Bag.

"it D0 is placed in the #arry Bag% and the #arryBag is placed in the most signicant position D,.

#C is modied according to bit D0.

6% J% 4% A# are not aKected.

Example *A*.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 59/82

%o&ical InstructionsOpcode Operand Description

#'A one #omplement accumulator

 The contents of the accumulator arecomplemented.

o Bags are aKected.

Example #'A.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 60/82

%o&ical InstructionsOpcode Operand Description

#'# one #omplement carry

 The #arry Bag is complemented.

o other Bags are aKected.

Example #'#.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 61/82

%o&ical InstructionsOpcode Operand Description

6T# one 6et carry

 The #arry Bag is set to .

o other Bags are aKected.

Example 6T#.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 62/82

+ranc"in& Instructions The branching instruction alter the normalseuential Bo$.

 These instructions alter either unconditionallyor conditionally.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 63/82

+ranc"in& InstructionsOpcode Operand Description

 L'4 -bit address Lump unconditionally

 The program seuence is transferred to thememory location specied by the -bitaddress given in the operand.

Example L'4 /01 +.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 64/82

+ranc"in& InstructionsOpcode Operand Description

 L -bit address Lump conditionally

 The program seuence is transferred to thememory location specied by the -bitaddress given in the operand based on thespecied Bag of the 46&.

Example LJ /01 +.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 65/82

 ,ump Conditionall-Opcode Description Status .la&s

 L# Lump if #arry #C F

 L# Lump if o #arry #C F 0

 L4 Lump if 4ositive 6 F 0

 L' Lump if 'inus 6 F

 LJ Lump if Jero J F

 LJ Lump if o Jero J F 0 L4E Lump if 4arity Even 4 F

 L4( Lump if 4arity (dd 4 F 0

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 66/82

+ranc"in& InstructionsOpcode Operand Description

#A!! -bit address #all unconditionally

 The program seuence is transferred to thememory location specied by the -bit addressgiven in the operand.

"efore the transfer% the address of the net

instruction after #A!! :the contents of theprogram counter; is pushed onto the stac9.

Example #A!! /01 +.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 67/82

+ranc"in& InstructionsOpcode Operand Description

# -bit address #all conditionally

 The program seuence is transferred to thememory location specied by the -bitaddress given in the operand based on thespecied Bag of the 46&.

"efore the transfer% the address of the netinstruction after the call :the contents of theprogram counter; is pushed onto the stac9.

Example #J /01 +.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 68/82

Call Conditionall-Opcode Description Status .la&s

## #all if #arry #C F

## #all if o #arry #C F 0

#4 #all if 4ositive 6 F 0

#' #all if 'inus 6 F

#J #all if Jero J F

#J #all if o Jero J F 0

#4E #all if 4arity Even 4 F

#4( #all if 4arity (dd 4 F 0

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 69/82

+ranc"in& InstructionsOpcode Operand Description

*ET one *eturn unconditionally

 The program seuence is transferred from thesubroutine to the calling program.

 The t$o bytes from the top of the stac9 are

copied into the program counter% and programeecution begins at the ne$ address.

Example *ET.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 70/82

+ranc"in& InstructionsOpcode Operand Description

* one #all conditionally

 The program seuence is transferred from thesubroutine to the calling program based onthe specied Bag of the 46&.

 The t$o bytes from the top of the stac9 arecopied into the program counter% and programeecution begins at the ne$ address.

Example *J.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 71/82

)eturn Conditionall-Opcode Description Status .la&s

*# *eturn if #arry #C F

*# *eturn if o #arry #C F 0

*4 *eturn if 4ositive 6 F 0

*' *eturn if 'inus 6 F

*J *eturn if Jero J F

*J *eturn if o Jero J F 0

*4E *eturn if 4arity Even 4 F

*4( *eturn if 4arity (dd 4 F 0

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 72/82

+ranc"in& InstructionsOpcode Operand Description

*6T 0 < , *estart :6oft$are nterrupts;

 The *6T instruction Mumps the control to oneof eight memory locations depending uponthe number.

 These are used as soft$are instructions in aprogram to transfer program eecution to oneof the eight locations.

Example *6T .

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 73/82

)estart !ddress Ta#leInstructions )estart !ddress

*6T 0 0000 +

*6T 0008 +

*6T / 000 +

*6T 008 +

*6T 1 00/0 +

*6T 5 00/8 +

*6T 000 +

*6T , 008 +

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 74/82

Control Instructions The control instructions control the operationof microprocessor.

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 75/82

Control InstructionsOpcode Operand Description

(4 one o operation

o operation is performed.

 The instruction is fetched and decoded but nooperation is eecuted.

Example (4

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 76/82

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 77/82

Control InstructionsOpcode Operand Description

D one Disable interrupt

 The interrupt enable Bip-Bop is reset and allthe interrupts ecept the T*A4 are disabled.

o Bags are aKected.

Example D

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 78/82

Control InstructionsOpcode Operand Description

E one Enable interrupt

 The interrupt enable Bip-Bop is set and allinterrupts are enabled.

o Bags are aKected.

 This instruction is necessary to re-enable theinterrupts :ecept T*A4;.

Example E

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 79/82

Control InstructionsOpcode Operand Description

*' one *ead nterrupt 'as9

 This is a multipurpose instruction used to readthe status of interrupts ,.5% .5% 5.5 and readserial data input bit.

 The instruction loads eight bits in theaccumulator $ith the follo$inginterpretations.

Example *'

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 80/82

)I/ Instruction

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 81/82

Control InstructionsOpcode Operand Description

6' one 6et nterrupt 'as9

 This is a multipurpose instruction and used toimplement the 8085 interrupts ,.5% .5% 5.5%and serial data output.

 The instruction interprets the accumulatorcontents as follo$s.

Example 6'

8/20/2019 8085 Instruction Set (1)

http://slidepdf.com/reader/full/8085-instruction-set-1 82/82

SI/ Instruction