Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

push instruction in 8086 ..pls help!!

Status
Not open for further replies.

electroboy

Member level 5
Joined
Dec 30, 2010
Messages
86
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,879
what does the instruction PUSH [BP] do actually?
i thought the content(byte) of SS:(BP+1) will move to SS:(SP-1) and the content(byte) of SS:BP will move to SS:(SP-2)....
but i tried it in an emulator and did not get the expected result... pls explain me.. thanks in advance...
 

by using push [BP] ,the contents to which the base pointer is pointing will be pushed onto the stack and NOT bp....so the higher byte of the CONTENTS of bp will be pushed to sp-1 and the lower byte to sp-2....
 
If you read the post thoroughly, it seems that the original poster did understand this.
 

Exactly as you said [memory changes] + the value of SP will be decreased by 2 [Register Changes]
Check if there's an empty place in your stack segment (view the memory in the emulator and notice byte by byte change in this section of code if possible) , check if there's any segments overlap done by mistake .... Through these steps, you'll surely figure where's the problem ...
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top