Question 1: List any 6 features of 8086 microprocessor (4 marks)

Detail:
The 8086 microprocessor (٨٠٨٦ مائیکروپروسیسر), developed by Intel, is a 16-bit processor (١٦-بٹ پروسیسر) that revolutionized (انقلاب لا دینا) computing in the late 1970s. It features a 20-bit address bus (٢٠-بٹ ایڈریس بس), enabling it to address 1 MB (١ ایم بی) of memory. The architecture includes a powerful set of instructions (ہدایات), supports segmented memory (حصہ دار میموری) for better management, and incorporates an instruction queue (انسٹرکشن قیو) for faster processing. It also features separate data and address lines (الگ ڈیٹا اور ایڈریس لائنیں), enhancing performance and multitasking capabilities, and supports both minimum and maximum mode operations (کم سے کم اور زیادہ سے زیادہ موڈ آپریشنز) for flexible system configurations.

Question 2: Explain the function of following pins of 8085 processor (4 marks)

Detail:
i. ALE (Address Latch Enable) (ایڈریس لیچ اینیبل): The ALE pin is used to demultiplex (ڈی مالٹی پلیکس - مختلف حصوں میں تقسیم کرنا) the address-data bus. It signals when the address bus (ایڈریس بس) is carrying valid address information, allowing the connected latch to capture and hold this address for memory operations.

ii. HOLD (ہولڈ): The HOLD pin is used by external devices to gain control of the bus. When an external device wants to take over the system bus, it sends a HOLD signal (ہولڈ سگنل) to the processor. The processor completes its current cycle and then grants the bus by asserting the HLDA (Hold Acknowledge) signal (ہولڈ اکناولیج سگنل).

iii. HLDA (Hold Acknowledge) (ہولڈ اکناولیج): The HLDA pin indicates that the processor has received a HOLD request and has relinquished (چھوڑ دینا) control of the bus. The external device can then control the bus until the HOLD signal is deasserted (غیر فعال کرنا).

Question 3: Given SS: 3450H; SP: 2A56H, calculate the physical address. (4 marks)

Detail:
To calculate the physical address (فزیکل ایڈریس) in the 8086 microprocessor, we use the formula: Physical Address = Segment Address * 10H + Offset. Here, the Stack Segment (SS) (سٹیک سیگمنٹ) is 3450H and the Stack Pointer (SP) (سٹیک پوائنٹر) is 2A56H.

1. Convert SS to a 20-bit segment address (٢٠-بٹ سیگمنٹ ایڈریس): 3450H * 10H = 34500H.
2. Add the SP offset: 34500H + 2A56H = 36F56H.

Thus, the physical address is 36F56H.

Question 4: List any 2 addressing modes with example. Identify the addressing mode of the instruction MOV AL, [SI] (4 marks)

Detail:
Addressing Modes (ایڈریسنگ موڈز):

1. Immediate Addressing Mode (فوری ایڈریسنگ موڈ): The operand is specified directly in the instruction. Example: MOV AL, 34H (moves the immediate value 34H into AL).
2. Direct Addressing Mode (براہ راست ایڈریسنگ موڈ): The effective address of the operand is given directly in the instruction. Example: MOV AX, [1234H] (moves the contents of memory location 1234H into AX).

MOV AL, [SI]: This instruction uses the Register Indirect Addressing Mode (رجسٹر انڈائریکٹ ایڈریسنگ موڈ). Here, the address of the operand is specified in the SI register (ایس آئی رجسٹر).

Question 5: Draw the internal architecture of 8086. (4 marks)

Detail:
The internal architecture (اندرونی ساخت) of the 8086 microprocessor includes several key components:

- Bus Interface Unit (BIU) (بس انٹرفیس یونٹ): Handles all data and address transfers on the buses. It includes the instruction queue (انسٹرکشن قیو), segment registers (سیگمنٹ رجسٹرز), and address adder (ایڈریس ایڈر).
- Execution Unit (EU) (عملیاتی یونٹ): Executes instructions from the instruction queue. It includes the ALU (اریته میٹک لاجک یونٹ), general-purpose registers (عام مقصد رجسٹرز), and the control unit (کنٹرول یونٹ).
- Segment Registers (سیگمنٹ رجسٹر): CS (کوڈ سیگمنٹ), DS (ڈیٹا سیگمنٹ), SS (سٹیک سیگمنٹ), ES (ایکسٹرا سیگمنٹ) for segment addressing.
- Instruction Queue (انسٹرکشن قیو): Prefetches up to six bytes of instructions for faster execution.
- Control Unit (کنٹرول یونٹ): Manages the execution of instructions.

Question 6: Explain memory segmentation in 8086. (4 marks)

Detail:
Memory segmentation (میموری سیگمنٹیشن) in the 8086 microprocessor divides the memory into segments to enhance the efficiency and flexibility of data access. Each segment can be up to 64KB (٦٤ کلو بائٹس), and there are four main types of segments: Code Segment (CS) (کوڈ سیگمنٹ), Data Segment (DS) (ڈیٹا سیگمنٹ), Stack Segment (SS) (سٹیک سیگمنٹ), and Extra Segment (ES) (اضافی سیگمنٹ). Segments are addressed using segment registers (سیگمنٹ رجسٹرز) and offsets (آفسیٹس), which are combined to form a physical address (فزیکل ایڈریس). This approach allows for modular (ماڈیولر) program design, easier memory management (آسان میموری مینجمنٹ), and efficient utilization of memory (موثر میموری کا استعمال).

Question

Question 7: Difference between minimum mode and maximum mode. (4 marks)

Detail:
Minimum Mode (کم سے کم موڈ):

Maximum Mode (زیادہ سے زیادہ موڈ):

Question 8: Draw the flag register of 8086. Explain any 2 control flags. (4 marks)

Detail:
The 8086 flag register (٨٠٨٦ فلیگ رجسٹر) consists of 16 bits (١٦ بٹس) and includes status (حالت), control (کنٹرول), and system flags (سسٹم فلیگز). Key control flags include:

1. Direction Flag (DF) (ڈائریکشن فلیگ): Determines the direction of string operations (سٹرنگ آپریشنز). When set, string operations process data from higher to lower memory addresses (اعلی سے کم میموری پتوں تک).

2. Interrupt Flag (IF) (انٹرپٹ فلیگ): Controls the enabling and disabling of interrupts (رکاوٹیں). When set, the processor responds to maskable interrupts (ماسک کرنے کے قابل رکاوٹیں); when cleared, it ignores them.

Question 9: Draw the timing diagram of maximum mode memory read cycle. (4 marks)

Detail:
In maximum mode (زیادہ سے زیادہ موڈ), the 8086 microprocessor involves external bus controllers for managing the timing of memory read cycles. The timing diagram (ٹائمنگ ڈایاگرام) includes: