flat assembler
Message board for the users of flat assembler.

Index > DOS > minimun stack size recommended

Author
Thread Post new topic Reply to topic
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 29 Apr 2006, 20:33
Hi, anyone knows which is the minimun size of stack required to get DOS programs be able to call ints without any problems? It's safe 64 bytes of stack?
Post 29 Apr 2006, 20:33
View user's profile Send private message Reply with quote
Cas



Joined: 26 Feb 2004
Posts: 82
Location: Argentina
Cas 04 May 2006, 05:08
I don't know. It'll depend on your DOS version and on which interrupts you're going to call. Usually, DOS interrupts will not eat that much stack, but if you're calling mouse driver interrupt or EMS interrupt services, you will most likely need a little more. Anyway, even if you find your application runs always fun with 64 bytes of stack that may not be the same after you load a TSR that may get hooked from those interrupt vectors. I'd suggest a little more... say, to feel it safe, at least 256 bytes. But that is just my own opinion.
Post 04 May 2006, 05:08
View user's profile Send private message Yahoo Messenger MSN Messenger Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 04 May 2006, 12:07
OK, I will set 256 bytes then, thanks Cas Very Happy
Post 04 May 2006, 12:07
View user's profile Send private message Reply with quote
Japheth



Joined: 26 Oct 2004
Posts: 151
Japheth 07 May 2006, 07:05
256 bytes is better than 64, but IIRC there are some known problems with CWSDPMI on certain conditions because it supplies a default real-mode stack of just 256. To be on the safe side a stack of 512 should be supplied.
Post 07 May 2006, 07:05
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 07 May 2006, 15:14
Thanks for the info Japheth!!
Post 07 May 2006, 15:14
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.