Title MS-DOS Example (DOS1-3.ASM) ; Problem statement: ;Write a program that inputs a string of characters ;(using a loop) and stores each character in an array. ;Redisplay the array at the end of the program. INCLUDE Irvine16.inc .data COUNT = 20 charArray db COUNT dup(0),0 .code main proc mov ax,@data mov ds,ax mov si,offset charArray mov cx,COUNT L1: mov ah,1 ; input character with echo int 21h ; AL = character mov [si],al ; save in array inc si ; next array position Loop L1 ; repeat loop ; Redisplay the array on the screen call Crlf ; start new line mov si,offset charArray mov cx,COUNT L2: mov ah,2 ; character output mov dl,[si] ; get char from array int 21h ; display the character inc si Loop L2 call Crlf exit main endp end main