You are on page 1of 4

University of Engineering &

Technology, Taxila

B.S. COMPUTER ENGINEERING


Microprocessor And Network
Interfacing

Name: Sheikh Abuzar Amjad_


Roll No: _19-CP-6____________
Semester: ___4th______________
Sec: __OMEGA(Ω)________

ENGR. Sharoon Saleem SB


Q.NO.1
Write a procedure which searches a number in an array of
words. The procedure should receive the start address of the
array from the SI register, the number to be searched from the
BX register, and the number of elements in the array from the CX
register.

If the number is found, the procedure should return the offset of


the number in DI register, add 10 to it and push this value to
stack.

If the number is not found, DI should be zero.

Numbers to be inserted initially: 1-20 (Not initialized, but inserted).


CODE
OUTPUT

INSERTION OF NUMBERS FROM CX:

WHEN NUMBER NOT FOUND DI=0:


When number Found:

THE END

You might also like