Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- org 100h
- Start:
- push Arr
- call GetCount
- mov ah, 02h
- mov dl, al
- add dl, '0'
- int 21h
- mov ah, 08h
- int 21h
- GetCount:
- .prolog:
- push bp
- mov bp, sp
- sub sp, 0
- .searching:
- mov di, [bp+4]
- movzx cx, byte[di]
- xor ax, ax
- @@:
- inc di
- and byte[di], 1100'0000b
- cmp byte[di], 1100'0000b
- jne .next
- inc ax
- .next:
- loop @B
- .epilog:
- mov sp, bp
- pop bp
- ret 2
- Arr db 8, 1100'0000b, 6, 3, 8, 4 dup(1111'1111b)
- Num dw 3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement