Got something to write about? Check out our Article Builder.

Getting started in assembly

Moderators: None (Apply to moderate this forum)
Number of threads: 195
Number of posts: 548

This Forum Only
Post New Thread

Report
Fasm Assembly HELP Posted by DarrenBall on 28 Nov 2009 at 5:53 AM
Hi all,

Can anyone tell me how to get the command line parameters passed to my Fasm app ?

All my app does is display a message box -

I want to pass a parameter 'Intell Processor' which displays this in the message box.

I know there are easier ways of doing this -
but it's an excercise on passing data to my app.

Thanks.
Report
Re: Fasm Assembly HELP Posted by anthrax11 on 28 Nov 2009 at 4:43 PM
In Windows, you can use GetCommandLine.
Report
Re: Fasm Assembly HELP Posted by DarrenBall on 29 Nov 2009 at 4:29 AM
Thanks..


That makes things easier..

Do you also know of a way i can do the same using pure or Fasm assembly ?

I'm guessing that the command line parameters including the program string are held in memory ready for the processor to run the process - Do you know if this is a set memory location like the video buffer but in 32bit assembly ? and will windows allow access to this memory block ?

Thanks again for your help.
Report
Re: Fasm Assembly HELP Posted by AsmGuru62 on 29 Nov 2009 at 5:15 AM
In Windows all memory areas are accessed using API. There are some task parameters to be accessed using FS:0000 address, but these (the structure layouts) can be modified by next OS version, so you cannot rely on it. It is better to use the API. Follow anthrax's advice.



 
Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2010 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
bootstrapLabs Logo A BootstrapLabs project.