Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .intel_syntax noprefix
- .globl main
- .text
- main:
- xor edx,edx
- mov eax, offset messg
- push eax
- call znajdz
- add esp,4
- push eax
- mov eax, offset printf_arg1
- push eax
- call printf
- add esp , 8
- exit:
- mov eax,0
- ret
- znajdz:
- mov bl,[eax]
- inc eax
- cmp bl,'*'
- je koniec
- cmp bl,0
- je zero
- inc edx
- jmp znajdz
- koniec:
- mov eax,edx
- ret
- zero:
- ;#pop ecx
- mov eax,-1
- ret
- .data
- messg: .asciz "Prz*ykladowy *tekst"
- printf_arg1: .asciz "%i"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement