pgubook-readers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pgubook-readers] Chapter 5: Need help to understand programs' arguments


From: TJLAJK TJALJ
Subject: [Pgubook-readers] Chapter 5: Need help to understand programs' arguments [page 91]
Date: Thu, 17 Mar 2011 06:47:10 -0700 (PDT)

Hi all,

The last paragraph on page 91 says, '... When a LInux program begins, all pointers to command line arguments are stored on the stack ... and the arguments are stored from 16(%esp) on'.

Does this mean that when we run a program like this:
$./toupper toupper.s uppercase.s
Linux automagically counts the parameters for us (in this case the parameters are 2) and stores them at 8(%esp), and the actual arguments (toupper.s and uppercase.s) are from 16(%esp) upwards.

In short, Linux fills in a program's parameters for us and we do our own functions'.

Thank you.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]