Dear Reader,
This MP-DOS (Multi-Programming in DOS) project was done by
me and my colleague Sriram.V. The entire source is in assembly. V have tried 2 make
the source as readable as possible.
Input :
"N" number of EXE files. (DOS executables. N <=13)
Output :
All the EXE files are loaded in RAM and the first executable is given the chance
of execution. Pressing ALT+TAB causes
switch in execution. Now , the second starts executing
and so on. The entire state of a process is stored and restored automatically by
our program. The name of the EXE files are hard coded in the Source file (pmwork.asm)
itself. If u want to add new executables, u need 2
change the source and assemble n link it again :-(
Requirements : Tasm/Tlink (or) Masm/Link
How do I configure the S/W to add a new EXE file ?? Note: Before adding ensure, that your computer has enough RAM (Max 16MB) to support it. Each process requires 1 Mb of RAM for it.
In the Source File (PMWORK.ASM) ,
1. One can find an area where PARA_BLOCK of all the Tasks are declared (following shortly the Global Descriptor Table) . Suppose currently 4 tasks are supported , the declaration would look like this
"TASK1 PARA_BLOCK < 0 , 0 , ...................,20H>"
"TASK2 PARA_BLOCK <0 , 0, .........................,30H>"
.
.
"TASK4 PARA_BLOCK <0,0,.............................,50h>".
If u need 2 add a new task now, the
add another TASK5 para_block at the end like this.
"TASK5 PARA_BLOCK <0,0................................,60h>
Note: Don't use PARA_BLOCK <0,0,.......................................,0F0H>. The 16th MB of RAM is utilized by this software to store the status of DOS before this S/W was executed !
2. Add the full path of the program u want 2 run in the "progname" .
3. Update the variable "NPROCESS" accordingly .
4. Assemble and link it. (Using TASM or MASM, TLINK or LINK)
possible Enhancements and few drawbacks
1.. There is no facility to dynamically accept new programs and load them into memory. Every time one has to change the source code , assemble and link it.
2. This project can be very easily ported to 386. currently since only 286 features are used, at maximum of 13 processes can be simultaneously reside in memory. (286 can address only 16 Mb of RAM.).
3. Graphics programs aren't supported by our S/W yet. Although Task Switch occurs , since v don't save and restore the Video Hardware, the user can't notice the changes in the screen. This subsection can be written in "C" and linked with our S/W.
4. Programs which make use of PM features or DPMI etc.. can't be handled by our software. These programs cannot also be supported as a future enhancement. The entire S/W would need to be rewritten again in that case.( we dunno whether it can b done or not)
Thanks , Sarnath.K (intel386@usa.net | sarnath@lycos.com) Sriram.V (paramvi@usa.net )
Link to source file: Pmwork.asm
Last updated: Thursday, April 12, 2001