Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .data
- s: .asciz "%llu\n"
- .text
- .global mystrspn
- mystrspn:
- pushl %ebp
- movl %esp, %ebp
- pushl %ebx
- pushl %edi
- pushl %esi
- movl 8(%ebp), %eax
- movl 12(%ebp), %ebx
- movl $0, %ecx
- Loop1:
- movzbl (%eax), %edx
- cmpl $0, %edx
- jz end
- movl 12(%ebp), %ebx
- Loop2:
- movzbl (%ebx), %esi
- cmpl $0, %esi
- jz end
- cmpl %edx, %esi
- jz next_letter
- incl %ebx
- jmp Loop2
- next_letter:
- incl %ecx
- incl %eax
- jmp Loop1
- end:
- movl %ecx, %eax
- popl %esi
- popl %edi
- popl %ebx
- popl %ebp
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement