News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Shared segment

Started by Artoo, February 17, 2005, 09:00:02 AM

Previous topic - Next topic

Artoo

Could someone please tell me the equivialent of the MS Visual C++ code:

#pragma data_seg (".shared")
BOOL g_bBlah = FALSE;
#pragma data_seg ()
#pragma comment(linker,"/SECTION:.shared,RWS")


How would I do this in MASM, and where would I do it? eg before .data ??

Your help is much appreciated.  :toothy

ScreenScraper

You could put it in the DEF file as in,

SECTIONS .bss SHARED   ; .bss = .data?

or

SECTIONS .bss READ WRITE SHARED   ; .bss = .data?


or you could add it as a linker switch something like,

/SECTION:.bss|S


Mind you I use RadASM, so I don't know if it would be different in another IDE.