Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data segment
- arr1 DB 1,2,3,4,5,1,2,3
- arr2 DB 8 dup (0)
- ends
- stack segment
- dw 128 dup(0)
- ends
- code segment
- start:
- mov ax, data
- mov ds, ax
- mov es, ax
- mov si,0
- mov di,0
- mov bx,0
- mov cx,8
- looper:
- mov di, 0
- mov al, arr1[si]
- scan:
- cmp al, arr2[di]
- je foundscan
- inc di
- cmp di, 8
- jne scan
- mov arr2[bx], al
- inc bx
- foundscan:
- inc si
- cmp si, 8
- jne looper
- ends
- end start
Advertisement
Add Comment
Please, Sign In to add comment