Advertisement
kernel_memory_dump

samoglasnici u stringu

Mar 30th, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .section .data
  2. text:  .ascii "Zdravo, Svete!\0"
  3. broj: .long 0
  4. .section .text
  5. .globl main
  6. main:
  7. movl  $text, %ebp   #drop the base pointer
  8. while:
  9.   cmpl $0, (%ebp)   # while ( *p != NULL)
  10.   je kraj
  11.   cmpb 'A', (%ebp)
  12.   jne if_a
  13.   incl broj
  14.   jmp while # cim je tacno, KRAJ! if-else if
  15.   if_a:
  16.   cmpb 'a', (%ebp)
  17.   jne if_E
  18.   incl broj
  19.   jmp while # cim je tacno, KRAJ! if-else if
  20.   if_E:
  21.   cmpb 'E', (%ebp)
  22.   jne if_e
  23.   incl broj
  24.   jmp while # cim je tacno, KRAJ! if-else if
  25.  
  26.   if_e:
  27.   cmpb 'e', (%ebp)
  28.   jne if_U
  29.   incl broj
  30.   jmp while # cim je tacno, KRAJ! if-else if
  31.  
  32.   if_U:
  33.   cmpb 'U', (%ebp)
  34.   jne if_u
  35.   incl broj
  36.   jmp while # cim je tacno, KRAJ! if-else if
  37.   if_u:
  38.   cmpb 'u', (%ebp)
  39.   jne if_I
  40.   incl broj
  41.   jmp while # cim je tacno, KRAJ! if-else if
  42.   if_I:
  43.       cmpb 'I', (%ebp)
  44.   jne if_i
  45.   incl broj
  46.   jmp while # cim je tacno, KRAJ! if-else if
  47.   if_i:
  48.       cmpb 'O', (%ebp)
  49.   jne if_o
  50.   incl broj
  51.   jmp while # cim je tacno, KRAJ! if-else if
  52.   if_o:
  53.       cmpb 'o', (%ebp)
  54.   jne p_plus_plus
  55.   incl broj
  56. p_plus_plus:
  57.     incl %ebp
  58.    jmp while
  59.  
  60. kraj:
  61.   movl $1, %eax
  62.    movl $0, %ebx
  63.   int $0x80
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement