In 8086 assembly language, a physical address is the actual memory address used by the CPU to access data. It is calculated by combining a segment address with an offset address. The segment address is typically stored in one of the segment registers (CS, DS, SS, or ES), and the offset is specified in the instruction. The formula for calculating the physical address is: Physical Address = (Segment Address × 16) + Offset.
Physical address in the 8086/8088 is {Selected Segment Register} * 16 + {Effective Offset Address}. It is a 20-bit address .
The Instruction Pointer (IP) in an 8086 microprocessor contains the address of the next instruction to be executed. The processor uses IP to request memory data from the Bus Interface Unit, and then increments it by the size of the instruction.
There is no PC register in the 8086/8088. It is called the IP register by Intel and it stands for the Instruction Pointer. It contains the address of the current/next instruction to be executed.
program counter holds the address of the next instruction.
In 8086 the instruction queue is 6 byte long. This is because even the longest 8086 instruction is 6 byte long. Thus it is possible to prefetch even the longest instruction in the instruction set.
Effective address is the final address generated by offsetting and indexing which is sent to the virtual translation logic. It is the address of the operand in the virtual address space of the process, but not necessarily the address of the operand in the physical address space of the computer. In the 8085, efffective/virtual address is the same as physical address, because there is no virtual addressing logic in the 8085. In the 8086/8088, effective/virtual address is the same as physical address, but only in real mode. For example, in the 8086/8088, if the EBX register contains 1000000H, then the instruction MOV EAX,[EBX+1234H] has an effective address of 10001234H.
In 8085 program counter stores the address of the next instruction which is to be fecthed.same function is performed by instruction pointer in 8086.
What is the need of segments in 8086 micro-processor? Explain how the address of an instruction is calculated in 8086 using segment register
You need an 8086 assembly language pencil.
The physical address in the 8086/8088 is calculated by adding the effective address with the contents of one of the segment registers left shifted by 4 bit positions. This results in a 20 bit address bus. As an example, if the CS register contains 1234H, and the IP register contains 5678H, then the next instruction is fetched from physical address 179B8H, which is 1234H times 16 (12340H) plus 5678H. The segment register used is selected by context, or by using a segment override prefix, however, the code segment register (CS) can not be overidden during instruction fetch, nor can the stack segment register (SS) be overidden during stack pushes and pops.
IRET
In the 8086 microprocessor, the register that stores the interrupt and subroutine return address is the Instruction Pointer (IP) register. When an interrupt occurs or a subroutine is called, the current instruction address is pushed onto the stack, allowing the processor to return to that location after the interrupt or subroutine execution is complete. The IP register works in conjunction with the Code Segment (CS) register to determine the effective address of the next instruction to execute.