See if this helps.
declared in dseg: InitialString DB 100 DUP(?)
My main code:
;-- Locate data segment I was using MASM directive .Data
mov ax, @data
mov ds, ax
mov si, 0
ReadString:
MOV bx, OFFSET InitialString
MOV [bx+si], al ;store string
;-- move Int 21h call
MOV AH, 01
INT 21H
inc si
CMP al,0DH ;check for carriage return
JE EXIT
jmp ReadString
EXIT:
mov si, 1
mov cx, 63h
PrintString:
MOV ah, 02
MOV bx, OFFSET InitialString
mov dl, [bx+si]
int 21h
inc si
;-- dec cx not needed.
loop PrintString
MarkRR
Main Topics
Browse All Topics





by: dimitryPosted on 2006-11-30 at 21:56:41ID: 18051681
mov si, 0
mov cx, 100
PrintString:
MOV ah, 02
MOV bx, OFFSET InitialString
mov dl, [bx+si]
int 21h
inc si
;;;;;;;;dec cx <- this is part of loop operator
loop PrintString