Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .section .data
- niz2: .quad 9456465465, 456, -6132123123
- niz2_l = 3
- van_opsega: .long 0
- min: .quad -5000000000
- max: .quad 6000000000
- .section .text
- .global main
- main:
- movl $0, %esi
- while:
- cmpl $niz2_l, %esi
- jge whileKraj
- movl $4, %ebx #asembler je glup
- #poredim znacajnije dijelove
- movl (max + 4), %eax
- cmpl niz2(%ebx, %esi, 8), %eax
- jl ifUvecaj
- je provjeriMaxNizi
- movl (min + 4), %eax
- cmpl niz2(%ebx, %esi, 8), %eax
- jg ifUvecaj
- je provjeriMinNizi
- jmp whileBrojac
- #poredim manje znacajne dijelove
- provjeriMaxNizi:
- movl (max), %eax
- cmpl niz2(, %esi, 8), %eax
- jl ifUvecaj
- jmp whileBrojac
- provjeriMinNizi:
- movl (min), %eax
- cmpl niz2(, %esi, 8), %eax
- jg ifUvecaj
- jmp whileBrojac
- jmp whileBrojac
- ifUvecaj:
- incl van_opsega
- whileBrojac:
- addl $1, %esi
- jmp while
- whileKraj:
- kraj:
- movl $1, %eax
- movl $0, %ebx
- int $0x80
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement