W3 part 2 - n .code main PROC mov ebx,OFFSET intArray mov...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
TITLE ArrayScan (main.asm) ( ; Description: ; Assignment 3 part 2 ; Using the ArrayScan program in Section 6.3.4.2 as a model, ; implement the search using the LOOPZ instruction. ; ; Revision date: Oct 9th 2008 ; INCLUDE Irvine32.inc I .data ;intArray SWORD 0,0,0,0,1,20,35,-12,66,4,0 ;intArray SWORD 0,0,6,0,0 intArray SWORD 0,0,0,0,8 noneMsg BYTE "A non-zero value was not found.",0
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: n .code main PROC mov ebx,OFFSET intArray mov ecx,LENGTHOF intArray e L1: add ebx,2 cmp WORD PTR [ebx],0 jnz found loopz L1 jmp notFound found: movsx eax,WORD PTR[ebx] call WriteInt jmp quit q notFound: mov edx,OFFSET noneMsg call WriteString W quit: call Crlf exit main ENDP END main...
View Full Document

This note was uploaded on 12/30/2009 for the course COS 231 taught by Professor Jasonlitz during the Summer '09 term at Thomas Edison State.

Ask a homework question - tutors are online