home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / alt / msdos / programm / 3286 < prev    next >
Encoding:
Text File  |  1993-01-28  |  2.1 KB  |  47 lines

  1. Newsgroups: alt.msdos.programmer
  2. Path: sparky!uunet!portal!resumix!news
  3. From: paul@resumix.portal.com (Paul Erickson)
  4. Subject: Re: .com and .exe files
  5. Message-ID: <1993Jan28.213145.7811@resumix.portal.com>
  6. Sender: news@resumix.portal.com
  7. Reply-To: paul@resumix.portal.com
  8. Organization: Resumix, Inc., Santa Clara, CA
  9. References: <1993Jan27.114320.14690@umr.edu>
  10. Date: Thu, 28 Jan 93 21:31:45 GMT
  11. Lines: 34
  12.  
  13. the standard action of a com file is to locate the data, stack and code all within one segment.  However, their is not this limitation on the heap.  Therefore, the program can allocate as much memory (malloc or getmem or new) as the machine has availiable.  Also the CS and DS segment registers can be modified directly, but unless you are experienced with how DOS handles memory this is not a good idea.
  14.  
  15. In article 14690@umr.edu, mcastle@cs.umr.edu (Michael R Castle) writes:
  16. >In article <C1HtvM.Eun@world.std.com> mikep@world.std.com (Michael Podanoffsky) writes:
  17. >>
  18. >>Both .com and .exe files can be loaded anywhere.
  19. >>
  20. >>A .com file contains no segments whatsoever.  All data, code and stack share
  21. >>the same 64k segment.
  22. >>
  23. >>An .exe file contains segments and can exceed 64k.  Only .exe files are really
  24. >>rommable should this ever be needed.  One major side effect is that different
  25. >>code segments may be produced.
  26. >>
  27. >>.com files are an exact byte image of the program in memory without any
  28. >>relocation information.  That means all references are near.
  29. >
  30. >Question:  Can't com files use more than 64k?  Once the program is going,
  31. >you can pretty much do what ever you want with the segment registers, and
  32. >request more memory, and access the full 640 k.  I seem to remember a while
  33. >back that someone wrote a program (forth interpreter, if I remember 
  34. >correctly) that is a .com file, but isn't limited by 64k.
  35. >
  36. >mrc
  37. >-- 
  38. >Mike Castle .-=NEXUS=-.  Life is like a clock:  You can work constantly
  39. >  mcastle@cs.umr.edu     and be right all the time, or not work at all
  40. >S087891@UMRVMA.UMR.EDU   and be right at least twice a day.  -- mrc
  41. >    We are all of us living in the shadow of Manhattan.  -- Watchmen
  42.  
  43.  
  44.  
  45.  
  46.  
  47.