Category : Files from Magazines
Archive   : MAR92.ZIP
Filename : 3N03024B

 
Output of file : 3N03024B contained in archive : MAR92.ZIP
#include
#include
#include

#pragma pack(1)



void main(int argc, char **argv)

{
int handle;
union REGS regs;
struct { // control block for READ IOCTL
unsigned char cmd;
unsigned int adr_off;
unsigned int adr_seg;
} addrbuf;

if (argc >= 2)
{ // open device specified
if (!_dos_open(argv[1], O_RDONLY, &handle))
{
addrbuf.cmd = 0; // ioctl command 0
regs.x.ax = 0x4402; // ioctl read
regs.x.cx = sizeof addrbuf; // length to read
regs.x.dx = (unsigned) &addrbuf; // buffer to fill
regs.x.bx = handle; // open device handle
intdos(®s, ®s); // do IOCTL read
if (!regs.x.cflag)
<%-2>printf("Device header addr for %s is %04X:%04X\n",<%0>
argv[1], addrbuf.adr_seg, addrbuf.adr_off);
else
printf("Error on IOCTL read\n");
}
else
printf("Unable to open device %s\n", argv[1]);
}
else
printf("Please enter name of device driver\n");
}

/* End of File */



  3 Responses to “Category : Files from Magazines
Archive   : MAR92.ZIP
Filename : 3N03024B

  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/