home *** CD-ROM | disk | FTP | other *** search
- ---------------------------------------------
- * MultiDos Plus Rel. 4.01 Shareware Version *
- * Copyright (c) 1986 - 1991 Nanosoft Inc. *
- ---------------------------------------------
-
- Welcome to MultiDos Plus, a powerful real-time multitasking shell
- for DOS. MultiDos Plus is a copyrighted work of Nanosoft Inc
- and is NOT public domain.
-
- If you like this product, register with us for $35, and we will
- send you the commercial version of MultiDos Plus ($99 value)
- with printed documentation.
-
- You may freely copy and distribute this product as long as you
- abide by the following conditions:
-
- a) You may not charge any fee for making copies or sell this product.
- b) You may not distribute this as part of any product or
- service for which you charge a fee.
- c) You must copy the product in its entirety with no changes.
-
- If you would like to do any of the above, you must have our permission
- in writing. Contact us for site licensing and royalty arrangements.
-
- ------------
- * WARRANTY *
- ------------
-
- This product is distributed with absolutely no warranty of
- any kind.
-
- -------------------
- * How to Register *
- -------------------
-
- Send a check for $35 to:
-
- Nanosoft Inc.
- 13 Westfield Road
- Natick, MA 01760
- Attn: Shareware Dept.
-
- To register using Mastercard or Visa call (508) 651-0091.
-
- To register by FAX send name, address, and charge card information
- (be sure to include expiration date) and telephone numbers
- to (508) 655-8860.
-
- -------------------------------------------------------------
- * Differences between the commercial and shareware versions *
- -------------------------------------------------------------
-
- The commercial version which you will receive when you
- register has the following additional features:
-
- a) It supports 64 tasks instead of the 3 tasks supported
- by this version.
-
- b) The commercial version supports programs running in
- LIM 4.0 expanded memory. This version supports progams
- running in conventional memory only.
-
- The documentation accompanying this product is for the
- commercial version. Therefore, disregard all references
- to expanded memory and related commands.
-
- -----------------------------
- * To install MultiDos Plus: *
- -----------------------------
-
- Print the file MDSHARE.PRN and read it before using
- Multidos Plus.
-
- For a quick start type MULTIDOS to start the
- program. When it is up, type a ? for a brief
- list of commands.
-
- The following is a list of new features or information
- not found in the manual. Read the manual first before
- reading the following sections.
-
- --------------------
- Command Line Options
- --------------------
-
- A new command line option has been added which tells MultiDos Plus not
- to load the MDBIO10.EXE display BIOS. This option may be invoked by
- typing /NO10 on the MultiDos Plus command line. For example:
-
- MULTIDOS /NO10
-
- This option is useful for applications which only have one task which
- will ever write to the display. It may also be useful if your tasks
- cooperate with each other in their use of the display by using a
- resource semaphore to control display usage.
-
- Please note that RS-232 output redirection is performed by the MDBIO10
- module. If your application uses the COMM command to specify I/O
- redirection, the /NO10 option will disable the redirection of the
- display output.
-
-
- *** /NOMAP ***
-
- A new option is available to disable the mapping of LIM memory into
- empty spaces above the C000 segment. Use /NOMAP to disable the mapping.
-
-
- *** /NOCB ***
-
- A new option is available to disable the checking for CTRL-C and
- CTRL-BREAK during DOS writes. Use /NOCB to completely disable the
- checking for these two key combinations. If this option is not used
- and a CTRL-C is pressed during a DOS write to the CRT display, the
- application may be aborted, or if if has an INT 23H handler that ignores
- CTRL-C or CTRL-BREAK, an ugly unexpected ^C may be displayed.
-
- Using /NOCB makes it possible to use the ANSI.SYS functions to format
- and control a display without risking that the operator may enter a
- CTRL-C during a DOS display write.
-
-
- -----------------
- Operator Commands
- -----------------
-
- * ASG Command *
-
- MultiDos Plus has a feature which will enable certain keys
- to bring a task to the foreground immediately without using the
- ALT Z sequence. The PC keyboard function keys and ALT keys may be
- used for this purpose. For example, the F1 function key may be set to
- always bring the COMMAND task to the foreground. Once a key assignment
- has been made, the task may be brought to the foreground any time the
- key is pressed. The way to make this assignment is to use the ASG command.
-
- The ASG command allows the assignment of up to 10 keys to 10 tasks.
- The syntax for the ASG command is:
-
- ASG [<task name> <index> <scan code>]
-
- If the ASG command is entered without any arguments, a list of current
- key assignments will be displayed. Each of the 10 entries in the
- assignment table is listed in the order: index, scan code, task name.
-
- The arguments specify a mapping between a specified scan code and a
- task name. The scan code must be specified as a decimal number. The
- ASG command to map the COMMAND task to the F1 function key would be:
-
- ASG COMMAND 0 59
-
- This command would set the first entry in the assignment table to
- map the task COMMAND to scan code 59 which is the F1 function key.
-
- The decimal values for the function key scan codes are:
-
- Key Normal Shifted Ctrl Alt
-
- F1 59 84 94 104
- F2 60 85 95 105
- F3 61 86 96 106
- F4 62 87 97 107
- F5 63 88 98 108
- F6 64 89 99 109
- F7 65 90 100 110
- F8 66 91 101 111
- F9 67 92 102 112
- F10 68 93 103 113
-
- The scan codes for other function keys and the Alt keys may also
- be used.
-
- If an astrisk is used in the place of a task name, the key assignment
- has a different meaning. Whenever that key is pressed, the previous
- foreground task is brought back to the foreground. For example:
-
- ASG * 0 61
-
- Whenever the F3 function key is pressed, the previous foreground task
- will be brought back to the foreground.
-
- The value after the task name is the assignment table index and can
- range from 0 to 9. Entries may be placed in any order in the table.
- When a key is pressed, the entry with a matching scan code closest
- to the begining of the table is used.
-
- The /NALTZ command line option will not disable the single key task
- selection feature.
-
-
-
- * BAT Command *
-
- The BAT command will tell MultiDos Plus to execute commands from an
- ASCII text file as if they were entered from the keyboard. The format
- is:
-
- BAT filename
-
- where filename is any DOS pathname. All commands in the file are executed
- by MultiDos Plus before any other commands (i.e. INT 15H, function 15)
- are executed. No other task's child process requests are processed
- until the BAT command is finished.
-
- A BAT batch file can also contain embeded batch commands.
-
-
-
-
- * FG Command *
-
- A feature of the FG command, missing from the manual, is the ability
- to bring the previous foreground task back into the foreground without
- having to know the task's name. If an astrisk is used in place of the
- task name, the previous foreground task is brought back to the foreground.
- This function is most useful when a task is done with the foreground and
- wants to switch itself to the background, restoring the task that was
- previously in the foreground. The task can submit an FG command, using
- INT 15H function code 15, to MultiDos Plus.
-
-
-
- * REM Command *
-
- A command has been added to allow the addition of remark statements to
- automatic startup files. The REM command may be added to document
- the content of the file. Any characters after the REM are completly
- ignored. The following are examples of some REM statements:
-
- REM This is a test
- REMthisisatest
- REMARKABLE application written by Jack Spratt
-
-
- -----------------------------
- Application Program Interface
- -----------------------------
-
- Several additional functions have been added to the Application Program
- Interface.
-
- * Return Memory Parameters *
-
- Function code = 31
- Entry:
- AH = 31
- Exit:
- BX = First memory segment of conventional memory
- DX = First memory segment of the LIM swap frame
- created by MultiDos Plus to load programs into
-
-
-
- * Test if Multitasking is Disabled *
-
- Function code = 32
- Entry:
- AH = 32
- Exit:
- AX = 0 if multitasking is enabled
- or
- AX = TCB of task that disabled multitasking
-
- This function may be useful by interrupt handlers which may need
- to know if multitasking is disabled or not.
-
-
- -------------------------------------------
- IRQ Enhancement for LIM Tasks
- -------------------------------------------
-
- The IRQ command has been enhanced to support programs with interrupt
- service routines in swappable LIM memory. This includes many of the
- off-the-shelf communication programs as well as many other types of
- programs. The enhancement added a new command line optioin and two
- additional MultiDos Plus commands.
-
- The /IRQ command line option is used to enable the new features. If
- MultiDos Plus is invoked without this option, the IRQ command functions
- as documented in the manual. The /IRQ option must be followed by a
- hexadecimal value between 78 hex and F0 hex. This option can only
- be used on AT type computers. The /IRQ will tell MultiDos Plus to
- reprogram the 8259 interrupt controllers to use the specified vectors
- rather than the standard vectors. MultiDos Plus will then intercept
- all the hardware interrupts and re-vector them thru the original
- vectors. This allows MultiDos Plus to check if the interrupt has
- been associated with a task executing in swappable LIM memory and
- if so, map the task in before vectoring to the old vector. When the
- old vector ISR has finished processing, it returns to MultiDos Plus
- to restore the interrupted task's memory context.
-
- If the /IRQ option is used, the MultiDos Plus IRQ command is used to
- associate a hardware interrupt to the next loaded task.
-
- For example, suppose you want to run PROCOMM in LIM memory and
- using a modem connected to COM1. You also determine that nothing
- in your system uses the interrupt vectors 80H thru 8FH.
- MultiDos Plus is invoked by entering:
-
- MULTIDOS /IRQ 80
-
- At the $ prompt enter the following commands:
-
- RM 300 (assuming your version of PROCOMM only needs 300K)
- IRQ 4 (COM 1 is IRQ 4, COM 2 is IRQ 3)
- PROCOMM (assume in your current directory)
-
- PROCOMM will be loaded in a 300K block of memory and will be associated
- with IRQ 4 (INT 0CH).
-
- Two additional commands have been defined to associate or disassociate
- IRQs with tasks that have already been loaded. These commands are
- SIRQ to associate and CIRQ to clear an association. The SIRQ command
- will allow the association of more than one IRQ to a task. The
- format for the SIRQ command is:
-
- SIRQ task irq#
-
- and the CIRQ command is:
-
- CIRQ irq#
-
- If an IRQ is already associated with a different task, SIRQ will
- issue an error message.
-
- The assignment of IRQ 0 is not permitted.
-
- When a task terminates, all IRQs associated with the task are cleared.
-
-
-
- ---------------------------------------------
- Application Interface for Task Context Switch
- ---------------------------------------------
-
- In order to provided our customers with high performance
- multitasking, the task context save and restore procedures save only
- the most necessary context required by most tasks. Some
- applications may require that certain other context be preserved
- at every task switch. An example might be several tasks which make
- use of the 8087 coprocessor. Although the coprocessor can be treated
- as a resource and controlled with a semaphore, this may not be
- feasable (lack of source code) or practical (complex calculations
- in pre-existing software). Another example might be the saving
- and restoring of a software interrupt needed by several tasks running
- in LIM memory.
-
- An interface has been developed which allows applications to get
- involved in the task context switch process. It is possible to set
- the entry point for two routines, one to save context and the other
- to restore context. The routine to restore context will be executed
- just before a task is allowed to run and the routine to save context
- will be executed when a task's execution is suspended (end of timeslice,
- give up timeslice, read keyboard, suspend for interval, etc.).
-
- The two routines are global. e.g. All tasks must use the same routines.
-
- Since some tasks require certain context be preserved and others do
- not, a flag mechanism exists to inform the context save and restore
- routines if and what context, if any, should be saved/restored. A
- new command, MISCFLAG, has been added which is used to set bits in
- the MISCFLAG word (byte offset 200) in the TCB. The format of the
- command is:
-
- MISCFLAG <hex value>
-
- The <hex value> is masked with hex 7F to keep only the lower 7 bits
- and is placed in the upper byte of the miscellaneous flag word when a
- task is first loaded. In other words, this command must be issued just
- prior to loading a task.
-
- When MultiDos Plus saves or restores a task's context, the value
- specified by the MISCFLAG command is checked for non-zero. If no
- MISCFLAG command is issued prior to a task load, the default value
- is zero. If a non-zero value is found, the application supplied context
- routines are executed.
-
- As stated earlier, the context save and restore routines are global
- and should probably be written as a TSR which must be executed under
- MultiDos Plus and must be installed in conventional memory. A sample
- TSR is supplied named APPLCTX.ASM to save and restore floating point
- context for a real 8087 and/or Microsoft floating point emulation. The
- TSR initialization code informs MultiDos Plus of the two routine's entry
- points by issuing a special INT 15H API call. The following code
- fragment can be used to set up the entry points. It assumes that
- the context save/restore routines are in the same code segment as
- the code fragment.
-
- MOV AX,1E08H ; FUNCTION AND SUBFUNCTION CODES
- PUSH CS
- POP DX ; SEGMENT OF ROUTINE CODE
- MOV BX,OFFSET CTXSAVE ; OFFSET OF CONTEXT SAVE ROUTINE
- MOV CX,OFFSET CTXRSTR ; OFFSET OF CONTEXT RESTORE ROUTINE
- INT 15H
-
- When either the save or restore routine is entered, ES:BX will be
- pointing to the task in question's TCB. Care must be exercised not
- to destroy any registers. When the routine is finished it must use
- a far return to return control to MultiDos Plus.
-
- The save and restore routines can be removed from execution by
- executing INT 15H function 1E08H and setting the save and restore
- routine entry points to null (0000:0000) pointers.
-
- A new field has been added to the TCB to aid the context save/restore
- routines in indexing into their context tables. The word at byte offset
- 220 in the TCB has the TCB index which is a value from 0 to the number
- of TCBs - 1. If the default number of TCBs (12) is configured, the largest
- TCB index will be 11.
-
- If you are trying to execute several BASIC programs, you may wish to
- use the APPLCTX TSR as most BASIC's use floating point.
-
- Other possible context save/restore needs might be the 32-bit registers
- in a 386 or the GDTR, LDTR, IDTR, etc. This should allow the execution
- of multiple DOS extenders or 32-bit software.
-
-
-
- --------------------------------------------------------------------
-
- P E R F O R M A N C E
-
- --------------------------------------------------------------------
-
-
- If MultiDos Plus is used in an application where you have complete
- control of the source code, here are several tips which can be used
- to help you gain the maximum possible performance from the hardware
- which will be running your software.
-
- Keep in mind that if a task waits for a key from the keyboard, waits
- for a message from a message queue, waits for an event, or waits for
- control of a resource semaphore, the task will not receive any time
- until a character, message, event or control is received. This gives
- more time to other running tasks doing useful work.
-
- Use the API function to give up your timeslice (AH = 0) where ever
- possible. This function will allow another task to have a chance
- to run if the current task has no useful work to perform for the rest
- of a timeslice. For example, if a task was displaying the current
- time on the display and checking for a keyboard input, it should give
- up its timeslice at the end of the loop if no keyboard input was
- received. In addition, only get and check the time as often as
- realistically required. There is no need to update the time display
- 18 times a second if the resolution is in minutes!
-
- If you are using the /PR scheduling option be sure to use the API
- function to suspend a task (AH = 3) in order to give up a timeslice.
- Use of the API function (AH = 0) to give up a timeslice under this
- scheduling option may prohibit tasks of a lessor priority from
- executing because execution is given to the highest priority task
- in the READY queue.
-
- If the default scheduling is used and you are setting different
- task priorities, be sure at least one task has a priority of zero.
- This will insure the maximum possible performance from the scheduling
- mechanism.
-
- If you don't need the ANSI.SYS emulation for a task, turn it off
- using the NANSI MultiDos Plus command. This will eliminate the
- overhead associated with this feature.
-
- If a task will never use the display, use the ND command prior to
- loading the task .EXE or .COM. Be sure to use the XQ command to
- start execution immediately after the task is loaded.
-
- If your application only requires a single task to write to the
- display, use the /NO10 option to inhibit the loading of the
- MultiDos Plus BIOS INT 10H replacement (MDBIO10.EXE) which would
- not be necessary. This would eliminate additional overhead when
- writing to the display.
-
-
-