0% found this document useful (0 votes)
9 views

Instruction Set

Know about instructions used in 8085 microprocessor. Arithmetic and logical instructions, branch control instructions,etc. Also know about different addressing modes

Uploaded by

dakshyadav8909
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Instruction Set

Know about instructions used in 8085 microprocessor. Arithmetic and logical instructions, branch control instructions,etc. Also know about different addressing modes

Uploaded by

dakshyadav8909
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

INSTRUCTION SET OF Classification of Instruc tion Set

8085 • Data Transfer Instruction

• Arithmetic Instructions

• Logical lnstnictions

• Branching Instructions

• Control Instructions

Instruc tion Set of 8085


Data Transfer Instructions
• An instruction is a binary pattern designed inside a
microproces sor to perform a specific function. • These instructions move data between registers, or
between memory and registers.
• The entire group of instructions that a microproces sor
supports is called Instruction Set. • These instructions copy data from source to
destination.
• 8085 has 246 instructions .
• While copying, the contt!nts of source are not
• Each instruction is represented hy an 8-bit binary value. modified.
• These 8-bits of binary value is call~d Op-Code or
Instruction B~_... ,_ __ me
~&owe. : WWW,.,.. $ $ GOfll

Data Transfer Instructions Data Transfer Instruct ions


0 1u,udl.' O p crJ n J l>~c.nrtaon <>re. 11th.• ( >1~•rJnJ l>c ...... n r 111m
MOV Rd. lb Copy from '10Ura- lo (irolino11ion . I.DA 16-bil .add"°" L~ A«wnuLuor
M,Ro
Rd, \f
• This instruction copies the contents of the source register • The contents of a memory location, specified by a 16-
into tht- destination register. bit address in the operand, are copied to the
• The contents of the source regishir are not altered. accumulator.

• If one of the operands isa memory location, its location is • The contents of the source are not altered.
specified by the contents of the HL ~gisters.
• Example: LDA 2034H
• Exmnple: MOV 8, C or MOV 8, M

Data Transfer Instructions Data Transfer Instructions


U ~"kot.h.." I ( l pt."ldUJ n,t•,t. 1ip1i1111 t>1-.c1ult" t Jp,._..r.1 nd I JC"",,n r cio n
MVI Rd, D.i1• Mo,.T itumc,clia1p 8-bit I.DAX 8/D R"l!i5tPr l.-l M"Clnn ul.,tor indir«t
M. 0.IA p,.iT

• The 8-bit data is stored in the destination register or • The c:ontents of the design.1ted register pair point to a mL·mory
location.
memory.
• This instruction l'opil'S the contents of that memory Joc.1tion
mto the acn1mul.1tor.
• If the operand is a memory location, its location is
specified by the contents of the H-L registers. • TI1e contents of either the n.-gister pair or the memory location
are not .:ilten:d.
• Example: MVI B, 57H or MVI M, 57H • Ex.ample: LOA)( B
Data Transfer Instructions Data Transfer Instructions
■·+++;;;;;;;;;:a I le ...... r1pllon
l h.. M t ipliun
()Cl ltr8, pair, 1(.-bir 1,0,Mf N"gliitttpalr imnwdi.l t•
dat,1
STA 16-bit add.- Sforu«:1,m1ul.i1ordiffct

• This instruction loads 16-bit data in the register pair. • The contents of accumulator are copied into the
memory location specified by the operand .
• Example: LXI H. 2034 H
• Example: STA 2500 H

Data Transfer Instructions


()p,,11 lt• I llpt•1.11 ul Ut•-.., 11ptu,11
Data Transfer Instructions
LHW 16-bit ..ddr6S Load H-L ~1:ers ~ t ( )1h u tk I ( )('4,"' f ollHI I le:..,, rip« ion
S1;>J( bg.pair St~ ~cc:omul.Jtor indirl'ct

• This instruction copies the contents of memory


location pointed out by 16-bit address into register L. • The contents of accumulator are copied into the
memory location specified by the contents of the
• It copies the contents of next memory location into register pair.
register H.
• Example: STAX B
• Example: LHLD 2040 H

~Jtnurr.a - - .~ t . a a . 1 1

Data Transfer Instructions Data Transfer Instructions


■1+++;;;1;e1111a
Opl. o d ~ ()pc r,111e.l IJ,....,npho n
l>e~< ri plion
SHID 16-bit Mid, _ Sloe. H-lregk(HSdir«t

13-14 / 81 ..•••• SPHL Non,. Copy H- L p.tir to rhfl St.-ck Pointtt (SP)

• The contents of register Lare stored into memory


• This instruction loads the contents of H-L pair into SP.
location specified by the 16-bit address.

• The contents of register H are stored into the next • Example: SPHL
memory location.

• Example: SHLD 2550 H

Data Transfer Instructions


Data Transfer Instructions
XCHG None, E:«ho11igt H-1, wlrh D·E

• The contents of register H are exchanged with the


•·••
XTHI. Nonr
<>rw1.1nll I ,,...._<. npl1o n
Eioch,mfl" H- L with t<,p o( ot•ck

contents of register D. • The contents of L register are exchanged with the


location pointed out by the contents of the SP.
• The contents of register Lare exchanged with the
contents of register E. • The contents of H register are exchanged with the next
location (SP+ 1).
• Example: XCHG
• Example: XTHL
Data Transfer Instructions Data Transfer Instructions
MIIHM Op.,rJnJ lk,u 1pliun
POP Reg. p,1ir Pop 1l•<'k lo f'l'8iRer p,1ir
l'Clil N<lll<' Load vrosr•mroun,..,. ..t,h 11-Lrontn,r.

• The contents of registers Hand Lare copied into the • The contents of top of stack a~ copied into register pair.
program counter (PC).
• The contents of location pointed out by SP are copied to
• The contents of H are placed as the high-order byte the low-order register (C, E, L, Flags).
and the contents of Las the low-order byte.
• SP is incremented and the contents of location are copied
• Example: PCHL to the high-order ~gister (B, D, H, A).

• Example: POP H

Data Transfer Instructions


( )puulc· ( )p1.•ro111t.l llt.·..,, 111,tmn
PUSH Push r#fllittt.,.ironto lldCk Data Transfer Instructions
Opu,J,· · Op,· r.inJ I 11,·,uipliu n
• The contents of register pair are copied onto stack. OUT 8-bit port Cop)· d.11.1 from .i«umulator to a port "it h 8-
.1ddrN, bit addreu
• SP is decremented and the contents of high-order registers
(B, D, H, A) are copied into stack.
• The contents of accumulator are copied into the 1/0
• SP is again decremented and the contents of low-order port.
registers (C, E, L, Flags) are copied into stack.

• Eumple: PUSH B • Example: OUT 78 H

Data Transfer Instructions Addition


Opu,J " I Ope1J11J llr,, 1ipt11•n • Any 8-bit number, or the contents of register, or the
IN 8-bitport Copy d.ll• lo •n·1111111L11or frotn .l port wll h 8· contents of memory location can be added to the
Mid'"• hit add'"'
contents of accumulator.
• The contents of 1/0 port are copied into accumulator.
• The result (sum) is stored in the accumulator.
• Example: IN SC H
• No two other 8-bit registers can be added directly.

• Example: The contents of register B cannot be added


directly to the contents of register C.

Arithmetic Instructions Subtraction


• Any 8-bit number, or the contents of register, or the
• These instructions perform the operations like: contents of memory location can be subtracted from
the contents of accumulator.
• Addition
• The result is stored in the accumulator.
• Subtract • Subtraction is performed in 2.'s complement form.

• Increment • If the result is negative, it is stored in 2.'s complement


form.
• Decrement • No two other 8-bit registers can be subtracted directly.
Increment / Decrement Arithmetic Instructions
• The 8-bit contents of a register or a memory location
can be incremented or decremented by 1. ADC R Add ~ t n or nM'lnory to •ro111111l.11or with
M carry
• The 16-bit contents of a register pair can be
incremented or decremented by 1. • The contents of regis ter or memory a nd Carry Fla g (CY) are add ed to
the co nte nts of accumulator.

• Increment or decrement can be performed on any • The result is stored in accumulator.


register or a memory location. • If the opera nd is memory loca tion, its add ress is specified by H-L pair.

• All nags are modifi ed to rc:nc:ct th e result of the add itio n.

Oowttloed ScNrce : ..._,,,.,., •--•oom • Example: ADC B or ADC M

Arithmetic Instructions
MIMI- Arithmetic Instructions
ADD R Add ttgilttor or mMuory to .io:umul.Jtor
M
AOI 8•hilddl• Add immrdi.ltc- to ol«'\111111l•ror
• The content s of registe r or memory arc add~>d to the cont en ts of
accumulato r.
• The 8-bit data is added to the contents of accumulator.
• The result is stored in accu mulato r.

• If the opera nd is memory location, its address is specified by H-L pair. • The result is stored in accumulator.

• All nags are modil1ed to ren ect the result of the add ition . • All flags are modified to reflect the result of the
addition.
• Example:ADD BorADD M
• Example: ADI 45 H

Arithmetic Instruction s Arithmetic Instructions


l )puul t· I ( >pt.· r~11u l I l>1.•,, r ipt ion Opto4.lt.• I Opt..•rJ1ul I 1>,.. , , npt111n
ACI 8-bitd.ltol Add inunec:ll.llr 10 •ccumuwtor with carry SUB R Subtract "1JiMt'I" or llltlllOI')' from .IK'Cllmul•tor
M

• The 8-bit data and the Carry Flag (CY) are added to the • The contents of the: rc:gistc:ror memory loca tion arc subtracted from
the conte nts of the accum ulator.
contents of accumulator.
• The result is stored in accumula tor.
• The result is stored in accumulator.
• If the operand is memory locatio n, its add ress is specified by H-L pair.

• All flags are modified to reflect the result of the addition. • All fla gs are modified to renect lhc result of subtract ion.

• Example: AC! 45 H • Example: SU B B or SU B M

Download SOl#'CI : WWW'. Ndef C¥ oc.__,

Arithmetic Instruction s Arithmetic Instruction s


MIMI- MIWMMildbh N
DAD Rt-g.palr Add '"'3ist'°' l>ilir to H•l pair S88 R Subtr.,ct "1Jillt'I" or mtmory from M'.cuuniutor
M with borrow

• The 16-bit contents of the register pair are added to the • The cont e nt s of the register or memory loca ti on a nd Borrow Flag (i.e.
contents of H-L pair. CY) a re subtracted from the contents of the accumulator.

• The result is stored in H-L pair. • The result is stored in .-iccumulator.

• If the result is larger than 16 bits, then CY is set. • If the o perand is memory loca tio n, its add ress is specified by H-L pa ir.

• All Oags a re modifled to ren ect the result of !>ubtract ion.


• No other flags are changed.
• Example: SBB B or SBB M
• Example: DAD B
Arithm etic Instructions Arithmetic Instructions
Mi¥1¥MfliiHiiiiN n,,_.,,.,1i11n
R l nCffllll't\l l'f'gi!ill'f or llll'tl-->' by I
SUI 8-bll dat.- Subtr.iott bDmt<iwte froma('('l1mulator M

• The contents of register or memory location are


• The 8-bit data is subtracted from the contents of the incremented by 1.
accumulator.
• The result is storec\ in the same place.
• The result is stored in accumulator.
• If the operand is a memory location, its address is specified
• All flags are modified to reflect the result of subtraction . by the contents of H-L pair.

• Example: SUI 45 H • Example: INR B or INR M


DolllMlild S - . : _,,,IIOIIJlloV lpot-

Arithm etic Instructions Arithm etic Instructions


llc 'l riplion
!;81 8-bitdat-A Subtr.-c:t lmm~lwtr from -Acrumul.ltor with
Hl/!MZIA
bol'1'<WI•
INX R lnettn1t"t1t ttgl~er p;1lr by ,

• The 8-bit data and the Borrow Flag (i.e. CY) is subtracted
• The contents of register pair are increment ed by 1.
from the contents of the accumulator.

• The result is stored in accumulator. • The result is stored in the same place.

• All flags are modified to reflect the result of subtraction. • Example: INX H

• Example: SBI 45 H

Arithm etic Instructions Logical Instructions


( ' p uu.lt-- ( l p c.·1.11nl 1>c,c n11t1011 • These instruction s perform logical operations on data
OCR R Dt-cn-t1~ 11 ttgilCrr or m•mory by 1 stored in registers, memory and status flags.
M

• The contents of register or memory location are • The logical operations are:
decremented by 1. • AND
• The result is stored in the same place. • OR
• XOR
• lf the operand is a memory location, its address is specified
by the contents of H-L pair. • Rotate
• Compare
• Enmple: OCR 8 or OCR M • Complcm cn~..,_. ,_..n+!
____

AND, OR, XOR


Arithm etic Instructions • Any 8-bit data , or the contents of register, or memory
I >c , , 11pt ion location can logically have
ocx R Ottttml'nl l't'gistf'f p;1ir by 1
• AND operation

• The contents of register pair are decrement ed by 1. • OR operation

• The result is stored in the same place. • XOR operation

• Example: DCX H with the contents of accumulator.

• The result is stored in accumulator.


Rotate
• Each bit in the accumulator can be shifted either left or
Logical Instructions
right to the next position. c,p c.tul e t,p,·r.1nd l>t•,t npt1 o n
CMP R CompdN' ~Sier or u>t'010f)"'-i th
M dC("lllJIUl.il u r

• The contents of the operand (register or memory) are


compared with the contents of the accumulator.

• Both contents are preserved .

• The result of the comparison is shown by setting the


flags of the PSW as follows:
Compare
• Any 8-bit dat.l. or the contents of register, or memory
location can be comp.ires for :
• Eqlldlity

• G J'f' dtf'rTl1-111

• l,c,s5 Than

"'ith the contents of accumulator.


Logical Instructions
• The result is renected in status flags.
+1++-11,1;;;,;:+
<.""MP R Coml),ltt rfgincr or ml!'.lt\Of)' '-111)
M ~~'l llllll l.ll <)f

• if (A) < (reg/mem) : carry flag is set

• if (A)= (reg/mem) : zero flag is set


Complement
• The contents of accumulator can be complemented. • if (A) > (reg/mem) : carry and zero flags are reset.
• Each o is replaced by I and each I is replaced by o. • Example: CMP B or CMP M

Logical Instructions Logical Instructions


llpcnd,• Op,·ra nd lh·,u iption
CPI 8--bit d.ltl.a Compue luunt".dl.u e with a<'rumuLuor ANA R logic•I ANO ff'(tH!f'r or memory with
M dttumuLtl or

• The 8-bit data is compared with the contents of • The content s of th e accumulat or are logically ANDed wi th the co ntent s
accumulator. of n -gister or me mory.
• The result is placed in the accumulat or.
• The values being compared remain unchanged. • If the opera nd is a memory loca tio n, its address is specified by the
co nten ts o f H- L pa ir.
• The result of the comparison is shown by setting the • S, Z, P arc modi fi ed to re llcc:t the result o f the opera tion.
flags of the PSW as follows: • CY is reset .-ind AC is ,-el.
• Example: ANA B o r ANA M.
Downloetl s - : _ _, _ , ~ , -

Logica I Instructions Logical Instructions


CPI
t)p, ,nll· I l> r,•r..1rul
8·bil d.lt.1 COllljNtt
lk,,n p1 1nn
iuunN!wtr with accumulator
F-1:liiiliM Operand 11<·,uiptton
ANT 3-bit d~t.1 Logicdl AND immedi.-.re ~~•h ac'('I_Unu.lator

• if (A) < data: carry flag is set


• The contents of the accumulator are logically ANDed with
• if (A) = data: zero flag is set the 8-bit data .
• The result is placed in the accumulator.
• if (A) > data: carry and zero flags are reset
• S, Z, Pare modified to reflect the result.
• Example: CPI 89H
• CY is reset, AC is set.
Dowrrtr»dSowa : www.tlldltDt =ia111=t~
• Examole: ANI 86H .
Logical Instructions
(lpt ncl c- C) pc-r,1n,I I l)'-·, t. r1pl1t111 Logical Instructions
ORA R 1..ogic.al OR regiifo>r or 11\l'lllOf)' with ( )pc.od e ( )p,r1 ~11nl I lle,c npll n n
M o1Cn11nuLi1or
XRA R Logic.il XOR ~ reror memory ,.'Ith
M .oc,rumul.ltor
• ltLt." ,·uullt"11b ol 1hc- ..,cn111ut1..,1or ,,1rr logi<,1lty <>Wi-rt "-ith thP C'OIUP11t!i o( che r~islf'ror
U lt"l'llOt")'•
• TI1e contents of the accu mulator arc XORed with the content.~ of
• The result Is placed In t he accumukn or. the register or ml!mory.
• lf 1heol)ef•nd i•• memo,y loc,ujon . ltsdddi.,.. ,s spedf~d by 1hu0111.. 11 ,of H-L p,,ir. • The result is placed in the accumulator.
• S, 7., P .n .. 111cKlifiNI ln n'.'O« t chr:-rnuh .
• If the opuan<l is a memo ry location, its address is specified by

__
the contl!nts of H-L p.1ir.
• CY •nd .-.c •re rt>se< . • S, z, P arc mod ified to reflect the result of the operation.
• 1•:umple: O KA Ror O RA M . • CY and AC are reset .
• Example: XRA B or XRA M. , ___.___...,_

Logical Instructions Logical Instructions


ORI
t>ru u cJ,.. C)p C"r.,1 nJ ilcscnpllo n
1,ogk:al OR lrnm,..u..,....ilh o1«um1do\t0f ••••
XJU
()l >t.- l oil OJ

~it d.tt•
I l)C"'-C rlrlm11

XOK ~ i , , a f ~ " i t h oO('('UIDul.ltor

• The contents of the accumulator are logically ORed with • The contents of the accumulator a re XO Red with the
the 8-bit data .
8-bit data.
• The result is pla~d in the accumulator. • The result is placed in the accumulator.
• S, Z, P a1·e modified to reflect the result. • S, Z, Pare modified to reflect the result.
• CY and AC are reset. • CY and AC are reset.
• Example: ORI 86H. • Example: XRIDo86H.
_ _ , _ _ __......,._

Logical Instructions Logical Instructions


••••
RLC Noc~
Ot"-' t&11uJ IJ,.. ..,, n pll n n
Rol.o\111' .le<:IU11Uwlor 1.-fi
t)p, cH.lt.•
RAt
I <>p,·1.11ul
NonP
1 l>t· , tn pC1 c, n
Rolillt- .w:-..1111111fa1or k-fl t hrougl1 c~ll)'

• Each binary bit of the accumulator is rotated left by one • Each binary bi t of the accumulator is rotated left by one
position.
position through the Carry flag.
• Bit D] is placed in the position of Do as well as in the Carry
flag.
• Bit D7 is placed in the Carry flag, and the Carry flag is
placed in the least significant position Do.
• CY is modified according to bit Cry.
• CY is modified according to bit D].
• S, Z, P, AC are not affected.
• S, Z, P, AC a re not a ffected.
• Example: RLC.
• Example: RAL.
Download $cN#ce : WWW,,., JW-:GM

Logical Instructions Logical Instructions


Opc-1J 11J fJt·,, npl1nn MIEN
RAR Nmw Rot.arr aa-umul.atnr right rhrnugh c-.iny
RRC Nou,e Rot.at~ accumulator right

• Each bina ry bit of the accumulator is rotated right by one


• Each binary bit of the accumulator is rotated ri ght by one position through the Ca rry fl ag.
position.
• Bit Do is placed in the Carry flag, and the Carry flag is
• Bit Do is placed in the position of D7 as well as in the Carry placed in the most significa nt position Cry.
flag.
• CY is modified accord ing to bit Do.
• CY is modified according to bit Do.
• S, Z, P, AC are not affected .
• S, Z, P, AC are not affected.
• Example: RAR.
• Example: RRC.
Download Sowc'f' : .... ..., trfnp, ct 'Da Download SGl#'C8 : ...... ,,., t, ' mlll
Logical Inst ruct ions Logical Instructions
Op, cult.. Clpr'r.uu.l rlr-"'r- < ri pt io n
flt•s< rip I ion

N-l:lii
O.tA
l,iYbi:hM Complen~nt .Jcnunul.Jlor
iii&A-J\wllf' STC Noor Srf carry

• The Carry flag is set to 1.


• The conten ts of the accum ulator are compl ement ed.
• No other flags are affected.
• No flags are affected.
• Example: STC.
• Examp le: CMA.

Logical Inst ruct ions Branching Instructions


Opcod e Operand / lle-. npt ion • The branch ing instruc tion alter the norma l sequen tial
Noor Complnnrnl C.illT)'
CMC flow.

• The Carry flag is comple mented . • These instruc tions alter either uncon ditiona lly or
conditi onally.
• No other flags are affected.
• Example: CMC.

Jump Con ditio nall y


Branching Instructions ()p,oJ e
Jump if U IT)'
(.'Y• I
JC
Op, o ,l t" Orn.·r.1nJ Uc.""' ttpt iun CY=o
Jl'-C Jump if No C.my
J6•bil ~ddrrs, Jmnp unconcflti o1ully
JM P
JP )111111' if Po.ii i>'t" s-o
JM Jump If Mlnus s- ,
• The program sequen ce is transferred to the memor y J7. Juml'if7.. ..,,
7.,
location specified by the 16-bit addres s given in the )NZ Jump lf No Zt'ro Za o
operan d. J,unp if P,uity F.w-n
p.,
JPF.
l'= o
• Example: JMP 2034 H. Jl'O Jump lf P.arity Odd

Do- -•:- .'""'"'~ -


DownloadS cx,n:e : . . . .. ,,,wer a.-. .

Branching Instructions
C>p,o<lr ' 'r••r,,n,I I 1,.,...... ,ipl ion
Branching Inst ruct ions CALL 16•bil addrN, C.lll tm<'ouditioawlly

O p co d ~
1
C>pt•r,i:uul

Jx 16•bil ddd'"• Jwnp ronditlotw Uy • The program sequenc e is transfer red to the memor y
location specifie d by the 16-bit address given in the
operand .
• The program sequence is transferred to the memory • Before the transfer, the address of the next instruct ion after
location specified by the 16-bit address given in the CALL ( the content s of the program counter ) is pushed onto
operand based on the specified flag of the PSW. the stack.

• Example: JZ 2034 H. • Examp le: CALL zo34 H.


Branching Instructions Branching Instructions
OpcoJ <' I Oprr,,ml 1).-" rip t "'"
16-bit addrt"!iS Call ro11dltion,1lly
RH None R,,tun1 unconditionally

• The program sequence is transferred to the memory • The program sequence is transferred from the
location specified by the 16-bit address given in the subroutine to the calling program.
operand based on the specified flag of the PSW. • The two bytes from the top of the stack are copied into
• Before the transfer, the address of the next instruction the program counter, and program execution begins at
after the call (the contents of the program counter) is the new address.
pushed onto the stack.
• Example: RET.
• Example: CZ 2034 H.
DoMllold Sci,.-a : - .....~ -
DownloMI , - : --lldlll~-

Branching Instructions
Call Conditionally
cc C.ill ifC,ury
',tallls I la it•
CY• I
•·••
Rx Milt' Call coodit!on,11ly

CNC C.,11 if No Carry CY•o • The program sequence is transfe rred from the
CP Call If Po,;it i\°' S•o subroutine to the calling program based on the
specified flag of the PSW.
CM C.iJI if Minus

C.7.. C.ill ifZtt<> • The two bytes from the top of the stack are copied into
Z=o
the program counter, and program execution begins at
CN7 CallifNouro
the new address.
CPF. Call if Parity b~.ll p •I

CPO C.,11 if P,tril)' Odd P•o


• Example: RZ.
------------
Return Conditionally
RC Rt-tum ifurry cv., Restart Address Table
RNC Rcium if No Carry CY=o ln,lnntinn,

RP Rt-tum if l'osim,- S=o RSTo ooooH

RM Remm if Minus s., RST1 ooo8 H


RZ lli!turn if Zero 2• I RST2 0010H
RNZ Return if No Zero Z• o 0018 H
RST3
RPE Return if P,uil)' E•-.:n P•t
RST 4 0020H
RPO Return if Parity Odd P•o

--=
---~. . RST5 0028H

RST6 1>030 H

RST7 00)8 H
~ ScNrce : - .191N/.blagapol... ...

Branching Instructions
Opu,J ,, Op,•1,11ul l)l•,l1 i pt ic111
RST o-; ~.ut (Software l1ttl'rn1pls )
Control Instructions
• The RST instruction jumps the control to one of eight • The control instructions control the ope ration of
memory locations depending upon the number. microprocessor.
• These are used as software instructions in a program to
transfer program execution to one of the eight
locations.
• Example: RST 3.
Control Instructions
Control Instructions •·•--11@01111+ Nol"N' Diwbk- i.u1m,1p1
llL'""'lr t pt 1on

DI
oru><I•· ll1wr.11u l I lll-,u1r 1111n

Nonr Noopttation
NOP
• The interrupt enable flip-flop is reset and all the
interrupts except the TRAP are disabled.
• No operation is performed.
• No flags are affected.
• The instruction is fetched and decoded but no
• Example: DI
operation is executed.
• Example: NOP
DtllWfllOl#I ScNwce : _ _l9dl,I......,__

Control Instructions

Op,ml l"
Control Instructions
I Op,•1,111<1 11<", ni pl io n
•·••-;;;;;;;;;:+
El Nor~ Eu,tblr iJllC'flllpl

Hl.T None Halt


• The interrupt enable flip-flop is set and all interrupts
are enabled.
• The CPU finishes executing the current instruction
• No flags are affected.
and halts any further execution.
• This instruction is necessary to re-enable the
• An interrupt or reset is necessary to exit from the halt interrupts (except TRAP).
state.
• Example: El
• Example: HLT

Control Instructions Contro l Instruc tions


()p4.ct-t.ll• <>1w 1c1nt.l lt..~ ,lnp t1 on MIMIW Opt•1a 1ul I lh•,,, ipli nn

Non,- Rf'olli lntffl\Jp( Maa SIM Nonr Set· lnll'mlpl Matk


RIM

• This is a multipurpose instruction used to read the • This is a multipurpos e instruction and used to
status of interrupts 7.5, 6.5, 5.5 and read serial data implement the 8o85 interrupts 7.5, 6.5, 5.5, and serial
input bit. data output.
• The instruction loads eight bits in the accumulator • The instruction interprets the accumulato r contents as
with the following interpretations. follows.
• Example: RIM • Example: SIM

RIM Instruction
SIM Instruction
D1 D~ D, D, Di D1 D1 D0

IJSID I ·~ I If I ·~ I IEl I 7j5 i 6j5i Sj5i ~ ~ ~ ~ ~ ~ ~ ~

Serial input
dalll bit
LInterruptif
masked
IJSODJl JSE I Mrs I M~.sI Mrs I
s~ I XXXI Rr I M

lnterrupcs
pcadina ,r
bit • I
j bit = I
Interrupt enable
mp-nop ••..,
if bit = I
Serial outpul data
,
Scnal dm enable
I - Enable
0 • Di.sable
Rctel
. R7•S
1r D, • I
Muk Kt
enable ir
D, • t
,i
Mu ks interrupts
if bih - I

You might also like