Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .686
- PUBLIC @Function1@12
- .model flat
- .stack
- .code
- @Function1@12 proc
- push ebp
- mov ebp, esp
- mov esi, [ebp + 8] ;адрес b
- mov edi, ecx ;size маленького
- mov ecx, 1
- shl ecx, 16 ;2^16 = size
- cycle1:
- mov word ptr[esi + 2 * ecx - 2], 0 ;0 в b
- loop cycle1
- mov eax, 0
- mov ecx, edi
- cycle2:
- mov ax, word ptr[edx + 2 * ecx - 2] ;edx=a
- inc word ptr[esi + 2 * eax] ;переход по адресу
- loop cycle2
- mov eax, 0
- mov ecx, 1
- shl ecx, 16 ;сдвиг -> размер
- cycle3:
- mov bx, word ptr[esi + 2 * ecx - 2] ;значение по индексу
- test bx, bx
- jz no_instances ;нет вхождений
- inc eax
- no_instances:
- loop cycle3
- pop ebp
- ret 4
- @Function1@12 endp
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement