hi guys i use tasm and I want to have an assembly program that gets user input and the program will provide the output. My desired program is when a user inputs 3 it will output asterisks just like this
input: 3
output: *
**
***
i found this code on web but it has got code errors.
.model small
data segment
num db "ENTER A NUMBER : $"
line db 10,13
.code
start:
mov ax,@data
mov ds,ax
lea dx,num
mov ah,09h
int 21h
call scan_num
push cx
mov ah, 02
cmp cl, 0
je exit
mov dl,10
int 21h
mov dl, 13
int 21h
mov dl, 2Ah
mov bl, 01
mov bh, 02
push bx
initial:
int 21h
cmp bl,cl
je exit
inc bl
cmp bl,bh
jne initial
pop bx
push dx
mov dl,10
int 21h
mov dl, 13
int 21h
add bh, 1
pop dx
push bx
jmp initial
exit:
int 20h
ends
DEFINE_SCAN_NUM
DEFINE_PRINT_NUM
DEFINE_PRINT_NUM_UNS
end start