The MASM Forum

64 bit assembler => 64 bit assembler. Conceptual Issues => Topic started by: sukratu on November 06, 2015, 09:04:07 PM

Title: exporting a label from a function.
Post by: sukratu on November 06, 2015, 09:04:07 PM
Hi,

I want to export a label from a function to other modules in x64 MASM assembly.
code example
------------------------
.code
PUBLIC GetLable

GetLable PROC
...
...
LABELTOEXPORT:
...
...
GetLable ENDP
--------------------------------------

from above program, I want to export LABELTOEXPORT to other modules. How can I do it?
In Linux it is possible to make this label as global so that other modules can access it.
How to do it on Windows with MASM assembler.

Regards,
Sukratu

Title: Re: exporting a label from a function.
Post by: sukratu on November 06, 2015, 09:15:27 PM
Hi,

I got it. I need put :: after LABELTOEXPORT
e.g
LABELTOEXPORT::

and make it PUBLIC.
Title: Re: exporting a label from a function.
Post by: jj2007 on November 06, 2015, 09:44:16 PM
Exactly! Btw, welcome to the forum :icon14:

If you have more questions, try
http://masm32.com/board/index.php?action=search;advanced
http://www.masmforum.com/board/index.php?action=search;advanced

... or come right here to post your questions.