what does the instruction PUSH [BP] do actually?
i thought the content(byte) of SSBP+1) will move to SSSP-1) and the content(byte) of SS:BP will move to SSSP-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....
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 ...