Beruflich Dokumente
Kultur Dokumente
Stacks: Stacks are present for storing subroutine and interrupt return addresses, parameters and
other data.
Stack pointer :Two stack pointer registers called SP(Stack pointer) and BP(base pointer) are
provided to address the stack. Push and Pop instructions are provided.
Index registers: The index registers SI and DI are used to index the source and destination
addresses in string manipulation instructions.
The memory is used to store three components of program, Program code, Data and Stack. The
Code, Stack and Data segment registers are used to contain the start addresses of these three
components.
Immediate addressing mode: In the Immediate addressing mode, the instruction itself
contains the data that is to participate in the instruction. This data can be 8 or 16 bits in length.
Direct addressing mode: In the Direct addressing mode, the instruction contains 16 bit number
which is taken to be displacement from the segment base contained in segment register.
Indexed mode: In the Indexed mode, contents of the index register indicated in the instruction (
SI or DI ) are added to the 8 or 16 bit displacement contained in the instruction.
Based mode: In the Based mode, contents of the base register are added to the displacement.
Based and indexed mode: The based-and-indexed with displacement mode combines the
effect of the based and indexed modes.
4. Intel 8088 Instructions
Arithmetic Instructions
• Operands can be in one of the four 16 bit registers or in memory location designated by
one of the 24 addressing modes.
• Three instruction formats are as shown in figure.
• The mod and r/m fields specify first operand, which can be in register or in memory.
• The reg field describes the second operand, which is always a register.
• The instruction opcode indicates which instruction format is applicable.
• The direction field (d) indicates which operand is the destination operand.
• If d=0, the register/memory operand is the destination, else the register operand
indicated by reg is the destination.
• The width field (w) indicates whether 8 or 16 bit arithmetic is to be used.
Control Transfer Instructions
a) Declarations
- Declaration of constants and reservation of storage are both achieved in the same
direction
A DB 25 ; Reserve byte & initialize
B DW ? ; Reserve word, no initialization
C DD 6DUP(0) ; 6 Double words, all 0’s
These are some important aspects of the 8088 single pass assembler used in IBM PC