Sunday, 29 October 2017

TRANSFER DATA FROM DATA SEGMENT TO EXTRA SEGMENT USING ALP (MP)

data segment
arr1 dw 1111h,2222h,3333h,4444h
data ends

extra segment
arr2 dw 05 dup(?)
extra ends

code segment
assume cs:code,ds:data,es:extra
start:
mov ax,data
mov ds,ax
mov ax,extra
mov es,ax
lea si,arr1
lea di,arr2
mov cx,04

up:
mov ax,[si]
mov es:[di],ax
inc si
inc si
inc di
inc di
loop up

int 03h
code ends

end start

No comments:

Post a Comment