0% found this document useful (0 votes)
7 views3 pages

Instruction Classification Overview

The document classifies instructions into five categories: data transfer, arithmetic, logical, branching, and machine control instructions. It details the functions of each category, including examples of specific instructions for data transfer, arithmetic operations, logical operations, and branching conditions. Additionally, it notes extra classifications for certain operations and highlights the role of the carry flag in subtraction operations.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

Instruction Classification Overview

The document classifies instructions into five categories: data transfer, arithmetic, logical, branching, and machine control instructions. It details the functions of each category, including examples of specific instructions for data transfer, arithmetic operations, logical operations, and branching conditions. Additionally, it notes extra classifications for certain operations and highlights the role of the carry flag in subtraction operations.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

FUNCTIONAL CLASSIFICATION

Accordingtothefunctionstheinstructionsperform,theycanbeclassifi
edinto5categories. They are as follows.

(1)Datatransfer instructions (2)Arithmetic instructions

(3)Logicalinstructions (4)Branchinstructions and

(5)Stack,I/O,machinecontrolinstructions.

Apartfromthese,insomeμPsi)exchanges,blocktransfers&searchesii)rotatesandshi
ftsiii)
bitset,reset,bittestiv)calls,returns&restartsare takenasextra classification.

1. Data transferinstructions:-Thesegroupof instructions transfer


(technicallycopy data) data fromone
place(calledsource)toanotherplace(calleddestination),withoutmodifyin
gthecontentofthe
source. The data can be transferred from register to memory,
memory to register, register to register etc.
MOVRd,Rs CopydatafromRs(sourceregister)intoRd(destinationregister)
MVIRd,8 bit Load8bitdataintheregisterRd
LXIRp,16-bit Load16bitdataintheregisterpair
MOVR,M Copydatabytefrommemorylocationintoaregister
MOV M,R Copydatabytefromregisterintomemorylocation
STA16-bit Copydatabytefromaccumulatorintomemory location
specifiedby16bitaddress
LDA16-bit Copydatabyteintoaccumulatorfromthememorylocation
specifiedby16bitaddress

2. Arithmetic instructions:- These group of instructions perform


arithmetic operation on data. The arithmetic operation may be
addition, subtraction, increment, decrement etc.(8085 does not
have multiplication and division instructions, multiplication is
repeated addition while division is repeated subtraction.)

Any 8- bit number or contents of a register or the contents of a


memory location can be added to /subtracted from the
contentsof accumulator and the result stored in accumulator.
Register to register addition or subtraction is not allowed.
Subtraction is performed in 2’s complement form. The 8-bit
contents of register or memory location and the 16-bit contents
of register pair can be incremented or decremented by 1

ADDR Addcontentsofregistertocontentsof accumulator


ADI 8bit Add8bitdatatocontentsofaccumulator
SUBR Subtractcontentsofregisterfromthecontentsof accumulator
SUI8bit Subtract8bitdatafromcontentsof accumulator
INRR Incrementcontentsof register
DCR R Decrementcontentsofregister
ADDM Addcontentsofmemorylocationtocontentsofaccumulator
SUBM Subtractcontentsofmemorylocationfromcontentsofaccumulator
INRM/DCRM Increment/decrementcontentsofmemorylocation
INXRp/DCXRP Increment/decrementcontentsofregisterpair(BC,DE, HL)

3. Logical instructions:- These group of instructions perform


various logical operations with the contents of accumulator.
AND, OR, XOR:-8-bit number or content of register or memory
location can be logically ANDed,ORed, or Xclusively ORed with the
content of accumulator and the result stored in the accumulator.
(The process is by bit-by-bit ANDing, ORing, XORing)

Rotate and shift:- Each bit in the accumulator can be shifted left or
right by one position(RLC- rotate accumulator left, RRC-rotate
accumulator right, RAL-rotate accumulator left through carry and
RAR-rotate accumulator right through carry).

Compare:- 8-bit number or contents of register or content of


memory location can becompared (═ ,> ,< ) with the content of
accumulator.

Complement:-Contentofaccumulatorcanbecomplemented(0to1and1to0).
ANAR/M ANDaccumulatorcontentwithcontentofregister/memorylocation
(ORA,XRA)
ANI8bit AND8bitdatawithaccumulatorcontent
(ORI, XRI)
CMA Complementcontentof accumulator
CMPR/M Comparecontentsofregister/memorylocationwithcontentofaccumulator
CPI 8bit Compare8bitdatawiththecontentofaccumulator

4. Branching instructions:-
These instructions change the sequence of program execution
conditionally or unconditionally. In the former case, control is
transferred to another memory
locationonlyifaparticularconditionissatisfied.
([Link]).Inthelattercase

,withoutanycondition,controlistransferredtoanotherlocation.(all16-bit
addresses).

JMP16bitaddress―changetheprogramsequencetothelocationgivenbythe16bitad
dress.

JZ (jump ifzero), JNZ(jump ifnozero),JC(jump ifcarry), JNC(jump


ifnocarry), JPO(jumpifparity odd), JPE(jump if parity even),
JP(jump if plus) and JM(jump if minus) all with 16-bit addresses.

Call return and restart:-These instructions change the sequence of


a program either by calling a subroutine or returning from a
subroutine. e.g CALL 16 bit address, RET

[Link] control instructions:- These instructions control


machine functions such as Halt(HLT), Interrupt or No operation
performed(NOP).These are used to produce delay time.

Note:Whilesubtraction,thecarryflagisactuallytheborrowandmicrop
rocessorshowsthe complemented borrow i.e if cy=0, borrow is
present while if cy=1, borrow is absent.

You might also like