name "tableau"   ; output file name (max 8 chars for DOS compatibility)

org 100h 
mov ax, 1003h
mov bx, 0
int 10h



mov si, 0
mov al, tab[si]

mov adrmaxi, si

mov cx, tabsize

debut:

cmp al, maxi
jl label1 ; jump si debordement dans cmp
mov maxi, al

label1:

inc si
mov al, tab[si]
loop debut ; decremente cx



mov dx, 0705h
mov bx,0
mov bl,10011111b
mov cx, msg_size
mov al, 01b
mov bp, offset msg
mov ah, 13h
int 10h

mov ah,0
int 10110b

mov dl, maxi
mov ah, 2
int 21h

ret


 
msg         db "press any key..."
msg_size =  $ - offset msg 




; declaration des variables 
tab db 10, 5, 3, 1, 0, 78, 5, 12, 10

tabsize db 10
maxi db 0
adrmaxi db ? ; variable non initialisee








