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

 
Output of file : 2N05033A contained in archive : MAY91.ZIP
/*
* File: CDRom.C
* Purpose: Contains the CDROM Device Driver
* specific commands
*/

#include "device.h"


/* External Functions */
int NetSend (FPTR buf, int size, BYTE session);
int NetReceive (FPTR buf, int size, BYTE session);

/* External Data */
extern BYTE localSession;


/*
* ReadLong : Read CDROM sectors
* Transfer the read request to the server.
* Receive the update header and the data
* into the dta. Cooked mode (0) reads handle
* 2048 bytes per sector, raw mode (1) handle
* 2352.
*/
int ReadLong (RH_CDREAD far *rh)
{
int ret;

/** Send request to server **/
ret = NetSend (rh, rh->rh.length,
localSession);

/** Get the header results back **/
if (!ret)
ret = NetReceive (rh, rh->rh.length,
localSession);

/** See if DTA read to come in **/
if (!ret) {
if (rh->rh.status != 0x100)
/** Read failed **/
return rh->rh.status;

/** Okay to get data **/
ret = NetReceive (rh->dta,
(2048+304*rh->readMode)*rh->count,
localSession);
}

if (ret)
/** An error occurred somewhere **/
return DEV_ERROR | DEV_EREAD | DEV_DONE;

else
return DEV_DONE;
}

/*
* ReadPrefetch : Prefetch CDROM sectors
* No read or data transfer is required. This
* command is advisory only. Therefore, just
* say it happened.
*/
int ReadPrefetch (RH_CDREAD far *rh)
{
return DEV_DONE;
}

/*
* Seek : Seek to CDROM sector
* Mandatory seek to given sector. Only
* the request header must travel to and
* from the server.
*/
int Seek (RH_CDSEEK far *rh)
{
int ret;

/** Send request to server **/
ret = NetSend (rh, rh->rh.length,
localSession);

/** Get the header results back **/
if (!ret)
ret = NetReceive (rh, rh->rh.length,
localSession);

if (ret)
/** An error occurred somewhere **/
return DEV_ERROR | DEV_EREAD | DEV_DONE;

if (rh->rh.status != 0x100)
/** Seek failed **/
return rh->rh.status;
else
return DEV_DONE;
}


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

  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/