Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
What is an instruction set
1.
2. What is instruction?
An instruction is a binary pattern designed
inside a microprocessor to perform a specific
function.
The entire group of instructions that a
microprocessor supports is called Instruction Set.
8085 has 246 instructions.
Each instruction is represented by an 8-bit
binary value.
These 8-bits of binary value is called Op-Code or
Instruction Byte.
5. What is addressing ?
Every instruction of a program has to
operate on a data.
The method of specifying the data to
be operated by the instruction is called
Addressing.
The 8085 has the following 5 different
types of addressing modes.
7. 1.Immediate addressing
mode
In this mode of addressing ,the
data is specified in the instruction
itself.
The data will be a part of the
program instruction.
EX. MVI B, 3EH - Move the data 3EH
given in the instruction to B register.
8. 2. Register Addressing mode
In register addressing mode, the
instruction specifies the name of the
register in which the data is available.
EX. MOV A, B - Move the content of
B register to A register.
9. 3.Direct addressing mode
In direct addressing mode, the address of
the data is specified in the instruction.
The data will be in memory. In this
addressing mode, the program instructions
and data can be stored in different memory.
EX. LDA 1050H - Load the data available in
memory location 1050H in to accumulator in
the instruction.
10. 4.Indirect addressing mode
In indirect addressing mode, the
instruction specifies the name of the
register in which the address of the data is
available. Here the data will be in memory
and the address will be in the register pair.
EX. MOV A, M - The memory data
addressed by H L pair is moved to A
register.
11. 5.Implicit addressing
mode
In implicit addressing mode, the
instruction itself specifies the data to be
operated.
EX. CMA - Complement the content of
accumulator; RAL
12.
13. Instructions in terms of
byte size or word size
1.1-byte instruction
2.2-byte instruction
3.3-byte instruction
14. 1.One byte instruction
A one byte instruction includes the
operand and the op-code in same byte.
These type of instructions occupy only
one memory location.
For example:
Op-code
MOV
ADD
CMA
Operand
C,A
B
--
15. 2.Two byte instruction
A two byte instruction includes the op-code
and the 8-bit data or address.
This type of instruction occupies 2-memory
location.
For example:
Op-code
MVI
IN
Operand
A,O5
01
16. 3.Three byte instruction
A 3-byte instruction includes the op-code and
16-bit address or data.
This type of instructions occupy three memory
location.
For example:
Op-code
LXI
STA
Operand
2050
2051
17.
18. TYPES OF INSTRUCTION
SET
Data Transfer Instruction
Arithmetic Instructions
Logical Instructions
Branching Instructions
Control Instructions
19. These instructions move data between
registers, or between memory and
registers.
These instructions copy data from
source to destination.
While copying, the contents of source
are not modified.
23. OPERATOR OPRAND DESCRIPTION
ADD R Add data of register with aacumulator
ADD M Add data of register with accumulator
ADC R Add data of register to accumulator with carry
ADC M Add data of memory to accumulator with carry
DAD Reg. pair Add register pair to H-L pair
SUB M Subtract data of memory with accumulator
24. OPERATOR OPERAND DESCRIPTION
SBB R Subtract data of register from accumulator
SBB M Subtract data of memory from accumulator
SBI 8 bit data Subtract immediate from accumulator with
borrow
INR R Increment in register by +1
DCR R Decrement in register by - 1
INX Rp Increment in register pair by +1
DCX Rp Decrement in register pair by -1
25. OPERATOR OPERAND DESCRIPTION
ADI 8 bit data Add immediate 8 bit data with
accumulator
ACI 8 bit data Add immediate 8bit data to
accumulator with carry
SUI 8 bit data Subtract immediate 8 bit data to
accumulator with carry
INR M Increment data of memory by +1
DCR M Decrement data of memory by -1
26. These instructions perform logical operations
on data stored in registers, memory and status
flags.
The logical operations are:
AND
OR
XOR
Rotate
Compare
Complement
27. OPERATOR OPERAND DESCRIPTION
ANA R Anding data of register with accumulator
ANA M Anding data of memory with accumulator
ANI 8 bit data Immediate anding of 8 bit data with
accumulator
ORA R Oring data of register with accumulator
ORA M Oring data of memory with accumulator
ORI 8 bit data Immediate Oring of 8 bit data with accumulator
XRA R Xoring data of register with accumulator
28. OPERATOR OPERAND DESCRIPTION
XRA M Xoring data of memory with accumulator
XRI 8 bit data Immediate xoring 8bit data with accumulator
CMP R Compare data of register to accumulator
CMP M Compare data of memory to accumulator
CPI 8 bit data Immediate compare 8 bit data to accumulator
CMA None Complement data of accumulator
CMC None Complement carry flag
29. OPERATOR OPERAND DESCRIPTION
RLC None Rotate accumulator left without carry
RAL None Rotate accumulator left with carry
RRC None Rotate accumulator right without carry
RAR None Rotate accumulator right with carry
30. The branching instruction alter the normal
sequential flow.
These instructions alter either unconditionally
or conditionally.
32. Op-code
• JC
• JNC
• JP
• JM
• JZ
• JNZ
• JPE
• JPO
Description
• Jump if carry
• Jump if not carry
• Jump if positive
• Jump if minus
• Jump if zero
• Jump if not zero
• Jump if even parity
• Jump if odd parity
Flag status
• CY=1
• CY=0
• S=0
• S=1
• Z=1
• Z=0
• P=1
• P=0
33. Op-code
• CC
• CNC
• CP
• CM
• CZ
• CNZ
• CPE
• CPO
Description
• Call if carry
• Call if not carry
• Call if positive
• Call if minus
• Call if zero
• Call if not zero
• Call if even parity
• Call if odd parity
Flag status
• CY=1
• CY=0
• S=0
• S=1
• Z=1
• Z=0
• P=1
• P=0
34. Op-code
• RC
• RNC
• RP
• RM
• RZ
• RNZ
• RPE
• RPO
Description
• Return if carry
• Return if not carry
• Return if positive
• Return if minus
• Return if zero
• Return if not zero
• Return if even parity
• Return if odd parity
Flag status
• CY=1
• CY=0
• S=0
• S=1
• Z=1
• Z=0
• P=1
• P=0
37. OPERATOR OPERAND DESCRIPTION
LXI SP 16 bit address Load 16-bit address into stack pointer register
PUSH Rp Push data of reg. pair in stack
POP Rp Pop data of reg. pair from stack
PUSH PSW Push data of PSW(accumulator + flag) in stack
POP PSW Pop data of PSW(accumulator + flag) from stack
NOP None No operation perform
HLT None Waiting state
38. Op-code
• EI
• DI
• RIM
• SIM
Operand
• NONE
• NONE
• NONE
• NONE
Description
• Enable interrupt
• Disable interrupt
• Read interrupt mask
• Set interrupt mask