You are on page 1of 1

;maximul dintre elementele unui vector

.dosseg
.model small
.data
Vec dw 2,3,2,1,4,5,7,8
LungV equ ($-Vec)/2
.code
start:
mov ax,@data
mov ds,ax
lea si, Vec
mov ax,[si]
inc si
mov cx,LungV
dec cx
cauta:
cmp ax,[si]
jle kkt
mov ax,[si]
kkt:
inc si
loop cauta
mov dx,ax
mov ah,9
int 21h
mov ah,4c00h
int 21h
end start

You might also like