Microprocessor Group assignment complete
Microprocessor Group assignment complete
Q1. What is the size of address and data bus in the 8086?
-Intel 8086 is 16-bit processor designed by Intel in 1978 and laid the
foundation for the x86 architecture.
-The performance of Intel 8086 depends on the modes and it have clock
frequencies up to 10MHZ.
Intel 8086 modes of operation
-Minimum Mode: For single-processor systems.
- Maximum Mode: For multi-processor systems
The Intel 8086 microprocessor has:
-A 16-bit data bus, which allows it to transfer 16 bits of data at a time.
-A 20-bit address bus, enabling it to access up to 2^20 memory locations.
1. General-Purpose Registers
These are versatile registers used for arithmetic, logical operations, and data
manipulation. They can also be divided into two 8-bit parts: higher (H) and
lower (L).
AX (Accumulator Register): Used for arithmetic and logical operations. It is
the default register for input/output instructions.
BX (Base Register): Often used as a base address for memory access.
CX (Count Register): Primarily used as a counter in loop and string
operations.
DX (Data Register): Used for I/O operations and multiplication/division
involving large data.
2. Segment Registers
3. Pointer Registers
SP (Stack Pointer): Points to the top of the stack. It is used during push/pop
operations.
BP (Base Pointer): Used to access data within the stack segment, particularly
in subroutine calls.
4. Index Registers
5. Instruction Pointer
IP: Holds the offset address of the next instruction to be executed. It works
with CS to form a physical address for fetching instructions.
6. Status/Control Registers
The FLAGS register contains condition flags that reflect results of
arithmetic/logical operations and control flags that influence processor
behavior.
Condition Flags:
Carry Flag (CF), Zero Flag (ZF), Sign Flag (SF), Overflow Flag (OF), etc.
Control Flags:
Interrupt Flag (IF), Direction Flag (DF), Trap Flag (TF).
1. General-Purpose Registers:
Performing arithmetic/logical operations.
Temporary storage during program execution.
Loop counters and base addresses for memory access.
2. Segment Registers:
Efficiently accessing different parts of memory using segmentation.
Organizing code, data, and stack separately for better modularity.
3. Pointer and Index Registers:
Facilitating stack manipulation during function calls or interrupts.
Supporting advanced addressing modes like indexed or based addressing.
4. Instruction Pointer:
Ensuring sequential execution of instructions by pointing to the next
instruction.
5. FLAGS Register:
Controlling program flow based on results of comparisons or arithmetic
operations.
Enabling/disabling interrupts or managing string operation directions.
Example:-If:
Q4.Write the different memory segments used in the 8086 and their
functions.
Key Differences
Aspect Minimum Mode Maximum Mode
Multi-processor/coprocessor
Configuration Single-processor system system
Pin Functions (24– Direct control signals (e.g., Status/control signals for
31) ALE, DEN̄ ) multiprocessing
Q8.What is meant by DMA operation? Which pins of the 8086 are
used to perform the DMA operation in the minimum and
maximum modes of the 8086?
Direct Memory Access (DMA) is a hardware feature that allows peripherals
or co-processors to transfer data directly to/from system memory without
continuous CPU involvement, improving efficiency by freeing the CPU for
other tasks. In the 8086 microprocessor, DMA operation is managed through
specific pins depending on its operating mode:
The BIU handles all interactions with memory and I/O devices. It is
responsible for fetching instructions, reading/writing data, and calculating
physical addresses.
Segment Registers: CS (Code Segment), DS (Data Segment), SS (Stack
Segment), ES (Extra Segment). These define the base addresses of memory
segments.
Instruction Pointer (IP): Holds the offset address of the next instruction to
be executed.
Instruction Queue: A 6-byte FIFO queue that prefetches instructions to
improve execution speed.
Address Adder: Combines segment base address and offset to generate a 20-
bit physical address.
Bus Control Logic: Manages the data bus, address bus, and control signals for
memory and I/O operations.
The flag register in the 8086 microprocessor is a 16-bit register that holds
information about the state of the processor and the results of arithmetic or
logical operations. It consists of 9 active flags, categorized into conditional
flags and control flags.
1. Conditional Flags
2. Control Flags
In the 8086 microprocessor, jumps are classified into two types based on
memory addressing: intra-segment and inter-segment.
1.Intra-Segment Jump:
Definition: A jump within the same code segment.
Addressing: Only the IP (Instruction Pointer) is modified; the CS (Code
Segment) register remains unchanged.
Range: Limited to ±32KB within the current segment.
Example: JMP SHORT LABEL or JMP NEAR PTR LABEL.
2.Inter-Segment Jump:
Definition: A jump to a different code segment.
Addressing: Both the CS (Code Segment) and IP (Instruction Pointer) are
modified to point to the new segment and offset.
Range: Can jump anywhere in the 1MB address space.
Example: JMP FAR PTR LABEL.
Key Difference:
Intra-segment jumps stay within the same segment (only IP changes).
Inter-segment jumps move to a different segment (both CS and IP
change).
Q13.What is the difference between short and near jump in the
8086?
In the 8086 microprocessor, short and near jumps are types of intra-segment
jumps (within the same code segment), but they differ in their range and
encoding:
1.Short Jump:
Range: Can jump within -128 to +127 bytes from the current instruction.
Encoding: Uses 1 byte for the opcode and 1 byte for the relative offset (8-bit
displacement).
Example: JMP SHORT LABEL.
2.Near Jump:
Range: Can jump within ±32KB from the current instruction.
Encoding: Uses 1 byte for the opcode and 2 bytes for the relative offset (16-bit
displacement).
Example: JMP NEAR PTR LABEL.
Key Difference:
Short jump is limited to a smaller range (±128 bytes) and uses a smaller offset
(8-bit).
Near jump covers a larger range (±32KB) and uses a larger offset (16-bit).
Q14.What are the different uses of stack in a microprocessor?
-The stack is a special region of memory that use LIFO to store temporary
data. There are about 6 primary use of stack:
Function Calls and Return Addresses - During a function call, the return
address is pushed onto the stack and when function completes the return
address is popped from the stack.
Temporary Storage of Data - stores data such as register contents while
other operations are performed.
Passing Parameters to Functions - Parameters for functions can be
passed via the stack and useful in Parameters for functions or subroutines
can be passed via the stack.
Interrupt Handling - When an interrupt occurs, the processor pushes the
current program counter and status flags onto the stack.
Q15.What is the difference between the MUL and IMUL instructions
in the 8086?
In the 8086 microprocessor, DIV and IDIV are instructions for division,
but they differ in the type of numbers they handle and how they
process them:
1.DIV (Unsigned Division):
Operation: Performs unsigned division.
Operand: Divides an 16-bit or 32-bit unsigned number
in AX or DX:AX by an 8-bit or 16-bit unsigned divisor.
Result:
For 8-bit: Quotient is stored in AL, remainder in AH.
For 16-bit: Quotient is stored in AX, remainder in DX.
Example: DIV BL (divides AX by BL, quotient in AL, remainder in AH).
2.IDIV (Signed Division):
Operation: Performs signed division.
Operand: Divides an 16-bit or 32-bit signed number in AX or DX:AX by
an 8-bit or 16-bit signed divisor.
Result:
For 8-bit: Quotient is stored in AL, remainder in AH.
For 16-bit: Quotient is stored in AX, remainder in DX.
Example: IDIV BX (divides DX:AX by BX, quotient in AX, remainder in
DX).
Key Difference:
DIV is for unsigned numbers.
IDIV is for signed numbers.
Both store the quotient and remainder in the same registers,
but IDIV handles negative values correctly.
Purpose of DAA
After adding two BCD numbers using the ADD instruction, the result may not
be a valid BCD number. The DAA instruction corrects this result to ensure it is
a valid BCD number and It works only on the AL register.
If the lower nibble (4 bits) of AL is greater than 9 or the Auxiliary Carry Flag
(AF) is set, the DAA instruction adds 6 to AL.
If the upper nibble of AL is greater than 9 or the Carry Flag (CF) is set, the DAA
instruction adds 6 to the upper nibble of AL.
Example
MOV AL, 35H ; Load AL with 35H (BCD for 35)
Interrupts are signals sent to the processor to request its attention. They can
be categorized into maskable and non-maskable interrupts based on whether
the processor can ignore them or not.
1. Maskable Interrupts
Control: The processor can enable or disable these interrupts using the
Interrupt Flag (IF) in the flag register.
Examples:
Examples:
Critical hardware failures (e.g., power failure, memory parity error).
High-priority events that require immediate attention.
- Have Lower priority and it’s Instructions are STI (Enable), CLI
(Disable)
Examples:- Keyboard, timer, software interrupts
Non-Maskable Interrupts (NMI):- Cannot be ignored or disabled
1. Hardware Interrupts
Examples:
2. Software Interrupts
Example:
MOV CX, 100 ; Set CX (Counter) to 100 (100 words = 200 bytes)
FindSmallest:
Skip: