Friday, April 13, 2012

String transefer in forward direction using 8086

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

No comments:

Post a Comment

DC motor control with Pulse Width Modulation Part 1

DC Motor intro DC motor is a device which converts electrical energy into kinetic energy. It converts the DC power into movement. The typica...