Advertisement
joker546645

as3

Dec 30th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .686
  2. .model flat
  3. public _komunikat
  4. extern _malloc : PROC
  5. .data
  6. .code
  7. _komunikat PROC
  8.     push ebp
  9.     mov ebp, esp
  10.     push esi
  11.     push edi
  12.     push ebx
  13.  
  14.     mov edi, [ebp + 8] ; tablica
  15.  
  16.     mov ebx, 0
  17. ln:
  18.     mov cl, [edi]
  19.     inc ebx
  20.     add edi, 1
  21.     cmp cl, 0
  22.     jne ln
  23.  
  24.     mov edi, [ebp + 8]
  25.     add ebx, 5
  26.     push ebx
  27.     call _malloc
  28.     pop ebx
  29.     push eax
  30.    
  31. dalej:
  32.     mov cl, [edi]
  33.     mov [eax], cl
  34.    
  35.     add eax, 1
  36.     add edi, 1
  37.     cmp cl, 0
  38.     jne dalej
  39.  
  40.     sub eax, 1
  41.     mov [eax], byte ptr 'B'
  42.     add eax, 1
  43.     mov [eax], byte ptr 88h
  44.     add eax, 1
  45.     mov [eax], byte ptr 0A5h
  46.     add eax, 1
  47.     mov [eax], byte ptr 'd'
  48.     add eax, 1
  49.     mov [eax], byte ptr '.'
  50.     add eax, 1
  51.     mov [eax], byte ptr 0
  52.  
  53.     pop eax
  54.  
  55.  
  56.     pop ebx
  57.     pop edi
  58.     pop esi
  59.     pop ebp
  60.     ret
  61. _komunikat ENDP
  62. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement