Professional Documents
Culture Documents
UNIT 4 Assembly Languge Programming.pptx
UNIT 4 Assembly Languge Programming.pptx
Classification of Instructions,
Hierarchy of Languages :
Compilers and Assemblers
Instructions and Machine Language
1. Each command of a program is called an instruction (it instructs the computer, what to do?).
2. Computers only deal with binary data, hence the instructions must be in binary format (0’s and
1’s).
3. Therefore, each Opcode is having unique bit pattern of (0’s and 1’s).
Instruction Fields
Assembly language instructions usually are made up of several fields. Each field specifies
different information.
Opcode: Operation code that specifies operation to be performed. Each operation has its unique
opcode.
Operands: Fields which specify, where to get the source and destination operands for the
operation specified by the opcode.
Instruction Fields
Translating Languages
Introduction to Assembly Language
Programming
An assembly language is a low-level programming language for a computer, or other
programmable device, in which there is a very strong (generally one-to-one) correspondence
• Some opcodes require one or more operands as part of the instruction, and most assemblers
can take labels and symbols as operands to represent addresses and constants, instead of hard
coding them into the program.
Assembly Language Programming Tools :
2. Direct addressing: In direct addressing mode, the operand is a memory address specified
directly in the instruction. The direct addressing mode is used for instructions that access
data stored in memory.
4. Register addressing: In register addressing mode, the operand is stored in one of the
processor registers. The register addressing mode is used for instructions that manipulate
the contents of the registers.
1. Indexed addressing: In indexed addressing mode, the operand is obtained by
adding an offset value to a base address stored in a register. The indexed
addressing mode is used for instructions that access data stored in memory using
a computed address.
Opcode
This required field contains the mnemonic operation code for the
8085 instruction.
Operand
One-byte Instruction
Two-byte Instruction :
Three-byte Instruction :
Data Transfer Instructions :
Instructions copy data from source to destination.
While copying, the contents of source is not modified.
Data Transfer Instructions do not affect the flags.
LDA Instruction
Arithmetic Instructions
ADD: Add register/memory to
accumulator
Branch Instructions
Logical & Bit Manipulation
Instructions
Control Instructions
Instruction And Data Formats
An instruction (instruction format) is a command to the microprocessor to perform a given
task on a particular data. Each instruction (instruction format) is of two parts. One is to be
performed, called the operation code or opcode and the second one is the data to be
operated on, called the operand. Operands or data can be specified in different ways. It may
include an 8-bit or 16-bit data, an internal register. a memory location, or it or 16-bit
address. In some instructions, the operand is implicit.
In the 8085 microprocessor, byte and words are synonymous because it is an 8-bit
microprocessor. But, instructions are commonly referred to in terms of bytes rather than
words.
Instruction And Data Formats
The size of 8085 instructions can be 1 byte, 2 bytes or 3 bytes. The 1-byte
instruction has an opcode alone. storing the 3 bytes instruction in memory, the
sequence of storage is, opcode first followed by low byte of address or data
and then high byte of address or data.
THANK YOU