-
Avioding Stacks
Is it possible to program a application and no use stacks?
I need to do this because I am trying to convert my program to be a ".com" insted of ".exe", and when doing this, you cannot have a stack.
If you know how to aviod stacks, or have a compiler/IDE that can make a program compile into ".com", I would be very greatfull.
Thanks in advance.
-
.com executables are for the DOS system. You need to find out settings for your compiler (if the compiler supports it), that will output a .com instead of .exe. I don't remember the specifics on the subject though, you could try googling for more detailed answers.
-
Even a .com is capable of using a stack. An x86 program cannot function without it. The thing is, there's VERY little of it.
-
OK, thanks for your answers.
Can someone point me to a link where I can find a compiler that supports .com?
-
Unfortunately, having com or .com in a search doesn't return much to what you're looking for. Maybe someone here knows another term/phrase to describe .com files so you can narrow your search.
-
Yea, I tried on a few different search engines, and a bunch of different word combos, and I got nothing either.
-
com files are just pure binary code - the very first byte of the file is executable. they can use the stack but just remember the entire program (stack and all) must fit into a single segment (64K). many compilers allow you to create binary output using a specific command-line switch. I can't remember off the top of my head, but I think GCC's is -fbin.
-
> Can someone point me to a link where I can find a compiler that supports .com?
www.compilers.net
Look for the ancient turbo c 2.01 from borland
-
You can still get it right from Borland themselves. ;)
Quzah.