Digital Electronics Addressing Mode
Digital Electronics Addressing Mode
Assembly Programming
Language and Addressing Modes
Assembly Programming Language
What is assembly programming language
• An assembly language is a type of low-level programming language that is
intended to communicate directly with a computer’s hardware. Unlike
machine language, which consists of binary and hexadecimal characters,
assembly languages are designed to be readable by humans.
• Labels: Labels are used to mark speci c locations in the code, allowing for easier referencing of
memory addresses or de ning points for branching instructions (like jumps or loops). They are
often used in conjunction with control ow instructions.Operators
• Operands: These are the inputs or targets for instructions. Operands can be immediate values
(constants directly used in the instruction), memory addresses, or registers. MOV AX,5 "AX" is a
register, and "5" is an immediate value or constant
• Directives: Directives are commands for the assembler rather than the CPU. They provide
instructions and information to the assembler about how to assemble the code. For example,
directives might include de ning constants, allocating memory, or specifying the start point of the
program
fi
fi
fl
fi
Components of Assembly language
• Comments: Comments are used to annotate the code and provide explanations
for programmers reading the code. They are not executed by the computer and
are for human understanding only.
• Control Structures: These are constructs like loops and conditional statements
that control the ow of execution in the program. They are written using
assembly language instructions and are used to direct the program's execution
path
• Implied Addressing Mode: In this mode, the operands are implicitly speci ed
in the instruction de nition.
fi
fi
ff
fi
Cont.
• Immediate Addressing Mode: In this mode, the operand is speci ed in the
instruction itself, or we can say that an immediate mode instruction has an
operand rather than an address.
fi
Cont
• Direct Addressing Mode: In this mode, the address of the memory location
that holds the operand is included in the instruction. The e ective address is
the address part of the instruction.
ff
Cont
• Indirect Addressing Mode: In this mode, the address eld of the
instruction gives the address where the e ective address is stored in
memory.
ff
fi
Cont
• Relative Addressing Mode: In this mode, the content of the program
counter is added to the address part of the instruction to calculate the
e ective address.
ff
Cont.
• Indexed Addressing Mode: In this mode, the e ective address will be
calculated as the addition of the content of the index register and the
address part of the instruction
ff
Summary.
Machine Instructions
• A binary code is used for specifying micro-operations for the computer.
Machine Instructions are commands or programs written in the machine code
of a machine (computer) that it can recognize and execute. In computer
programming, machine Instructions are low-level program instructions in
binary. Without further processing, these instructions are directly decoded
and executed by the computer microprocessor.