Category : Files from Magazines
Archive   : MAY91.ZIP
Filename : 2N05029A

 
Output of file : 2N05029A contained in archive : MAY91.ZIP
/*
* Listing: 2
* File: Device.H
* Purpose: Contains definitions and declarations for
* device drivers
*/

#ifndef STANDARD
#include "standard.h"
#endif

/**
standard part of all driver request headers
**/
typedef struct ReqHdr {
BYTE length; /* header length */
BYTE unit; /* unit number */
BYTE command; /* command code */
WORD status; /* return status */
BYTE reserved[8];
} RH;

/**
INIT Request Header
**/
typedef struct ReqHdr_Init {
RH rh;
BYTE numUnits; /* # of units */
FPTR brkAddress; /* end of driver */
FPTR bpb;
BYTE devNumber;
} RH_INIT;

/**
IOCTL Request Header
**/
typedef struct ReqHdr_IO {
RH rh;
BYTE media; /* media type */
FPTR dta; /* data buffer */
WORD count; /* transfer count*/
WORD start; /* start location*/
FPTR vol_id; /* volume id */
} RH_IO;

/**
CDROM READ Request Header
**/
typedef struct ReqHdr_CDRead {
RH rh;
BYTE addrMode; /* HSG/Red Book */
FPTR dta; /* data buffer */
WORD count; /* sector count */
DWORD start; /* sector start */
BYTE readMode; /* Raw/Cooked */
BYTE iSize; /* interleave */
BYTE iSkip; /* interleave */
} RH_CDREAD;

/**
CDROM SEEK Request Header
**/
typedef struct ReqHdr_CDSeek {
RH rh;
BYTE addrMode; /* HSG/Red Book */
FPTR dta; /* data buffer */
WORD count; /* sector count */
DWORD start; /* sector start */
} RH_CDSEEK;


/**
Device Driver Return Statuses
**/

#define DEV_ERROR 0x8000 /* an error occurred */
#define DEV_BUSY 0x0200 /* device is busy */
#define DEV_DONE 0x0100 /* command completed */

#define DEV_EWPROTECT 0x0000 /* write protected */
#define DEV_EUNIT 0x0001 /* unknown unit */
#define DEV_EDRIVE 0x0002 /* drive not ready */
#define DEV_ECMD 0x0003 /* unknown command */
#define DEV_ECRC 0x0004 /* CRC error */
#define DEV_ERH 0x0005 /* bad request header */
#define DEV_ESEEK 0x0006 /* seek error */
#define DEV_EMEDIA 0x0007 /* unknown media */
#define DEV_ESECT 0x0008 /* sector not found */
#define DEV_EPAPER 0x0009 /* out of paper */
#define DEV_EWRITE 0x000a /* write fault */
#define DEV_EREAD 0x000b /* read fault */
#define DEV_EGEN 0x000c /* general failure */
#define DEV_ECHANGE 0x000f /* disk change error */


  3 Responses to “Category : Files from Magazines
Archive   : MAY91.ZIP
Filename : 2N05029A

  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/