CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Installing SQL Server 2008
  • Writing UDFs for Firebird Embedded SQL Server
  • [Updated] Shutdown Manager
  • Building Windows Azure Cloud Service Applications with Azure Storage and the Azure SDK

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Other Programming > Assembly
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Assembly Questions and Answers for Assembly here!

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old February 10th, 2005, 01:21 PM
    danglin danglin is offline
    Junior Member
     
    Join Date: Feb 2005
    Posts: 1
    danglin is an unknown quantity at this point (<10)
    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.
    Reply With Quote
      #2    
    Old February 12th, 2005, 12:02 PM
    Hobson's Avatar
    Hobson Hobson is offline
    Senior Member
     
    Join Date: Dec 2004
    Location: Poland
    Posts: 1,163
    Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)
    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
    Attached Files
    File Type: txt findmin.asm.txt (943 Bytes, 166 views)
    __________________
    B+!
    'There is no cat' - A. Einstein

    Use [code] [/code] tags!

    Did YOU share your photo with us at CG Members photo gallery ?
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Other Programming > Assembly


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 10:41 AM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright WebMediaBrands Inc. 2002-2009