ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 4 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 24 May 2017 My Price 9.00

ECX register keeps the number of iterations

Remember each call to print str$ or chr$ change registers values. So, you need to push them onto stack before calling these function and then pop from the stack after the call is done. For example, ECX register keeps the number of iterations (i.e., number of array elements). So, in a loop structure you need to push ECX onto stack before calling print functions and pop ECX after the call is done.

 

Problem 1. Write a program to loop over an array to search for the value of 10.  In the loop when the value of 10 is found it must jump to the label LMESSAGE where it prints the following message:

 

Found value of 10 in the array, jumped to LMESSAGE label.

 

Test your program using the following array:

 

myArray DWORD 30,3,13,10,20,2,4,5,110

 

  Note that the message (Found value of 10 in the array, jumped to LMESSAGE label.) must be printed in the label LMESSAGE of the program.

 

Problem 2. Solve  Problem 1 using LOOPNZ or LOOPNE instructions.

 

 

Problem 3. Write a program to count the number of array elements with value of 10.  Test your program using the following array:

 

myArray DWORD 30,3,13,10,20,2,4,5,110,10,4,10,55,66,21,34,10,90,10

 

The program should print each element during the loop iteration

 

Thanks in advance.

Attachments:

Answers

(11)
Status NEW Posted 24 May 2017 02:05 AM My Price 9.00

-----------

Not Rated(0)