Advertisement
THOMAS_SHELBY_18

2

May 24th, 2024
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. org 100h
  2. Start:
  3. push Arr
  4. call GetCount
  5.  
  6. mov ah, 02h
  7. mov dl, al
  8. add dl, '0'
  9. int 21h
  10.  
  11. mov ah, 08h
  12. int 21h
  13.  
  14.  
  15. GetCount:
  16. .prolog:
  17. push bp
  18. mov bp, sp
  19. sub sp, 0
  20. .searching:
  21. mov di, [bp+4]
  22. movzx cx, byte[di]
  23. xor ax, ax
  24. @@:
  25. inc di
  26. and byte[di], 1100'0000b
  27. cmp byte[di], 1100'0000b
  28. jne .next
  29. inc ax
  30. .next:
  31. loop @B
  32.  
  33. .epilog:
  34. mov sp, bp
  35. pop bp
  36. ret 2
  37.  
  38. Arr db 8, 1100'0000b, 6, 3, 8, 4 dup(1111'1111b)
  39. Num dw 3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement