ASSUME CS:CODE, DS:DATA, ES:data
DATA SEGMeNT
ORG 8000H
STRING1 DB 'balaram'
LENGTH_STRING1 EQU $-STRING1
data ends
EXTRA SEGMENT
ORG 9000H
STRING2 DB 50D DUP(0H)
EXTRA ENDS
CODE SEGMENT
START: MOV AX, DATA
MOV DS, AX
MOV AX, EXTRA
MOV ES, AX
lea SI, string1
lea DI, string2
MOV CX, LENGTH_STRING1
add di, LENGTH_STRING1-1
CLD
go: MOVSB
dec di
dec di
dec cx
jnz go
mov ah, 4ch
int 21h
CODE ENDS
END START
DATA SEGMeNT
ORG 8000H
STRING1 DB 'balaram'
LENGTH_STRING1 EQU $-STRING1
data ends
EXTRA SEGMENT
ORG 9000H
STRING2 DB 50D DUP(0H)
EXTRA ENDS
CODE SEGMENT
START: MOV AX, DATA
MOV DS, AX
MOV AX, EXTRA
MOV ES, AX
lea SI, string1
lea DI, string2
MOV CX, LENGTH_STRING1
add di, LENGTH_STRING1-1
CLD
go: MOVSB
dec di
dec di
dec cx
jnz go
mov ah, 4ch
int 21h
CODE ENDS
END START
No comments:
Post a Comment