home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / msdos / programm / 11862 < prev    next >
Encoding:
Text File  |  1993-01-07  |  5.7 KB  |  118 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!ncoast!brown
  3. From: brown@NCoast.ORG (Stan Brown)
  4. Subject: How to access memory above 640K
  5. Organization: Oak Road Systems, Cleveland Ohio USA
  6. Date: Thu, 7 Jan 1993 14:07:55 GMT
  7. Message-ID: <C0HLx8.IAL@NCoast.ORG>
  8. Followup-To: comp.os.msdos.programmer
  9. References: none
  10. Lines: 106
  11.  
  12. Last-modified: 1993 Jan 3
  13.  
  14. Part of the following material originally appeared in the FAQ list for
  15. comp.os.msdos.programmer.  However, subsequent email revealed that the
  16. answer is not really settled.  Since the FAQ list should contain
  17. "canonical best answers", I have created this separate article.  One of
  18. my rainy-day projects is to investigate this area myself.  Until then,
  19. I'm simply appending the emails and posted articles that seem relevant.
  20.  
  21. If you want your comments to be appended to this file, please be sure to
  22. email me at brown@ncoast.org.  I try to follow the newsgroup, but I may
  23. miss posted articles because c.o.m.p gets heavy traffic.
  24.  
  25. The following appeared in the December 1992 FAQ list.  It is by Jamshid
  26. Afshar (jamshid@emx.utexas.edu) and incorporates comments from Duncan
  27. Murdoch (dmurdoch@mast.queensu.ca).
  28.  
  29.     1. Use XMS or EMS memory.  XMS is preferable in most cases, but
  30.     some machines won't provide it.  There are some libraries available
  31.     at Simtel to access XMS or EMS.  The disadvantage is that you
  32.     don't allocate the memory as you would with malloc() (or `new' in
  33.     C++).  I believe it also requires that you lock this memory when in
  34.     use.  This means your code is not easily ported to other (and
  35.     future) operating systems and that your code is more convoluted than
  36.     it would be under a "real" os.  The advantage is that the library
  37.     works with compilers since Turbo C 2.0 (I think) and that your
  38.     program will easily run on even 286s.
  39.  
  40.     2.  Program under MS Windows.  MS Windows functions as a 16-bit DOS
  41.     Extender (see #3).  Borland/Turbo C++ 3.x includes EasyWin [and
  42.     Microsoft C/C++ 7.0 has QuickWin --ed.] which is a library that
  43.     automatically lets you compile your current code using C/C++
  44.     standard input or <conio.h> into a MS Windows program so your code
  45.     can immediately allocate many MBs of memory (Windows enhanced mode
  46.     even does virtual memory).  The disadvantage is that like any 16-bit
  47.     Extender a single malloc() is restricted to 64K (unless you want to
  48.     mess with huge pointers in Windows).  Also, EasyWin's screen output
  49.     is significantly slower than a DOS character-mode program's and you
  50.     must of course run the program from Windows.
  51.  
  52.     3.  Use a 16-bit or 32-bit DOS Extender.  This is definitely the
  53.     best solution from the programmer's standpoint.  You just allocate
  54.     as much memory as you need using malloc() or 'new'.  A 16-bit
  55.     Extender still has 16-bit ints and restricts arrays to 64K, but a
  56.     32-bit Extender has 32-bits ints (which makes porting a lot of UNIX
  57.     code easier) so there are no 64K limits.  A 32-bit Extender requires
  58.     a 32-bit compiler and the program will not run on 286s.  Some
  59.     Extenders also do virtual memory.  Using an Extender doesn't require
  60.     source code changes and unlike option #1 your code is portable and
  61.     not obsolete in a few months.  Your options for this solution are:
  62.  
  63.     - Buy PharLap's 16-bit Extender that works with BC++ 3.0+ and MSC
  64.       (just requires a relink).  Note, the BC++ 3.1 upgrade came with
  65.       PharLap "lite".  Pharlap's 32-bit Extender works with 32-bit
  66.       compilers like [?]
  67.  
  68.     - Get the GNU (free,copylefted) gcc 2.x compiler which DJ Delorie
  69.       ported from UNIX and which uses his 32-bit Extender.  It supports
  70.       C and C++, but the Extender is VCPI which means neither the
  71.       compiler nor programs it produces will run in a DOS session under
  72.       Windows.  FTP to barnacle.erc.clarkson.edu and get
  73.       pub/msdos/djgpp/readme.
  74.  
  75.     - Get a 32-bit compiler or one that comes with a DOS Extender.
  76.       Zortech comes with 16-bit and a 32-bit Extenders (no debugger for
  77.       32-bit programs, but Flashtek sells one).  Watcom also makes a C
  78.       [and C++?] 32-bit compiler.  [If anyone else has products or plans
  79.       to announce, please let me know.]
  80.  
  81.     - Buy Borland Pascal 7.0.  It includes a 16 bit royalty-free DOS
  82.       extender using the same interface as MS Windows.  It functions
  83.       under a DPMI server like Windows or QDPMI from Quarterdeck, and
  84.       also provides its own server which you can distribute with your
  85.       programs.
  86.  
  87.     4.  This option doesn't really count since it's not a solution in
  88.     DOS, but you could switch to a full 32-bit operating system like
  89.     OS/2 2.0 or UNIX (or NT when it comes out).  I believe Win32 will
  90.     allow you to write 32-bit Windows programs.  [can someone fill me in
  91.     on what exactly Win32 is?]
  92.  
  93.  
  94. Date: Mon, 21 Dec 92 08:36:50 -0500
  95. From: malak@grebyn.com (Michael Malak)
  96. Message-Id: <9212211336.AA02279@daily.grebyn.com>
  97.  
  98.     You should also mention the Intel 386/386 C Code Builder Kit.  It is
  99.     a 32-bit C compiler, linker, and 32-bit DOS extender.  It is the
  100.     _only_ 32-bit DOS extender that allows you to link in 32-bit MASM
  101.     6.0 modules, thus obviating the need to buy Phar Lap's assembler and
  102.     be stuck with its archaic MASM 4.x syntax.  All for a list price of
  103.     $595.
  104.  
  105.  
  106. Date: Thu, 24 Dec 92 13:45:40 EST
  107. From: dmurdoch@mast.QueensU.CA (Duncan Murdoch)
  108. Message-Id: <9212241845.AA23280@mast.mast.QueensU.CA>
  109.  
  110.     I don't know anything about the Intel package, but certainly
  111.     wouldn't object to putting the information in.  I'd delete the claim
  112.     that it's the only package to link MASM code; that may be true, but
  113.     isn't likely to last for long.
  114.  
  115. -- 
  116. Stan Brown, Oak Road Systems                      brown@Ncoast.ORG
  117. Cleveland, Ohio, USA
  118.