SHARE
TWEET

Untitled

a guest Jan 22nd, 2020 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .intel_syntax noprefix
  2. .text
  3. .global main
  4.     main:
  5.         mov eax, offset messg
  6.         push eax
  7.         call znajdz
  8.         add esp, 4
  9.         push eax
  10.         mov eax, offset printf_arg1
  11.         push eax
  12.         call printf
  13.         add esp, 8
  14.     exit:
  15.         mov eax, 0
  16.         ret
  17.     znajdz:
  18.         mov eax, [esp + 4];
  19.         szukaj:
  20.             mov dl, [eax];
  21.             cmp dl, '*'
  22.             je koniec;
  23.             cmp dl, 0
  24.             je koniec_bez
  25.             inc eax
  26.             jmp szukaj
  27.         koniec_bez:
  28.             mov eax, -1
  29.             ret
  30.         koniec:
  31.             sub eax, [esp + 4]
  32.             ret;            
  33.            
  34.  
  35. .data
  36.     messg:
  37.         .asciz "Prz*ykladowy_*tekst"
  38.     printf_arg1:
  39.         .asciz "%i\n"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top