T2review-3750-F08

T2review-3750-F08 - Review before Test 2 EE 3750 - Fall...

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

View Full Document Right Arrow Icon
1 Review before Test 2 EE 3750 - Fall 2008 2 Survey results - least understood procedures 11 string comparisons 7 I/O 6 parallel interface 6 serial interface 6 HW 4 #3 (alarm) 5 other 5
Background image of page 1

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

View Full DocumentRight Arrow Icon
Procedure Write a complete 8086 FAR procedure to do the following. Search a word array for a given value; if found, then return 1 in a flag; otherwise, return 0. The calling sequence below inputs parameters to the procedure, where BLUE is the word array, SIZE is the number of words in the array, TERM is the search value, and FLAG is the variable where the flag result is to be returned. MOV DI, OFFSET BLUE MOV CX, SIZE MOV AX, TERM MOV BX, OFFSET FLAG CALL FAR PTR FINDVAL 4 Search a word array for a given value; if found, then return 1 in a flag; otherwise, return 0. Array address in DI, size in CX, search term value is in AX, flag address is in BX. FINDVAL PROC FAR PUSH DI ; push registers that change PUSH CX CHECK: CMP [DI], AX ; compare array against search term JE FOUND ADD DI, 2 LOOP CHECK MOV [BX], 0 ; term not in array if fall out of loop
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.

This note was uploaded on 01/25/2012 for the course EE 3750 taught by Professor Desouza during the Fall '08 term at LSU.

Page1 / 5

T2review-3750-F08 - Review before Test 2 EE 3750 - Fall...

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