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

  • SEARCH
  • Home
  • 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 7513293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:08:18+00:00 2026-05-30T00:08:18+00:00

I am brand new to assembly programming and I was wondering why the address

  • 0

I am brand new to assembly programming and I was wondering why the address of a variable is always pushed to the stack instead of the actual variable. For example:

.text:00401270 push ebp

.text:00401271 mov ebp, esp

.text:00401273 sub esp, 80h

.text:00401279 push offset aString1

.text:0040127E call sub_401554

Why is the actual variable never pushed as an argument?

  • 1 1 Answer
  • 3 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-30T00:08:20+00:00Added an answer on May 30, 2026 at 12:08 am

    Not all “function” arguments are necessarily passed by reference, but your example is a string, which is passed by reference due to its variable size being inappropriate on the stack.

    The specifics of how you call a function and clean up before returning will vary depending upon the calling convention with which you are to interface.

    If your callers will always be assembly code you control, you might choose to pass short arguments on the stack, but passing pointers lets you use data structures which are larger and more complicated, and thus more likely candidates for needing hand-coded-assembly optimization.

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

Sidebar

Related Questions

You'll have to excuse me, I'm brand new to x86 assembly, and assembly in
Brand new to Python (and programming in general), if this is simple and/or answered
I'm pretty much brand new to the PIC32 and its programming in C, so
I am brand new to Mono. I have a .NET Framework 3.5 assembly and
Brand new to the Log4Net library and there is something I have not been
Brand new to Cocoa and I'm trying to figure out how to copy an
Brand new poster here on StackOverflow. I've been reading and learning here for some
I'm brand new to node.js, but I wanted to play around with some basic
It's a brand new project. Here's the exact commands I've run: rails new MyProject
I'm brand new to ruby and rails and I'm having trouble creating a sign-out

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.