2. Name :
Ms. Nasrin Akter
Designation
Lecturer
Department
Department of Computer Science and Engineering
Faculty
Faculty of Science and Information Technology
E-mail
nasrin.cse@diu.edu.bd
10. The Stack
The stack segment of a program is used for temporary storage of data
and addresses. The item are added and removed from one end of the
structure, and the processed in a “last-in, first-out”.
Represent an example of a procedure that performs binary multiplication
by bit shifting and adding.
12. The stack
The preceding stack declaration, SP.
The stack pointer is initialized to 0100h.
It is empty stack.
When it is not empty, it contains the
offset address of the top of the stack.
15. .model small
.stack 100h
.data
main proc
mov ah,1
int 21h
push ax
mov ah,1
int 21h
push ax
mov ah,1
int 21h
push ax
mov ah,1
int 21h
push ax
mov ah,1
int 21h
push ax
mov ah,1
int 21h
push ax
mov ah,1
int 21h
push ax
mov ah,1
int 21h
push ax
mov ah,1
int 21h
push ax
mov ah,1
int 21h
push ax
16. pop bx
mov ah,2
mov dl,0dh
int 21h
mov dl,0ah
int 21h
mov dx,bx
int 21h
pop bx
mov ah,2
mov dx,bx
int 21h
pop bx
mov ah,2
mov dx,bx
int 21h
pop bx
mov ah,2
mov dx,bx
int 21h
pop bx
mov ah,2
mov dx,bx
int 21h
pop bx
mov ah,2
mov dx,bx
int 21h
pop bx
mov ah,2
mov dx,bx
int 21h
pop bx
mov ah,2
mov dx,bx
int 21h
pop bx
mov ah,2
mov dx,bx
int 21h
mov ah,4ch
int 21h
main endp