Category : Alternate Operating Systems - Quarterdeck DesqView, CP/M, etc
Archive   : PCCAPP.ZIP
Filename : VPCI.H

 
Output of file : VPCI.H contained in archive : PCCAPP.ZIP
/*
* This file is part of the Choices Operating System
* Developed by: The TAPESTRY Parallel Computing Laboratory
* University of Illinois at Urbana-Champaign
* Department of Computer Science
* 1304 W. Springfield Ave.
* Urbana, IL 61801
*
* Copyright (c) 1987, 1988, 1989, 1990, 1991, 1992
* The University of Illinois Board of Trustees.
* All Rights Reserved.
*
* Author: Lee Lup Yuen ([email protected])
* Project Manager and Principal Investigator: Roy Campbell ([email protected])
*
* Funded by: NSF TAPESTRY Grant No. 1-5-30035, NASA ICLASS Grant
* No. 1-5-25469 and No. NSG1471 and AT&T Metronet Grant No. 1-5-37411.
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for educational, research, and non-profit purposes
* is hereby granted provided that the above copyright notice, the
* original authors names, and this permission notice appear in all such
* copies and supporting documentation; that no charge be made for such
* copies; and that the name of the University of Illinois not be used
* in advertising or publicity pertaining to distribution of the
* software without specific prior written permission. Any entity
* desiring permission to incorporate this software into commercial
* products should contact the Computing Research Laboratory, Department
* of Computer Science, University of Illinois, 1304 W. Springfield
* Avenue, Urbana, IL 61801. The University of Illinois makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/

#ifndef VirtualPCInterface_h
#define VirtualPCInterface_h

#include "ProxiableObject.h"
#include "SemaphoreStar.h"
extern ClassStar VirtualPCInterfaceClass;
class VirtualPCArgs;
class VirtualPCTask;
class VirtualPCRegisterQueue;

// These are the PC vectors commonly called by applications to access
// system services. These constants may be used as the first argument
// for VirtualPCInterface::executeVector().
static const VideoBIOSVector = 0x10;
static const EquipBIOSVector = 0x11;
static const MemoryBIOSVector = 0x12;
static const DiskBIOSVector = 0x13;
static const CommBIOSVector = 0x14;
static const SystemBIOSVector = 0x15;
static const KeyboardBIOSVector = 0x16;
static const PrinterBIOSVector = 0x17;
static const DOSVector = 0x21;

class VirtualPCInterface: public ProxiableObject
{
/* A VirtualPCInterface is used by applications to access DOS, BIOS
* and other system services that may be invoked through software
* interrupt vectors on an ordinary PC. These services are said to be
* provided by a "VirtualPC", and thus this interface to the services is
* called a "VirtualPCInterface". The interface takes care of
* serializing the calls to these services, and also performs buffer
* allocation. In the present implementation, a call to KeyboardBIOSVector
* may occur concurrently with calls to other vectors. This is done for
* greater efficiency of the system (eg. performing disk I/O while waiting
* for a keypress). All other calls are serialized. Applications may
* obtain a pointer to the VirtualPCInterface by looking up the name
* "virtualPCInterface" in the StandardNameServer.
*/
public:
/* Method VirtualPCInterface: Create a VirtualPCInterface. */
VirtualPCInterface ();

/* Method ~VirtualPCInterface: Destroy the VirtualPCInterface. */
~VirtualPCInterface ();

/* Method executeVector: Execute the specified VirtualPC's software
* interrupt vector and pass args as the arguments for the call.
* Perform buffer allocation and copying as needed. This method
* may block until the VirtualPC is not busy (due to serialization).
* See VirtualPCArgs.h (or vpca.h) for more information about args.
* Return one of the error codes described below.
*/
proxiable virtual int executeVector (int vector, VirtualPCArgs *args);

/* Method interceptVector: Upon return, each call to the specified vector
* will be intercepted and will cause a copy of the current registers to
* be enqueued into the specified queue. However, for any intercepted
* vector v, VirtualPCInterface::executeVector (v, ...) will NOT
* cause the registers to be enqueued.
*/
proxiable virtual void interceptVector (int vector,
VirtualPCRegisterQueue *queue);

/* Method restoreVector: Undo a previous interceptVector call: the
* specified vector will no longer be intercepted.
*/
proxiable virtual void restoreVector (int vector);

/* Method classOf: Return the class of this object. */
Class *classOf ();

/* Error codes for executeVector(). OutOfBuffers means that the
* VirtualPC did not have enough space to allocate the buffers in
* the 16-bit address space; CannotSetDTA means that DOS was unable
* to set the user-defined DTA successfully; Failed means that the
* VirtualPC encountered an error while executing the vector (eg.
* corrupted code in 16-bit address space).
*/
enum {Successful = 0, Failed = 1, OutOfBuffers = 2, CannotSetDTA = 3};
private:
/* Method allocateBuffers: Allocate buffers in the VirtualPC's
* 16-bit address space according to args. Copy buffers from the
* 32-bit address space to the 16-bit address space if necessary.
*/
int allocateBuffers (VirtualPCArgs *args);

/* Method copyResultBuffers: Look at args and copy buffers from the
* VirtualPC's 16-bit address space to the general 32-bit address space
* if necessary.
*/
void copyResultBuffers (VirtualPCArgs *args);

/* Method allocateDTA: If specified in args, allocate a DTA in the
* VirtualPC's 16-bit address space. Copy the DTA from 32-bit address
* space to 16-bit address space.
*/
int allocateDTA (VirtualPCArgs *args, unsigned int dtaAddr);

/* Method copyResultDTA: If DTA is used in args, copy the DTA from 16-bit
* address space to 32-bit address space.
*/
void copyResultDTA (VirtualPCArgs *args, unsigned int dtaAddr);

/* Permit up to two concurrent tasks in the VirtualPC. */
VirtualPCTask *task [2];

/* Semaphores for serializing the vector calls. taskMutex[1] is
* for calls to KeyboardBIOSVector, taskMutex[0] is for calls to
* all other vectors.
*/
SemaphoreStar taskMutex [2];
};

#endif
/*
* This file is part of the Choices Operating System
* Developed by: The TAPESTRY Parallel Computing Laboratory
* University of Illinois at Urbana-Champaign
* Department of Computer Science
* 1304 W. Springfield Ave.
* Urbana, IL 61801
*
* Copyright (c) 1987, 1988, 1989, 1990, 1991, 1992
* The University of Illinois Board of Trustees.
* All Rights Reserved.
*
* Author: Systems Research Group ([email protected])
* Project Manager and Principal Investigator: Roy Campbell ([email protected])
*
* Funded by: NSF TAPESTRY Grant No. 1-5-30035, NASA ICLASS Grant
* No. 1-5-25469 and No. NSG1471 and AT&T Metronet Grant No. 1-5-37411.
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for educational, research, and non-profit purposes
* is hereby granted provided that the above copyright notice, the
* original authors names, and this permission notice appear in all such
* copies and supporting documentation; that no charge be made for such
* copies; and that the name of the University of Illinois not be used
* in advertising or publicity pertaining to distribution of the
* software without specific prior written permission. Any entity
* desiring permission to incorporate this software into commercial
* products should contact the Computing Research Laboratory, Department
* of Computer Science, University of Illinois, 1304 W. Springfield
* Avenue, Urbana, IL 61801. The University of Illinois makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/
/* This file was generated by Proxify++ version 0.1 */

#ifndef VirtualPCInterface_h
#define VirtualPCInterface_h
#ifdef __GNUG__
#pragma once
#pragma interface
#endif
#include "ProxiableObject.h"
#include "SemaphoreStar.h"
extern ClassStar VirtualPCInterfaceClass;
class VirtualPCArgs;
class VirtualPCTask;
class VirtualPCRegisterQueue;
static const VideoBIOSVector = 0x10;
static const EquipBIOSVector = 0x11;
static const MemoryBIOSVector = 0x12;
static const DiskBIOSVector = 0x13;
static const CommBIOSVector = 0x14;
static const SystemBIOSVector = 0x15;
static const KeyboardBIOSVector = 0x16;
static const PrinterBIOSVector = 0x17;
static const DOSVector = 0x21;
class VirtualPCInterface : public ProxiableObject {
public:
proxiable virtual int executeVector(int vector, VirtualPCArgs * args);
proxiable virtual void interceptVector(int vector, VirtualPCRegisterQueue * queue);
proxiable virtual void restoreVector(int vector);
};
#include "VersionInstaller.h"
REQUIREDVERSION( VirtualPCInterface );
#endif VirtualPCInterface_h


  3 Responses to “Category : Alternate Operating Systems - Quarterdeck DesqView, CP/M, etc
Archive   : PCCAPP.ZIP
Filename : VPCI.H

  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: http://www.os2museum.com/wp/mtswslnk/