Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
PROJECT : LINEAR SEARCH (IN 80x86 ASSEMBLY LANGUAGE) Done by Chetna Bashyam Course : Computer Architecture
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Description of Linear Search Algorithm: Linear Search is a classical and very simple algorithm where we look for an element in an array. The basic idea is as follows: There are 3 sections of code which is executed. Section 1 where we store the list of integers in an array when it is input by the user. Section 2 is where the user specifies a number that needs to be searched in the array. In this case we just walk through each element in the array one at a time comparing it with the user specified value and if the value is found we go to section 3 where we display the result in terms of the position where the value was found or a message if the value specified by the user is not found. Reference: Algorithms in C++ by Robert Sedgewick C++ Implementation of the algorithm: for( int j = 0; j <= r; j++) if( v == a[j] return j; Where a is integer array, v is the value to be searched, r is the number of elements in the array. Assembling/Linking and Running the program: Reference: 80x86 Assembly Language and Computer Architecture by Richard C Detmer. The assembler used to assemble and run the program is ML assembler. To assemble the program the following command needs to be executed at the DOS prompt once the software is installed and path information updated. ml /c /coff /Zi example.asm
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 9


This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online