# 8086 programming problem



## gaurav9991 (Nov 30, 2010)

In 8086 CPU the following register contents are

CS:4100H DS:A000H BX:0350H IP:0100H

The 8086 fetches the following instruction using above register

MOV [BX] , AX

1) Which is the memory address from where the instruction is fetched?

2)Which is the memory address where the data that is in AX is stored?


----------



## pulkitpopli2004 (Nov 30, 2010)

as far as i remember

1. instruction will be fetched from the address present in instruction pointer IP i.e eq to 0100H

2. And AX will be stored at address 0350H


----------



## gaurav9991 (Dec 1, 2010)

pulkitpopli2004 said:


> as far as i remember
> 
> 1. instruction will be fetched from the address present in instruction pointer IP i.e eq to 0100H
> 
> 2. And AX will be stored at address 0350H



i am agree with you for the first answer but for second indirect addressing mode is used. Had it been MOV A,B then it would be 035H
am i correct ?


----------



## pulkitpopli2004 (Dec 2, 2010)

well [BX] tells that the the value of the AX will be stored not in BX bt at the address of BX..
and address of BX is 0350H.. so i think this wud b d only solution


----------



## silent008 (Dec 19, 2010)

gaurav9991 said:


> In 8086 CPU the following register contents are
> 
> CS:4100H DS:A000H BX:0350H IP:0100H
> 
> ...



I believe that the instructions are fetched from 4200H and the data is stored in A350H.


----------



## Jerin (Jan 6, 2011)

I think it is 4200 high order address.


----------

