Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- org 100h
- use16
- Start:
- push array
- push eleme
- call Counter
- ; count of elms in AX
- ret
- Counter:
- push BP
- mov BP, SP
- mov DI, [BP + 6]
- mov BX, [BP + 4]
- mov DX, [BX]
- mov AX, 0
- mov CX, length
- Searching:
- cmp DL, byte[DI]
- jbe CheckNext
- inc AX
- CheckNext:
- inc DI
- loop Searching
- pop BP
- ret 4
- array db 2, 5, 6, 2, 8, 12, 45, 0, 1, 4, 7, 2
- length = $ - array
- eleme db 5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement