This my code;
org 100h
mov cx,5
loop1:
call DISPLAY
dec cx
cmp cx,0
ja loop1
jmp Exit
DISPLAY proc
MOV AH,09
MOV DX, offset SCREEN
INT 21h
RET
DISPLAY ENDP
Exit:
ret
SCREEN DB 'Number 1','$'
This code is gonna display five times 'Number1' but I want to print the screen in the following way;
Number 1
Number 2
Number 3
Number 4
Number 5
How do I do this??
Thank you everyone!!!
You can concatenate the char value of line number with your main message :
Edited:
This is a more general form that is like
printf
function and support%d
and%s
(Although this code may be unsafe!):