xFunKy

2009/7

May 8th, 2012
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. data segment
  2.     arr1 DB 36 dup (?)
  3.     arr2 DB 36 dup (?)
  4. ends
  5.  
  6. stack segment
  7.     dw   128  dup(0)
  8. ends
  9.  
  10. code segment
  11. start:
  12.     mov ax, data
  13.     mov ds, ax
  14.     mov es, ax
  15.  
  16. mov si,0
  17. mov di,0
  18. mov bx,0
  19. mov cx,36
  20.  
  21. looper:
  22.     mov di, 0
  23.     mov al, arr1[si]
  24.     scan:
  25.         cmp al, arr2[di]
  26.         je foundscan
  27.         inc di
  28.         cmp di, 36
  29.         jne scan
  30.     mov arr2[bx], al
  31.     inc bx
  32.     foundscan:
  33.     inc si
  34.     cmp si, 36
  35. jne looper
  36. ends
  37.  
  38. end start
Advertisement
Add Comment
Please, Sign In to add comment