Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .section .data
- text: .ascii "Zdravo, Svete!\0"
- broj: .long 0
- .section .text
- .globl main
- main:
- movl $text, %ebp #drop the base pointer
- while:
- cmpl $0, (%ebp) # while ( *p != NULL)
- je kraj
- cmpb 'A', (%ebp)
- jne if_a
- incl broj
- jmp while # cim je tacno, KRAJ! if-else if
- if_a:
- cmpb 'a', (%ebp)
- jne if_E
- incl broj
- jmp while # cim je tacno, KRAJ! if-else if
- if_E:
- cmpb 'E', (%ebp)
- jne if_e
- incl broj
- jmp while # cim je tacno, KRAJ! if-else if
- if_e:
- cmpb 'e', (%ebp)
- jne if_U
- incl broj
- jmp while # cim je tacno, KRAJ! if-else if
- if_U:
- cmpb 'U', (%ebp)
- jne if_u
- incl broj
- jmp while # cim je tacno, KRAJ! if-else if
- if_u:
- cmpb 'u', (%ebp)
- jne if_I
- incl broj
- jmp while # cim je tacno, KRAJ! if-else if
- if_I:
- cmpb 'I', (%ebp)
- jne if_i
- incl broj
- jmp while # cim je tacno, KRAJ! if-else if
- if_i:
- cmpb 'O', (%ebp)
- jne if_o
- incl broj
- jmp while # cim je tacno, KRAJ! if-else if
- if_o:
- cmpb 'o', (%ebp)
- jne p_plus_plus
- incl broj
- p_plus_plus:
- incl %ebp
- jmp while
- kraj:
- movl $1, %eax
- movl $0, %ebx
- int $0x80
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement