The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 4 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
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: