Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7493755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T17:10:00+00:00 2026-05-29T17:10:00+00:00

From http://en.wikipedia.org/wiki/Stack_pointer#Structure I am wondering why the return address for a function is placed

  • 0

From http://en.wikipedia.org/wiki/Stack_pointer#Structure

enter image description here

I am wondering why the return address for a function is placed above the parameters for that function?

It makes more sense to have Return Address pushed onto the stack before the Parameters for Drawline because the parameters are not required any more when the Return Address is popped for returning back to the calling function.

What are the reasons for preferring the implementation shown in diagram above?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T17:10:05+00:00Added an answer on May 29, 2026 at 5:10 pm

    The return address is usually pushed via the call machine command, [which in the native language’s instruction set] while the parameters and variables are pushed with several machine commands – which the compiler creates.

    Thus, the return address is the last thing pushed by the caller, and before anything [local variables] pushed by the callee.

    The parameters are all pushed before the return address, because the jump to the actual function and the insertion of the return address to the stack is done in the same machine command.

    Also, another reason is – the caller is the one allocating space on stack for the parameters – It [the caller] should also be the one who cleans it up.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From this Wikipedia article: http://en.wikipedia.org/wiki/Hamiltonian_path_problem A randomized algorithm for Hamiltonian path that is fast
From http://en.wikipedia.org/wiki/AJAX , I get a fairly good grasp of what AJAX is. However,
I am trying to get the list of people from the http://en.wikipedia.org/wiki/Category:People_by_occupation . I
I was reading this: http://en.wikipedia.org/wiki/Thread_safety Is the following function thread-safe? void foo(int y){ int
jQuery.ajax( { url:'http://en.wikipedia.org/wiki/Football', type:'get', dataType:'jsonp', success:function(data){alert(data);}, } i want to read wikipedia page from
I got the code from wikipedia for linked list ( http://en.wikipedia.org/wiki/Linked_list ). But it
I'm trying to implement this protocol: http://en.wikipedia.org/wiki/Chord_(peer-to-peer ) What i understood from it is
http://en.wikipedia.org/wiki/ICalendar I'm working to implement an export feature for events. The link above lists
so apparently it's possible to compile PHP do decouple it from the interpreter: http://en.wikipedia.org/wiki/Php#Compilers
I've got a DB that refers to the following url: http://en.wikipedia.org/wiki/Herbert_Gr%F6nemeyer However, it seems

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.