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 >
Wrap
Text File
|
1995-06-23
|
4KB
|
88 lines
All quotes below was extracted from documentation on swap() C-function written
by Marty Del Vecchio available as oak.oakland.edu/simtel/msdos/c/SWAP300.ZIP
> This package (swap) includes an MS-DOS assembly-language routine that
> can be called from a C program. It will swap most of the current
> program to extended memory (supplied by an XMS driver, such as
> HIMEM.SYS), expanded memory (EMS version 4.0), or disk, thus freeing up
> more memory for DOS. It will then execute another program in its
> place, and re-load the original program to its original state. This
> allows large DOS programs to execute other programs without the
> original program taking up DOS memory.
Original SWAP300 code by Marty Del Vecchio was modified by Yury Semenov
(yury@petre.odessa.ua ; Fidonet#2:467/2) on June 6, 1995
for using in DDS MICRO-C PC86 v. 3.13 and Arrowsoft Assembler environment.
This modifications was done in the frames of Free-DOS project
(coordinator: M. "Hannibal" Toal <hannibal@iastate.edu>).
Such compiler flags like _small, _medium, _compact, _large was removed.
Flags ALL, DISK, XMS, EMS, NOFRAG are still in use.
> This is also accomplished with the "/D" switch to MASM, followed by one
> of the following: "xms" for extended memory, "ems" for expanded memory, and
> "disk" for disk file. For example, to assemble a version of swap() that
> only attempts to swap to extended memory, you would say:
>
> masm/ml /Dxms swap;
>
> To assemble a version of swap() that attempts to swap to extended or
> expanded memory, you would say:
>
> masm/ml /Dxms /Dems swap;
> By default, swap() supports swapping of multiple DOS blocks. If you
> want to disable this feature, you must add the parameter NoFrag to your MASM
> or TASM command line. For example, to disable fragmentation support when
> building a large-model version of swap(), you would enter:
You may use following commands to link SWAPTEST example (if you use ARROWASM
assembler and VAL linker) :
asm/ml mc-swap;
cc swaptest.c -pl
val/nci mc-swap %MCDIR%\pc86rl_s.obj swaptest, swaptest.exe, nul, %MCDIR%\mclib.lib
for SMALL Model or
val/nci/com %MCDIR%\pc86rl_t.obj mc-swap swaptest, swaptest.com, nul, %MCDIR%\mclib.lib
for TINY Model
Attention: It is better to use MC-SWAP.OBJ object filename as first in linker
command line, but it impossible for Model Tiny.
Yury Semenov, yury@petre.odessa.ua
Fidonet#2:467/2
List of files included to this archive (MC-SWAP.ZIP) :
------------------------------------------------------------
READ.ME This file
MKSWAPTE.BAT Builds object files and links example program
MC-SWAP.ASM Source for swap routines
SWAP.H Header file for MICRO-C
SWAPTEST.C Example program showing how to use
SWAP.DOC Original swap() documentation
--- Notes from Dunfield Development Systems ---
I have not checked this function out in detail, however it appears
to work correctly. I take no responsibility for it!
For those who do not have the original SWAP300.ZIP archive, I have
included the ORIGINAL SWAP.DOC documentation from it. Combined with
the comments above, it should provide adaquate documentation.
I have taken the liberty of modifying the MC-SWAP.ASM file to make
all symbols match in case. This allows you to compile and link
EVERYTHING in case sensitive mode (C is normally case sensitive).
I have also adjusted the MKSWAPTE.BAT file and the above examples
to reflect the case sensitive assembly and link.
Dave Dunfield - June 23, 1995