Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #indexe min i max
- #Nemanja Komadina PR140/2015
- .section .data
- min: .long 0
- max: .long 0
- niz: .long 7,2,12,4,55,6,1,8,9,10
- el: .long 10
- .section .text
- .globl main
- main:
- movl $0, %esi
- movl $0, %edx
- movl $0, %ecx
- movl niz(,%esi,4), %eax
- movl niz(,%esi,4), %ebx
- petlja:
- cmpl niz(,%esi,4), %eax
- jl maxim
- petljam:
- cmpl niz(,%esi,4), %ebx
- jg minim
- cmpl %esi, el
- je kraj
- incl %esi
- jmp petlja
- maxim:
- movl niz(,%esi,4),%eax
- movl %esi, %ecx
- incl %esi
- jmp petlja
- minim:
- movl niz(,%esi,4),%ebx
- movl %esi, %edx
- incl %esi
- jmp petljam
- kraj:
- movl %ecx, max
- movl %edx, min
- movl $1,%eax
- int $0x80
Advertisement
Add Comment
Please, Sign In to add comment