The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Artoo on February 17, 2005, 09:00:02 AM

Title: Shared segment
Post by: Artoo on February 17, 2005, 09:00:02 AM
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
Title: Re: Shared segment
Post by: ScreenScraper on February 17, 2005, 06:30:43 PM
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.