| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
| Assembly Questions and Answers for Assembly here! |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Assembly and Array
I've done this several times and keep getting it wrong. Can one of you genius help. This is driving me nuts. Thank you
Question 27: Write a GAL subprogram called min, which finds the smallest value in an array of 100 integers. Assume the base address of the array is given in reg0, and return the smallest value in reg1. Any other registers that your subprogram modifies should be saved and restored to their original states. Question 31: Rewrite your answer to Question 27, using a stack to pass parameters according to the following model, ************** Return_address <------------SP(top-of-stack register) ************** Array_base ************** Var_location ************* ************* System stack Where the value contained in var_location is the address where the smallest value in the array should be stored. Assume that reg7 is acting as SP, the top-of stack pointer. |
|
#2
|
||||
|
||||
|
Re: Assembly and Array
What are you having problems with?
Procedure of looking up the minimum element in array, written in Intel assembly language, you can find in attachment. That should not to be hard to make a subprogram with it. Hob
__________________
B+! 'There is no cat' - A. Einstein Use [code] [/code] tags! Did YOU share your photo with us at CG Members photo gallery ? |
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|