The MASM Forum Archive 2004 to 2012

Project Support Forums => GoAsm Assembler and Tools => Topic started by: srod on November 07, 2006, 08:35:53 PM

Title: A beginner's question!
Post by: srod on November 07, 2006, 08:35:53 PM
Hi,

my first question (first of many no doubt!) in my quest to learn Win asm.

You'll have to excuse this dumb ass question, but I'm new to all this low level stuff!

If I create an object file which I intend to link with another object file to create an executable, must I use the export command on all code labels which I wish the other object file to be able to reference or is all this done automatically?

I'm okay with the process of linking with dll's, but I'm not clear on this aspect of linking with static objects etc.

Thanks in advance, and thanks for the excellent GoAsm tools.

Stephen.

**EDIT:  whoops!  Found the answer in the help manual!  :red
Title: Re: A beginner's question!
Post by: jorgon on November 07, 2006, 10:33:54 PM
Hi Stephen

Welcome to the forum anyway.
Title: Re: A beginner's question!
Post by: srod on November 07, 2006, 10:45:23 PM
Thanks Jeremy.

I have another question now anyhow!  :8)

If I declare a label within a data section, is this public by default and if so, does this mean that 2 object files being linked within the same project must therfore not use the same names for their data labels?

Thanks in advance.
Title: Re: A beginner's question!
Post by: donkey on November 08, 2006, 03:07:58 AM
Hi srod,

Welcome to GoAsm and the forum, and ask as many questions as you like !!

To answer your second question, yes all "unique" or Global labels are public across modules, the manual has this to say...

Quote from: GoAsm.chmUnique labels
A unique label is one which can only be used once in your source script and in linked object files. It is a label with "global" scope, that is to say, at link-time it can be accessed by other object files.

Donkey
Title: Re: A beginner's question!
Post by: srod on November 08, 2006, 10:33:20 AM
Thanks for the reply donkey.  :8)

So is there no way to reference a label within the data section which is not made public across all object files in the application?
Title: Re: A beginner's question!
Post by: 1rDirEctoALgran0 on November 08, 2006, 05:12:03 PM
QuoteSo is there no way to reference a label within the data section which is not made public across all object files in the application?

I think you are right. :thumbu


Patrick.
Title: Re: A beginner's question!
Post by: jorgon on November 08, 2006, 07:58:47 PM
QuoteSo is there no way to reference a label within the data section which is not made public across all object files in the application?

This is correct, although local data labels can be re-used since their scope is limited to the FRAME...ENDF in which they are used (or referenced using USEDATA).

Code labels are also unique unless they are in one of the re-usable forms eg. letter+digit (or all digit), or beginning with a dot.
Title: Re: A beginner's question!
Post by: srod on November 08, 2006, 08:32:06 PM
I understand.

Thanks for the replies.