0% found this document useful (0 votes)
910 views3 pages

.Model Small .STACK 100H .Data .Code Main Proc Mov Ax,@Data Mov DS, Ax

This program takes a single digit numeric input from the user, subtracts 48 from it to get the value, and prints out that value by looping from 1 to the input value, displaying each number. It prints a newline after each number, and again after the full sequence is output before terminating the program.

Uploaded by

Kh Sobi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
910 views3 pages

.Model Small .STACK 100H .Data .Code Main Proc Mov Ax,@Data Mov DS, Ax

This program takes a single digit numeric input from the user, subtracts 48 from it to get the value, and prints out that value by looping from 1 to the input value, displaying each number. It prints a newline after each number, and again after the full sequence is output before terminating the program.

Uploaded by

Kh Sobi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 3

.

MODEL SMALL

.STACK 100H

.DATA

.CODE

MAIN PROC

MOV AX,@DATA

MOV DS,AX

MOV AH,1

INT 21H

MOV CL,AL

SUB CL,48

MOV DL,10

MOV AH,2

INT 21H

MOV DL,13

MOV AH,2

INT 21H

MOV BX,1

I1:
POP CX

MOV CX,BX

I2:

MOV DX,BX

ADD DX,48

MOV AH,2

INT 21H

LOOP I2

MOV DL,10

MOV AH,2

INT 21H

MOV DL,13

MOV AH,2

INT 21H

INC BL

PUSH CX
LOOP I1

ENDOFLOOP:

MOV AH,4CH

INT 21H

MAIN ENDP

END MAIN

You might also like