The MASM Forum

General => The Campus => Topic started by: ogenami on November 24, 2016, 11:09:56 PM

Title: About .STACK directive
Post by: ogenami on November 24, 2016, 11:09:56 PM
Hi,

there is something i want to ask about .STACK directive, i've seen some examples that was containing this directive, i already know what this directive is doing but i couldn't find anything about when it should be used or not, actually i don't use it, but i just don't want to leave things uncertain.

Thanks...
Title: Re: About .STACK directive
Post by: Adamanteus on November 25, 2016, 12:59:22 AM
 In Windows 32-64 bits the stack segment is elemenated, so directive stayed unused - but for good style of programming it possible stay in code. Realy for good work stack in windows progeam is need tuch loop in prolouge code of each function, in compiler it's made by commad line (Gs) switch.
Title: Re: About .STACK directive
Post by: hutch-- on November 25, 2016, 02:01:15 AM
This is correct, in Win32 it has no purpose, its a Win16 leftover as ML.EXE will still build 16 bit applications.  In Win32 you set stack parameters in the linker options.