ASSUME CS:CODE, DS:DATA, ES:EXTRA
DATA SEGMeNT
ORG 8000H
STRING1 DB 'AKASH'
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
CLD
REP MOVSB
MOV AH, 4CH
INT 21H
CODE ENDS
END START
you need enter the address of extra segment as ES:9000h in dump window by pressing ctrl+g to view output
DATA SEGMeNT
ORG 8000H
STRING1 DB 'AKASH'
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
CLD
REP MOVSB
MOV AH, 4CH
INT 21H
CODE ENDS
END START
you need enter the address of extra segment as ES:9000h in dump window by pressing ctrl+g to view output
No comments:
Post a Comment