help for a friend..

hi can some1 help for a simple program, its just that a friend ask me to find a code for a problem.

the problem is: an assembly code that will move the contents of memory block 1 (C100H to C120H) to memory block 2 (C150H to C170H). This means that the contents of C100H will move to location C150H and overwrite them and so on. After executing the program, the contents of two blocks should be the same.

my friend says its just a simple program but he doesnt know how to code it so if some1 can help please do. Thanks.

Comments

  • Hi
    I don't really see the use of such program but here it is how I would write it

    mov si,0c100 ; beginning of your code
    mov di,0c150 ; destination of your code
    mov cx,20h ; how many bytes

    Label:
    mov ax,[si]
    mov [di],ax
    inc si
    inc di
    loop Label



    Oliver!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion