Logo 
Search:

Assembly Language Articles

Submit Article
Home » Articles » Assembly Language » Homework HelpRSS Feeds

Program to print the digits 0, 1… 9

Posted By: Maya Hughes     Category: Assembly Language     Views: 19476

Write a program to print the digits 0, 1… 9.

Code for Program to print the digits 0, 1… 9 in Assembly Language

DATA SEGMENT
DATA ENDS
CODE SEGMENT
        ASSUME DS:DATA,CS:CODE
        START :
                MOV AX,DATA
                MOV DS,AX

        MOV BL,00H
        MOV CH,00H
        MOV CL,0AH
        
        
    L1   :  MOV DH,00H
        MOV DL,BL
        ADD DL,'0'
        MOV AH,02H
        INT 21H
        INC BL
        LOOP L1
    
                MOV AH,4CH
                INT 21H
CODE ENDS
        END START

;------
;OUTPUT
;------

;    0123456789
  
Share: 


Didn't find what you were looking for? Find more on Program to print the digits 0, 1… 9 Or get search suggestion and latest updates.

Maya Hughes
Maya Hughes author of Program to print the digits 0, 1… 9 is from London, United Kingdom.
 
View All Articles

Related Articles and Code:


 

Other Interesting Articles in Assembly Language:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
Canezgi Aydemir from Turkey Comment on: Dec 18
its complicate. That's new version under the text.


org 100h

mov cx, 10
mov dl, '0' ;move 'dl' is zero
start:
mov ah, 02H
int 21H ;print dl in dos screen
inc dl ;next number
loop start ;go to start

ret ;finish





View All Comments