home *** CD-ROM | disk | FTP | other *** search
/ Zodiac Super OZ / MEDIADEPOT.ISO / FILES / 16 / FREEDOS.ZIP / FD_A4PRE.ZIP / SOURCE / MC-SWAP.ZIP / READ.ME < prev    next >
Text File  |  1995-06-23  |  4KB  |  88 lines

  1. All quotes below was extracted from documentation on swap() C-function written
  2. by Marty Del Vecchio available as oak.oakland.edu/simtel/msdos/c/SWAP300.ZIP
  3.  
  4. >    This package (swap) includes an MS-DOS assembly-language routine that
  5. >    can be called from a C program.  It will swap most of the current
  6. >    program to extended memory (supplied by an XMS driver, such as
  7. >    HIMEM.SYS), expanded memory (EMS version 4.0), or disk, thus freeing up
  8. >    more memory for DOS.  It will then execute another program in its
  9. >    place, and re-load the original program to its original state.  This
  10. >    allows large DOS programs to execute other programs without the
  11. >    original program taking up DOS memory.
  12.  
  13. Original SWAP300 code by Marty Del Vecchio was modified by Yury Semenov
  14. (yury@petre.odessa.ua ; Fidonet#2:467/2)  on June 6, 1995
  15. for using in DDS MICRO-C PC86 v. 3.13 and Arrowsoft Assembler environment.
  16. This modifications was done in the frames of Free-DOS project
  17. (coordinator: M. "Hannibal" Toal <hannibal@iastate.edu>).
  18.  
  19. Such compiler flags like _small, _medium, _compact, _large was removed.
  20. Flags ALL, DISK, XMS, EMS, NOFRAG are still in use.
  21.  
  22. >      This is also accomplished with the "/D" switch to MASM, followed by one
  23. > of the following:  "xms" for extended memory, "ems" for expanded memory, and
  24. > "disk" for disk file.  For example, to assemble a version of swap() that
  25. > only attempts to swap to extended memory, you would say:
  26. >      masm/ml /Dxms swap;
  27. > To assemble a version of swap() that attempts to swap to extended or
  28. > expanded memory, you would say:
  29. >      masm/ml /Dxms /Dems swap;
  30.  
  31. >      By default, swap() supports swapping of multiple DOS blocks.  If you
  32. > want to disable this feature, you must add the parameter NoFrag to your MASM
  33. > or TASM command line.  For example, to disable fragmentation support when
  34. > building a large-model version of swap(), you would enter:
  35.  
  36. You may use following commands to link SWAPTEST example (if you use ARROWASM
  37. assembler and VAL linker) :
  38.  
  39. asm/ml mc-swap;
  40.  
  41. cc swaptest.c -pl
  42.  
  43. val/nci mc-swap %MCDIR%\pc86rl_s.obj swaptest, swaptest.exe, nul, %MCDIR%\mclib.lib
  44.  
  45.          for SMALL Model or
  46.  
  47. val/nci/com %MCDIR%\pc86rl_t.obj mc-swap swaptest, swaptest.com, nul, %MCDIR%\mclib.lib
  48.  
  49.          for TINY Model
  50.  
  51. Attention: It is better to use MC-SWAP.OBJ object filename as first in linker
  52.            command line, but it impossible for Model Tiny.
  53.  
  54.  
  55.         Yury Semenov,   yury@petre.odessa.ua
  56.                                 Fidonet#2:467/2
  57.  
  58.  
  59. List of files included to this archive (MC-SWAP.ZIP) :
  60. ------------------------------------------------------------
  61. READ.ME        This file
  62. MKSWAPTE.BAT   Builds object files and links example program
  63. MC-SWAP.ASM    Source for swap routines
  64. SWAP.H         Header file for MICRO-C
  65. SWAPTEST.C     Example program showing how to use
  66. SWAP.DOC       Original swap() documentation
  67.  
  68.  
  69.           --- Notes from Dunfield Development Systems ---
  70.  
  71. I have not checked this function out in detail, however it appears
  72. to work correctly. I take no responsibility for it!
  73.  
  74. For those who do not have the original SWAP300.ZIP archive, I have
  75. included the ORIGINAL SWAP.DOC documentation from it. Combined with
  76. the comments above, it should provide adaquate documentation.
  77.  
  78. I have taken the liberty of modifying the MC-SWAP.ASM file to make
  79. all symbols match in case. This allows you to compile and link
  80. EVERYTHING in case sensitive mode (C is normally case sensitive).
  81. I have also adjusted the MKSWAPTE.BAT file and the above examples
  82. to reflect the case sensitive assembly and link.
  83.  
  84. Dave Dunfield - June 23, 1995
  85.