Unit 2 Part B
Unit 2 Part B
Part B
Introduction
Instruction set of 8085
Classification of Instruction set
– Data Transfer Instructions
– Arithmetic Instructions
– Logical Instructions
– Branching Instructions
– Control Instructions
Introduction
Instruction set of 8085
Classification of Instruction set
– Arithmetic Instructions
– Logical Instructions
Introduction
CMP Compare
CPI Compare Using Immediate Data
The rotate instructions shift the contents of the accumulator one bit position to the
left or right:
Unconditional branching
– JMP Jump
– CALL Call
– RET Return
Conditions
– NZ Not Zero (Z = 0)
– Z Zero (Z = 1)
– NC No Carry (C = 0)
– C Carry (C = 1)
– PO Parity Odd (P = 0)
– PE Parity Even (P = 1)
Summary - Stack
1 ORG ORG 2000H The next block of the instruction should be stored in memory locations starting at 2000H
(origin)
2 END END End of assembly.
3 EQU PORT1 EQU 01H The value of the term PORT1 is equal to 01H. Generally, this means the PORT1 has the port
(Equate) INBUF EQU 2099H address 01H
The value of the term INBUF is 2099H. This may be the memory location used as the input
buffer.
4 DB DATA: DB A2H, 9FH Initializes an area byte by byte.
(Define Byte) OR This directive is used for the purpose of allocating and initializing single or multiple data
AREA: DB 30H, bytes.
52H, 35H Assembled bytes of the data are stored in successive memory locations until all the values are
stored. This is a convenient way of writing a data string. The level is optional.
Memory name AREA has three consecutive locations where 30H, 52H and 35H are to be
stored.
5 DW DW 2050H Initializes an area two bytes at a time
(Define
Word)
Assembler Directives
S. No. Assembler Example Description
Directive
6 DS OUTBUF: DS 4 Reserves a specified number of memory locations. In the example, four memory
(Define storage) locations are reserved for OUTBUF.
7 MACRO Shows the beginning of macro along with defining name and parameters.
where macroname (STEP) is specified by the user.