What's the physical consequence of PUSH to a FULL stack Amazingly When allocating only 2 bytes [1 word] for the stack and PUSH three words then pop them into different registers ,it's done without any errors What could I say about the stack contents when PUSHing the second item
Here's the stack segment definition :
Stack_segment_name segment para stack
db 2 dup(0) ;define your stack segment
Stack_segment_name ends
Here's the code :
Code_segment_name segment
Main_prog PROC FAR
assume SS:Stack_segment_name,CS:Code_segment_name,DS:Data_segment_name,ES:Data_segment_name
MOV AX,Data_segment_name ; load the starting address of the data
MOV DS,AX ; segment into DS reg.
MOV AX,1715H
MOV BX,1518H
MOV CX,2944H
PUSH AX
PUSH BX
PUSH CX
POP SI
POP DI
POP DX
MOV AH,4CH
INT 21H
Main_prog endp
Code_segment_name ends
end Main_prog
After Executing the code:
SI=2944H
DI=1518H
DX=1715H