8086 Microprocessor Assignment Guide
8086 Microprocessor Assignment Guide
During a memory read in the 8088: - T1: The processor sends out the address along the address lines and activates the Address Latch Enable (ALE). - T2: The read signal is asserted, and the address is latched onto the bus. - T3: Wait for the data to become stable on the data bus. - T4: The data is read into the processor. Each step ensures accurate data transfer from memory to the processor .
To calculate the physical addresses: For CS = 1200H, IP = 0040H: The segment base is 1200H << 4 = 12000H. Adding the IP offset: 12000H + 0040H = 12040H. For DS = 0F30H, SI = 0020H: The segment base is 0F30H << 4 = 0F300H. Adding the SI offset: 0F300H + 0020H = 0F320H. For SS = 2000H, SP = FFF0H: The segment base is 2000H << 4 = 20000H. Adding the SP offset: 20000H + FFF0H = 2FFF0H .
Each segment in the 8086 can address up to 64 KB; 10 segments of 64 KB each would theoretically use 640 KB. However, due to segmentation, segments can overlap. Overlap occurs because the segment base can be adjusted, allowing segments to share overlapping memory blocks. This is possible since segment registers only provide a 16-bit base that is shifted, potentially causing different segments to map to the same physical address space when the total memory addressed exceeds 1 MB .
The 8088 microprocessor pins are classified based on functionality: - Address pins are used for addressing memory locations. - Data pins handle the data bus for bidirectional data flow between the processor and memory or peripherals. - Control pins manage signals used for coordinating operations like read/write and interrupt controls. - Power pins provide the necessary power supply to the microprocessor .
The 8086 microprocessor uses segmentation to access 1 MB of memory despite having only 16-bit registers. Segmentation divides memory into segments; each segment has a base address stored in one of the segment registers (CS, DS, SS, ES). The segment register holds the upper 16 bits of the 20-bit address, which is shifted left by 4 bits to create a 20-bit segment base address. An offset value is then added to this base address to form the physical address. For instance, if the segment register is 1200H, the base address becomes 12000H. With an offset of 0040H, the physical address is 12000H + 0040H = 12040H. This segmentation allows the combination of various segments and offsets to cover a larger address space than possible with a single 16-bit address .
To write an 8086 assembly program that adds two 16-bit numbers stored at addresses 1000H and 1002H and stores the result at 1004H: 1. MOV AX, [1000H] - Load the first number into the AX register. 2. ADD AX, [1002H] - Add the second number directly to the AX register, storing the result in AX. 3. MOV [1004H], AX - Move the result from AX to memory address 1004H. Each instruction manipulates data between registers and memory: MOV transfers data, and ADD performs arithmetic within the register .
For the effective address calculation: Effective address (EA) is calculated as BX + SI + offset = 0100H + 0200H + 25H = 0325H. Physical address is computed by adding the data segment (DS) base: DS = 3000H, so base = 30000H. Full physical address = 30000H + 0325H = 30325H .