You are on page 1of 2

Program 1

;Title:print name
.model small ;total amount of memory that a program will take
.stack 100h ; specifies the stroge stack
.data ;variable are define
.code ;code segment directive

main proc

mov ah,2
mov dl,'a'
int 21h

mov ah,2
mov dl,'m'
int 21h

mov ah,2
mov dl,'j'
int 21h

mov ah,2
mov dl,'a'
int 21h

mov ah,2
mov dl,'d'
int 21h

mov ah,4ch
int 21
Main endp
End Main

Program 2

;Title take input from user


.model small ;total amount of memory that a program will take
.stack 100h ; specifies the stroge stack
.data ;variable are define
.code ;code segment directive

main proc

mov ah,8

int 21h

mov dl,al
mov ah,2
int 21h

mov ah,4ch
int 21
Main endp
End Main
Program 3
;Title:print adding 2 numbers
.model small ;total amount of memory that a program will take
.stack 100h ; specifies the stroge stack
.data ;variable are define
.code ;code segment directive

main proc
mov bl,2
mov cl,3
add bl,cl
add bl,30h
mov dl,bl
mov ah,2
int 21h

mov ah,4ch
int 21
Main endp
End Main

Program 4

;Title: to printa String


.model small ;total amount of memory that a program will take
.stack 100h ; specifies the stroge stack
.data ;variable are define
string DB 'this is a demo program','$'
.code ;code segment directive

main proc
mov ax,@data
mov ds,ax
lea dx,string
mov ah,9
int 21h

mov ah,4ch
int 21
Main endp
End Main

You might also like