Author Topic: exporting a label from a function.  (Read 2806 times)

sukratu

  • Regular Member
  • *
  • Posts: 6
exporting a label from a function.
« 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


sukratu

  • Regular Member
  • *
  • Posts: 6
Re: exporting a label from a function.
« Reply #1 on: November 06, 2015, 09:15:27 PM »
Hi,

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

and make it PUBLIC.

jj2007

  • Member
  • *****
  • Posts: 10655
  • Assembler is fun ;-)
    • MasmBasic
Re: exporting a label from a function.
« Reply #2 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.