Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .stack 100h
- .model small
- .data
- arr dw 1, 2, 4, 5, 6
- newarr dw 6(?)
- .code
- main proc
- mov ax, @data
- mov ds,ax
- mov es, ax
- ;coping to new array
- lea si, arr
- lea di, newarr
- cld
- mov cx, 5
- rep movsw
- ;now move value like before
- std
- lea si, newarr+8
- lea di, newarr+10
- mov cx,3
- rep movsw
- mov word ptr [di], 3
- mov cx, 6
- xor si, si
- ;print new array
- lop2:
- mov dx,newarr[si]
- add dx,48
- mov ah,2
- int 21h
- add si,2
- loop lop2
- main endp
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement