loading...

Display list of alphabets using assembly language program

The following is code which displays list of alphabets using assembly language program.

 
DATA SEGMENT
m1 db 10,13,”Here is the list of alphabets $ “
m2 db 10,13,”$”
Data ends
CODE SEGMENT
assumer      cs:code,ds:data
Main:        mov ax,data
             mov ds,ax
             mov bl,’A’
             mov cl,1a
             mov ah,09h
             lea dx,m1
             int 21h
             mov ah,09h
             lea dx,m2
             int 21h
Up:          mov ah,02h
             mov dl,bl
             int 21h
             mov ah,02h
             mov dl,’ ‘
             int 21h
             inc bl
             dec cl
             jnz up
             mov ah,4ch
             int 21h
             code ends
             end main



The output of the above code is –

 
Output:
-g=0000 002D
Here is the list of alphabets
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Ax=4C20 Bx=0058 Cx=0000 Dx=0020

Also read:  How to avoid overheating problems on android device?

0 4

Leave a Reply

Your email address will not be published.