Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .data
- str: .int 8
- lng: .int 12
- .text
- .global _mystrspn
- _mystrspn:
- push %ebp
- movl %esp, %ebp
- push %esi // Счетчик
- movl $0, %esi
- movl str(%ebp), %ecx // Строка
- movl lng(%ebp), %edx // Язык
- while:
- mov (%ecx), %eax
- test %eax, %eax
- jz end
- mov (%edx), %ebx
- test %ebx, %ebx
- jz end
- cmp %eax, %ebx
- jz if
- addl $1, %edx
- jmp while
- if:
- addl $1, %esi
- addl $1, %ecx
- movl lng(%ebp), %edx
- jmp while
- end:
- movl %esi, %eax
- pop %esi
- movl %ebp, %esp
- pop %ebp
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement