Mni 2
Mni 2
Submitted To:
Dr Shahroon Saleem
Submitted BY:
Muhammad Talha Iqbal
Registration No:
22-CP-39
Section:
Alpha
.stack 100h
.data
.code
main proc
mov ds, ax
mov bx, offset array ; set BX to point to the beginning of the array
; print result
int 21h
int 21h
jmp exit
PROC_INS proc
insert_loop:
loop insert_loop
ret
PROC_INS endp
PROC_SEARCH proc
mov cx, 10 ; counter for 10 numbers
search_loop:
cmp bl, [bx] ; compare search number with current array element
loop search_loop
jmp exit_search
found:
ret
exit_search:
ret
PROC_SEARCH endp
exit:
int 21h
main endp
end main