Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .section .data
- NELEM=10
- niz: .long 6, -10, 17, -5, -3, 4, 7, 22, -13, 70, 1
- min: .long 0
- max: .long 0
- .section .text
- .globl main
- main:
- movl $niz, %esi
- movl niz, %eax
- movl niz, %ebx
- petlja:
- addl $4, %esi
- cmpl %eax, (%esi)
- jge nastavi
- jl resenje
- nastavi:
- cmpl %ebx, (%esi)
- jle nastavi1
- jg resenje1
- nastavi1:
- cmpl $niz+NELEM*4, %esi
- jl petlja
- jae kraj
- resenje:
- movl (%esi), %eax
- jmp nastavi
- resenje1:
- movl (%esi), %ebx
- jmp nastavi1
- kraj:
- movl %eax, min
- movl %ebx, max
- movl $1, %eax
- movl $0, %ebx
- int $0x80
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement