Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data_seg segment
- result db ?
- data_list db 12,13,14,15,16,54,43,32,21,10
- sum db "00",'$'
- data_seg ends
- code_seg segment
- assume cs:code_seg,ds:data_seg
- Begin proc far
- mov ax,data_seg
- mov ds,ax
- mov bx,offset data_list
- sub ax,ax
- mov cx,9
- mov al,[bx]
- again: inc bx
- cmp al,[bx]
- jae not_gt
- mov al,[bx]
- not_gt: dec cx
- jnz again
- mov result,al
- mov bl,10
- div bl
- add ax,3030h
- LEA si,sum
- mov [si],al
- mov [si+1],ah
- mov ah,09h
- mov dx,offset sum
- int 21h
- mov ax,4c00h
- int 21h
- begin endp
- Code_Seg ends
- end begin
Add Comment
Please, Sign In to add comment