Category : Alternate Operating Systems - Quarterdeck DesqView, CP/M, etc
Archive   : DVTKIT11.ZIP
Filename : MAILBOX.DOC

Output of file : MAILBOX.DOC contained in archive : DVTKIT11.ZIP


by Gary Chanson
(C) 1993

MAILBOX is Copyright 1993 by Gary Chanson and Starquest
Systems. No restrictions are placed on the non-commercial
use of this program. This program and its documentation
may be copied and re-distributed provided that they are
not changed and no fee is charged for them. An exception
is granted to not-for-profit user's groups, which are
authorized to charge a nominal fee for materials and
handling. Starquest Systems and Gary Chanson assume no
liability for damages caused by the use of this program.


MAILBOX is a DESQview (tm) specific utility which creates, frees
and assigns names to mailboxes. New mailboxes are the property
of the current task, and will be freed when it terminates. If no
task is specified, the default mailbox of the current task is
named. This identifier is used by other utilities to obtain the
handle of this task for inter-task communications. Mailboxes can
be used to exchange messages between tasks and as semiphores to
control program access and flow.


MAILBOX [options] name


-C Conditional mode (only if un-named) - requires V2.5+
-E returns name as Environment variable %MAILBOX
-F Free mailbox
-N create New mailbox in current task
-Q Quiet mode
-S Show name - requires V2.5+
-Tname name of mailbox or Task


To setup a semiphore, create a suitably name mailbox and send a
message to it to enable it. The first task to read the mailbox,
empties it, executes the program which needs protection, and then
sends a new message to the mailbox to re-enable it. Each task
must interrogate the mailbox using READMAIL -W. The contents of
the message are not important.

Let's say you want to protect a print job from being disrupted.
To start, we need a mailbox named PRINTER as our semiphore.

MAILBOX -N printer ; create a mailbox named PRINTER
SENDMAIL printer free ; prime it with a message

Now, all print operations must check this mailbox before printing
and re-enable it after.

READMAIL -W -Tprinter ; test semiphore and wait...
PRINT %1 %2 %3 ; safe to print now
SENDMAIL printer free ; re-enable semiphore


Please forward all comments and bug reports to:

Gary Chanson

31 Chester Avenue
Waltham, MA 02154

Voice: 617-899-4771
Data/Fax: 617-899-6672

Email: [email protected]

  3 Responses to “Category : Alternate Operating Systems - Quarterdeck DesqView, CP/M, etc
Archive   : DVTKIT11.ZIP
Filename : MAILBOX.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: