In this article, Assembler Directives of 8085 microprocessor and 8085 Instruction Set Classification are discussed.
Assembler Directives of 8085 Microprocessor
- Assembler directives, also known as pseudo-ops, are special commands used by assemblers to control the assembly process.
- These directives do not represent instructions that are executed by the processor but rather provide information to the assembler about how to generate the machine code.
- Unlike instructions being compiled and written to chip program memory, directives are commands of assembly language itself and have no influence on the operation of the microcontroller.
- Some of them are obligatory part of every program while some are used only to facilitate or speed up the operation. Directives are written in the column reserved for instructions. There is a rule allowing only one directive per program line.
In the case of the 8085 microprocessor, there are several assembler directives that can be used. Here are some of the most commonly used directives:
- This directive sets the origin of the program counter (PC) for the current program module. The origin value can be specified in hexadecimal or decimal notation.
- For example, ORG 3000H sets the PC to 3000H.
DB (Define Byte)
- This directive is used to define one or more bytes of data in memory. The syntax for this directive is DB data, where data can be a comma-separated list of values in hexadecimal or character format.
- For example, DB 12H, 34H, 56H defines three bytes of data with the values 12H, 34H, and 56H.
DW (Define Word)
- This directive is used to define one or more words (16-bit values) in memory. The syntax for this directive is DW data, where data can be a comma-separated list of values in hexadecimal format.
- For example, DW 1234H, 5678H defines two words with the values 1234H and 5678H.
DS (Define Storage)
- This directive is used to reserve a block of memory for storing data. The syntax for this directive is DS size, where size is the number of bytes to reserve.
- For example, DS 10 reserves 10 bytes of memory.
- This directive is used to define a symbolic constant. The syntax for this directive is symbol EQU value, where symbol is the name of the constant and value is the value it represents.
- For example, MAX_COUNT EQU 100 defines a constant named MAX_COUNT with the value 100.
- This directive marks the end of the program module. It tells the assembler to stop assembling code and generate an object file.
- For example, END marks the end of the program module.
These are some of the most commonly used assembler directives in the 8085 microprocessor. Assembler directives are an essential part of the assembly process, and they help programmers to manage memory and define constants and data structures in their code.
8085 Instruction Set Classification
The 8085 instruction set can be classified into the following five functional headings.
Data transfer instructions
It includes the instructions that move (copies) data between registers or between memory locations and registers. In all data transfer operations, the content of source register is not altered. Hence the data transfer is copying operation.
For example, (1) MOV A,B (2) MVI C,45H
Includes the instructions, which performs the addition, subtraction, increment or decrement operations. The flag conditions are altered after execution of an instruction in this group.
For example, (1) ADD A,B (2) SUI B,05H
The instructions which perform the logical operations like AND, OR, EXCLUSIVE- OR, complement, compare and rotate instructions are grouped under this heading. The flag conditions are altered after execution of an instruction in this group.
For example, (1) ORA A (2) ANI B, 01H
The instructions that are used to transfer the program control from one memory location to another memory location are grouped under this heading.
For example, (1) CALL (2) JMP 4100
Machine control Instructions
It includes the instructions related to interrupts and the instruction used to stop the program execution.
For example, (1) NOP (2) END