xFunKy

2008/8

May 8th, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. data segment
  2.  
  3. ends
  4.  
  5. stack segment
  6.     dw   128  dup(0)
  7. ends
  8.  
  9. code segment
  10. start:
  11.     mov ax, data
  12.     mov ds, ax
  13.     mov es, ax
  14.  
  15.     mov ax, 110110010110110b
  16.     mov dx, ax
  17.     mov cx, 13
  18.     mov bl, 0
  19.     count:
  20.         push dx
  21.         and dx, 1011b
  22.         cmp dx, 1011b
  23.         jnz no
  24.         yes:
  25.         inc bl
  26.         no:
  27.         pop dx
  28.         shr dx, 1
  29.     loop count
  30. ends
  31.  
  32. end start
Advertisement
Add Comment
Please, Sign In to add comment