home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume25 / st01scsi / part01 next >
Encoding:
Text File  |  1991-11-04  |  44.5 KB  |  1,629 lines

  1. Newsgroups: comp.sources.misc
  2. From: briana@tau-ceti.isc-br.com (Brian W. Antoine)
  3. Subject:  v25i018:  st01scsi - DOS SCSI Driver for the Seagate ST-01, v2.0, Part01/02
  4. Message-ID: <csm-v25i018=st01scsi.213229@sparky.IMD.Sterling.COM>
  5. X-Md4-Signature: 3180d53f0c86f6c6737916d984dd4cec
  6. Date: Tue, 5 Nov 1991 03:34:28 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: briana@tau-ceti.isc-br.com (Brian W. Antoine)
  10. Posting-number: Volume 25, Issue 18
  11. Archive-name: st01scsi/part01
  12. Environment: DOS, ST-01
  13. Supersedes: ST01SCSI.12: Volume 15, Issue 2-3
  14.  
  15.      This is release 2.0 of my SCSI driver for the Seagate ST-01 card.
  16. Its major feature is support for large drives under DOS 4.0 and higher.
  17. It also refines the support for the tape driver and handles multiple
  18. containers per tape now.  It also includes a simple remap utility for
  19. mapping out bad sectors on hard disks.
  20.  
  21. #
  22. # This is a Shell Archive.
  23. # Remove everything above and including the cut line.
  24. # Then run the rest of the file through #! /bin/sh.
  25. # -----cut here-----cut here-----cut here-----cut here-----
  26. #! /bin/sh
  27. # Execute the file with #! /bin/sh (not csh) to create the files:
  28. #    readme.txt
  29. #    history.txt
  30. #    makefile
  31. #    binmode.c
  32. #    mt.c
  33. #    sformat.c
  34. #    sremap.c
  35. #    ioctl.h
  36. #    equ.inc
  37. #    options.inc
  38. #    struct.inc
  39. # This Archive created: Fri Oct 18 22:46:52 1991
  40. # By: Brian W. Antoine at ISC - Bunker Ramo, Spokane, WA
  41. #
  42. export PATH; PATH=/bin:$PATH
  43. echo shar: extracting "'readme.txt'" '(391 characters)'
  44. if test -f 'readme.txt'
  45. then
  46. echo shar: will not over-write existing file "'readme.txt'"
  47. else
  48. sed 's/^XX//' > 'readme.txt' << \SHAR_EOF
  49. XXScsi Version 2.0
  50. XX
  51. XX     This is release 2.0 of my SCSI driver for the Seagate ST-01 card.
  52. XXIt major feature is support for large drives under DOS 4.0 and higher.
  53. XXIt also refines the support for the tape driver and handles multiple
  54. XXcontainers per tape now.  It also includes a simple remap utility for
  55. XXmapping out bad sectors on hard disks.
  56. XX
  57. XXBrian Antoine 10/18/91 'briana@tau-ceti.isc-br.com'
  58. SHAR_EOF
  59. if test 391 -ne "`wc -c < 'readme.txt'`"
  60. then
  61. echo shar: error transmitting "'readme.txt'" '(should have been 391 characters)'
  62. fi
  63. fi # end of overwriting check
  64. echo shar: extracting "'history.txt'" '(7155 characters)'
  65. if test -f 'history.txt'
  66. then
  67. echo shar: will not over-write existing file "'history.txt'"
  68. else
  69. sed 's/^XX//' > 'history.txt' << \SHAR_EOF
  70. XXScsi Version 1.0
  71. XX
  72. XX     The code you received with this file is a very simple SCSI device
  73. XXdriver that uses the Seagate ST-01 interface card.  As this driver is
  74. XXmy first PC assembler project other then "hello world", please don't
  75. XXsnicker to loudly.
  76. XX
  77. XX     The package includes the source for a device driver that will scan
  78. XXthe SCSI bus for disk drives and partition any drives found into chunks
  79. XXof 32Meg plus any leftovers.  As soon as I discover a way to get DOS to
  80. XXlet me use > 512 byte sectors, It will just allocate the entire disk to
  81. XXa single logical drive.  It also includes a utility to access the low
  82. XXlevel SCSI format function for any disk found.  You may specify the
  83. XXinterleave when the low level format is done and the version of the
  84. XXdriver here seems to work fine at 1:1 with my 8Mhz NEC.
  85. XX
  86. XX     Some of the things to look out for are:
  87. XX
  88. XX#1 The receive_data and send_data functions in subs.asm use polled I/O
  89. XX   to transfer data to/from the card.  I would have loved to just use
  90. XX   the I/O Channel Ready line that the card is suppose to support, but
  91. XX   my NEC does not seem to use that line.  Hence the polling of the REQ
  92. XX   bit in the status port.
  93. XX
  94. XX#2 I did not know how to do clock speed independent timing loops, so there
  95. XX   is a wait100us function in subs.asm that is very processor speed
  96. XX   dependent :-(
  97. XX
  98. XX#3 In ioctl.asm there is a commented out call to scsi_verify.  This is
  99. XX   used by the DOS format utility to scan for errors.  You may want to
  100. XX   enable the call after you get everything setup.  I shut it off while
  101. XX   I was testing as I didn't want to wait for the verify everytime I
  102. XX   changed the interleave.
  103. XX
  104. XX     To bring up the driver.  Assemble and link scsi.sys and add it to
  105. XXyour config.sys file.  After rebooting, you may optionaly do a low level
  106. XXformat of each disk found using sformat.exe.  You then use the DOS format
  107. XXutility on each logical drive.  I did figure out just what format needed
  108. XXin the way of ioctl support to get it to do the high level format for me.
  109. XXAt this point you should have fully functional DOS drives.  In testing
  110. XXI found that with multi_sector support (subs.asm) enabled, the SCSI drives
  111. XXwere just about as fast as the ST-412 C: that came with the machine.  I
  112. XXam sure that the speed problem is basic to the inner loop of the data
  113. XXtransfer routines, but I'm at a loss to figure out how to speed it up.
  114. XX
  115. XX     Anyway, maybe someone can find some use for the code.  I got the
  116. XXcard for free, so I can't really complain about the speed or cost too
  117. XXmuch :-)
  118. XX
  119. XX     Also thanks to the people that sent me samples of other device drivers
  120. XXfor the PC.  I lost the names to a disk crash, but here is the result of
  121. XXyour help and my thanks.
  122. XX
  123. XXScsi Version 1.1
  124. XX
  125. XX     This version of the driver add support for a single tape drive, and
  126. XXcleans up some of the code a little.  It also adds a file that has equates
  127. XXto customize some of the major areas of the driver.
  128. XX
  129. XX     When the driver is initialized it does a scan of the SCSI bus for
  130. XXdevices.  The FIRST tape device found is assigned to a char device with the
  131. XXname "SCSITAPE".  If no tape drive is found, the char device is still valid
  132. XXbut will generate a "bad unit" error when accessed.
  133. XX
  134. XX     The SCSITAPE device expects reads and writes to be done in some variation
  135. XXof 512 bytes.  I/O done where (size mod 512) is non-zero will generate an
  136. XXerror.  Tape access must be done in RAW mode, and this is where I had to
  137. XXsome code in the driver that I'm not sure is very pretty.  The problem is
  138. XXthat DOS insists on opening char devices in cooked mode.  It does give you
  139. XXthe ability to switch to RAW mode, but only by using 'intdos()' to access
  140. XXthe ioctl interface.  The MSC 'setmode()' call for binary will not effect
  141. XXchar devices, nor will opening the file with O_BINARY.  So I had two choices.
  142. XXI could modify every program that expected to talk to the tape so that it
  143. XXalso issued the ioctl stuff (see binmode.c), or I could kludge the driver
  144. XXto issue the required calls.
  145. XX
  146. XX     In the end, I punted and did both.  The code in binmode.c is the function
  147. XXthat along with 'setmode()', will make sure that ANYTHING you open is accessed
  148. XXin RAW mode.  Simply check for any call to 'setmode()' that is switching to
  149. XXO_BINARY, and add another call to 'binmode()'.  This assumes that you have
  150. XXthe source to the utility in question.  For those who are don't mind a little
  151. XXkludge amount friends.  The file options.inc has an equate called 'use_kludge'
  152. XXthat when enabled turns on some code in kludge.asm.  This code links into the
  153. XXINT 21h vector and waits for a DOS open request to go by.  When it sees an
  154. XXopen request, it 'calls' rather then 'jmps' to the normal vector.  This allows
  155. XXthe driver to get the 'handle' returned by DOS.  Because the SCSITAPE device
  156. XXenables the driver_open function, I can tell from the fact that an open is
  157. XXin progress and wether the driver just got an open request, wether any
  158. XXparticular open was for me.  When the open was in fact for the SCSITAPE device,
  159. XXI take the 'handle' returned by DOS and forge the required ioctl calls to
  160. XXswitch to RAW mode.
  161. XX
  162. XX     With the addition of tape support.  I now use GNU Tar to swap tapes with
  163. XXmy normal UN*X system at work.  The driver works well enough that I have yet
  164. XXto have a format problem with the different systems.  It is also a lot faster
  165. XXwhen doing backups on the PC.  Using 'fastback' I would get about 1 Meg a
  166. XXminute thruput on my 8 Mhz AT.  Using GNU Tar and the SCSITAPE device I get
  167. XX> 2.5 Meg a minute to the tape and don't have to swap disks quite so often :-)
  168. XX
  169. XX     Anyway, I hope that someone out there actually gets some use out of this
  170. XXcode.  It has been a real adventure for me.
  171. XX
  172. XXScsi Version 1.2
  173. XX
  174. XX     This version of the driver enhances the tape drive support by adding
  175. XXa program to control the action of the tape drive, and move around within
  176. XXmultiple containers on the tape.  As I used the Bezerkley 'mt' command for
  177. XXideas, the program is naturally called 'mt'.  You can tell the driver to:
  178. XX
  179. XX#1 Rewind/No Rewind on close.
  180. XX#2 Erase the tape.
  181. XX#3 Step forwards or backwards X tape marks.
  182. XX   Note: the command 'mt -s 0' steps to End Of Data.
  183. XX
  184. XX     I also did a little more work on the routines that actually transfer
  185. XXdate to/from the card.  I found that I had left out a check for timeout
  186. XXin the inner loops of the the data xfer routines.  When the random parity
  187. XXerror or other glitch occured.  The driver would hang forever.  Not very
  188. XXfriendly...  The added code does not seem to slow the driver any, or at
  189. XXleast the disk thru-put tester I use shows no difference.
  190. XX
  191. XX     As the driver seems to be stable now, and it does about everything
  192. XXI started out to do.  I'm going to post this to comp.sources.misc instead
  193. XXof alt.sources in the hopes that more people will see it.  Hopefully this
  194. XXwill be usefull to someone else (at least they might get a good chuckle).
  195. XX
  196. XXScsi Version 2.0
  197. XX
  198. XX     This is release 2.0 of my SCSI driver for the Seagate ST-01 card.
  199. XXIt major feature is support for large drives under DOS 4.0 and higher.
  200. XXIt also refines the support for the tape driver and handles multiple
  201. XXcontainers per tape now.  It also includes a simple remap utility for
  202. XXmapping out bad sectors on hard disks.
  203. SHAR_EOF
  204. if test 7155 -ne "`wc -c < 'history.txt'`"
  205. then
  206. echo shar: error transmitting "'history.txt'" '(should have been 7155 characters)'
  207. fi
  208. fi # end of overwriting check
  209. echo shar: extracting "'makefile'" '(719 characters)'
  210. if test -f 'makefile'
  211. then
  212. echo shar: will not over-write existing file "'makefile'"
  213. else
  214. sed 's/^XX//' > 'makefile' << \SHAR_EOF
  215. XX#
  216. XX# SCSI Stuff
  217. XX#
  218. XXCC = cl
  219. XXCFLAGS = -G2 -Ox 
  220. XXAS = masm
  221. XXAFLAGS =
  222. XXSRCS = scsi.asm subs.asm ioctl.asm dump.asm units.asm kludge.asm
  223. XXINCS = options.inc equ.inc struct.inc
  224. XX
  225. XXall: scsi.sys sformat.exe sremap.exe mt.exe
  226. XX
  227. XX#
  228. XX# SCSI Disk Device Driver
  229. XX#
  230. XXscsi.sys: scsi.obj
  231. XX    link +scsi.obj, scsi ;
  232. XX    exe2bin scsi.exe scsi.sys
  233. XX    del scsi.exe
  234. XX
  235. XXscsi.obj: $(SRCS) $(INCS)
  236. XX    $(AS) $(AFLAGS) scsi.asm scsi.obj scsi.lst ;
  237. XX
  238. XX#
  239. XX# SCSI Disk Formatter
  240. XX#
  241. XXsformat.exe: sformat.c ioctl.h
  242. XX    $(CC) $(CFLAGS) -o sformat.exe sformat.c
  243. XX
  244. XX#
  245. XX# SCSI Disk Block Remap
  246. XX#
  247. XXsremap.exe: sremap.c ioctl.h
  248. XX    $(CC) $(CFLAGS) -o sremap.exe sremap.c
  249. XX
  250. XX#
  251. XX# SCSI Tape Control
  252. XX#
  253. XXmt.exe: mt.c ioctl.h
  254. XX    $(CC) $(CFLAGS) -o mt.exe mt.c
  255. XX
  256. XX#
  257. XX# clean
  258. XX#
  259. XXclean:
  260. XX    rm -f *.exe *.obj *.lst
  261. SHAR_EOF
  262. if test 719 -ne "`wc -c < 'makefile'`"
  263. then
  264. echo shar: error transmitting "'makefile'" '(should have been 719 characters)'
  265. fi
  266. fi # end of overwriting check
  267. echo shar: extracting "'binmode.c'" '(497 characters)'
  268. if test -f 'binmode.c'
  269. then
  270. echo shar: will not over-write existing file "'binmode.c'"
  271. else
  272. sed 's/^XX//' > 'binmode.c' << \SHAR_EOF
  273. XX#ifdef MSDOS
  274. XX#include <dos.h>
  275. XX
  276. XXbinmode(fd)
  277. XXint fd;
  278. XX{
  279. XX    union REGS inregs, outregs;
  280. XX
  281. XX    /*
  282. XX    ** get the current mode
  283. XX    */
  284. XX    inregs.h.ah = 0x44;            /* ioctl */
  285. XX    inregs.h.al = 0x00;            /* get */
  286. XX    inregs.x.bx = fd;            /* unit */
  287. XX    intdos(&inregs, &outregs);
  288. XX
  289. XX    /*
  290. XX    ** set to BINARY mode (this works for char devices)
  291. XX    */
  292. XX    inregs.h.ah = 0x44;            /* ioctl */
  293. XX    inregs.h.al = 0x01;            /* set */
  294. XX    inregs.x.bx = fd;            /* unit */
  295. XX    inregs.h.dh = 0;
  296. XX    inregs.h.dl = outregs.h.dl | 0x20;
  297. XX    intdos(&inregs, &outregs);
  298. XX}
  299. XX#endif
  300. SHAR_EOF
  301. if test 497 -ne "`wc -c < 'binmode.c'`"
  302. then
  303. echo shar: error transmitting "'binmode.c'" '(should have been 497 characters)'
  304. fi
  305. fi # end of overwriting check
  306. echo shar: extracting "'mt.c'" '(3087 characters)'
  307. if test -f 'mt.c'
  308. then
  309. echo shar: will not over-write existing file "'mt.c'"
  310. else
  311. sed 's/^XX//' > 'mt.c' << \SHAR_EOF
  312. XX/*
  313. XX** SCSI Tape Control (Low Level)
  314. XX**
  315. XX** usage: mt bsf|bsr|eod|fsf|fsr|offline|online|eof|weof|erase|rewind [count]
  316. XX**
  317. XX** Revision History:
  318. XX**
  319. XX** Version 1.0  09/09/90 Initial Release
  320. XX**
  321. XX** Version 1.1  09/29/90 Use keywords instead of minus style options.
  322. XX**                       This makes us a little more like the
  323. XX**                       bezerkley 'mt' command.
  324. XX**
  325. XX** Version 1.2  10/04/90 Update the i/o packet structure.
  326. XX**
  327. XX*/
  328. XX#include <stdio.h>
  329. XX#include <fcntl.h>
  330. XX#include <string.h>
  331. XX#include <dos.h>
  332. XX#include "ioctl.h"
  333. XX
  334. XX#define TRUE (1)
  335. XX#define FALSE (0)
  336. XX#define VERSION "mt Version 1.2 BWA"
  337. XX
  338. XXextern int _doserrno;
  339. XX
  340. XXstruct cmd ioctl_data;
  341. XXunion REGS inregs, outregs;
  342. XXstruct SREGS segregs;
  343. XXint fd;
  344. XXchar *device = "SCSITAPE";
  345. XXchar far *cp;
  346. XX
  347. XXmain(argc, argv)
  348. XXint argc;
  349. XXchar *argv[];
  350. XX{
  351. XX    /*
  352. XX    ** say hello
  353. XX    */
  354. XX    if (argc < 2 || argc > 3) usage();
  355. XX    if ( !strcmp(argv[1], "bsf") )            /* space by filemark */
  356. XX    {
  357. XX        ioctl_data.command = 'S';
  358. XX        if (argc == 3)
  359. XX            ioctl_data.arg1 = -atoi(argv[2]);
  360. XX        else
  361. XX            ioctl_data.arg1 = -1;
  362. XX        ioctl_data.arg2 = 1;
  363. XX    }
  364. XX    else if ( !strcmp(argv[1], "bsr") )        /* space by block */
  365. XX    {
  366. XX        ioctl_data.command = 'S';
  367. XX        if (argc == 3)
  368. XX            ioctl_data.arg1 = -atoi(argv[2]);
  369. XX        else
  370. XX            ioctl_data.arg1 = -1;
  371. XX        ioctl_data.arg2 = 0;
  372. XX    }
  373. XX    else if ( !strcmp(argv[1], "eod") )        /* space to eod */
  374. XX    {
  375. XX        if (argc == 3) usage();
  376. XX        ioctl_data.command = 'S';
  377. XX        ioctl_data.arg1 = 1;
  378. XX        ioctl_data.arg2 = 3;
  379. XX    }
  380. XX    else if ( !strcmp(argv[1], "fsf") )        /* space by filemark */
  381. XX    {
  382. XX        ioctl_data.command = 'S';
  383. XX        if (argc == 3)
  384. XX            ioctl_data.arg1 = atoi(argv[2]);
  385. XX        else
  386. XX            ioctl_data.arg1 = 1;
  387. XX        ioctl_data.arg2 = 1;
  388. XX    }
  389. XX    else if ( !strcmp(argv[1], "fsr") )        /* space by block */
  390. XX    {
  391. XX        ioctl_data.command = 'S';
  392. XX        if (argc == 3)
  393. XX            ioctl_data.arg1 = atoi(argv[2]);
  394. XX        else
  395. XX            ioctl_data.arg1 = 1;
  396. XX        ioctl_data.arg2 = 0;
  397. XX    }
  398. XX    else if ( !strcmp(argv[1], "online") )
  399. XX    {
  400. XX        if (argc == 3) usage();
  401. XX        ioctl_data.command = 'N';
  402. XX    }
  403. XX    else if ( !strcmp(argv[1], "offline") )
  404. XX    {
  405. XX        if (argc == 3) usage();
  406. XX        ioctl_data.command = 'L';
  407. XX    }
  408. XX    else if ( !strcmp(argv[1], "eof") || !strcmp(argv[1], "weof") )
  409. XX    {
  410. XX        ioctl_data.command = 'M';
  411. XX        if (argc == 3)
  412. XX            ioctl_data.arg1 = atoi(argv[2]);
  413. XX        else
  414. XX            ioctl_data.arg1 = 1;
  415. XX    }
  416. XX    else if ( !strcmp(argv[1], "erase") )
  417. XX    {
  418. XX        if (argc == 3) usage();
  419. XX        ioctl_data.command = 'E';
  420. XX    }
  421. XX    else if ( !strcmp(argv[1], "rewind") )
  422. XX    {
  423. XX        if (argc == 3) usage();
  424. XX        ioctl_data.command = 'R';
  425. XX    }
  426. XX    else
  427. XX    {
  428. XX        usage();
  429. XX    }
  430. XX
  431. XX    /*
  432. XX    ** put together the command
  433. XX    */
  434. XX    fd = open(device, O_WRONLY);
  435. XX    if ( fd < 0 )
  436. XX    {
  437. XX        perror(device);
  438. XX        exit(1);
  439. XX    }
  440. XX    inregs.h.ah = 0x44;            /* ioctl */
  441. XX    inregs.h.al = 0x03;            /* write */
  442. XX    inregs.x.bx = fd;            /* unit */
  443. XX    inregs.x.cx = sizeof(struct cmd);
  444. XX    cp = (char *) &ioctl_data;
  445. XX    inregs.x.dx = FP_OFF(cp);
  446. XX    segregs.ds = FP_SEG(cp);
  447. XX
  448. XX    /*
  449. XX    ** start the command
  450. XX    */
  451. XX    intdosx(&inregs, &outregs, &segregs);
  452. XX
  453. XX    /*
  454. XX    ** see what happened
  455. XX    */
  456. XX    if ( outregs.x.cflag )
  457. XX        printf("mt: %s: error %d.\n", device, _doserrno);
  458. XX    close(fd);
  459. XX    exit(0);
  460. XX}
  461. XX
  462. XXusage()
  463. XX{
  464. XX    puts(VERSION);
  465. XX    puts("usage: mt bsf|bsr|eod|fsf|fsr|offline|online|eof|weof|erase|rewind [count]");
  466. XX    exit(1);
  467. XX}
  468. SHAR_EOF
  469. if test 3087 -ne "`wc -c < 'mt.c'`"
  470. then
  471. echo shar: error transmitting "'mt.c'" '(should have been 3087 characters)'
  472. fi
  473. fi # end of overwriting check
  474. echo shar: extracting "'sformat.c'" '(6035 characters)'
  475. if test -f 'sformat.c'
  476. then
  477. echo shar: will not over-write existing file "'sformat.c'"
  478. else
  479. sed 's/^XX//' > 'sformat.c' << \SHAR_EOF
  480. XX/*
  481. XX** SCSI Disk Formatter (Low Level)
  482. XX**
  483. XX** usage: sformat drive:
  484. XX**
  485. XX** Revision History:
  486. XX**
  487. XX** Version 1.0  08/03/90 Initial Release
  488. XX**
  489. XX** Version 1.1  08/20/90 Add verification message.
  490. XX**
  491. XX** Version 1.2  09/18/90 Correct ioctl_data struct.
  492. XX**
  493. XX** Version 1.3  10/04/90 Update the i/o packet structure.
  494. XX**                       Allow for inputing of the defect list.
  495. XX**
  496. XX** Version 1.4  10/17/90 Use Defines from ioctl.h for commands.
  497. XX**                       If no defect list is entered, ask if
  498. XX**                       the existing list should be used.
  499. XX**
  500. XX** Version 1.5  11/10/90 Allow for either logical block or cyl-head-index
  501. XX**                       styles of defect information.
  502. XX*/
  503. XX#include <stdio.h>
  504. XX#include <dos.h>
  505. XX#include "ioctl.h"
  506. XX
  507. XX#define TRUE (1)
  508. XX#define FALSE (0)
  509. XX#define VERSION "sformat Version 1.5 BWA"
  510. XX
  511. XXextern int _doserrno;
  512. XX
  513. XXstruct cmd ioctl_data;
  514. XXstruct defects_lba defect_list_lba;
  515. XXstruct defects_chi defect_list_chi;
  516. XXunion REGS inregs, outregs;
  517. XXstruct SREGS segregs;
  518. XXunsigned short interleave = 0, format_type = FORMAT_NORMAL;
  519. XXint defect_type = DEFECT_LBA;
  520. XXunsigned char drive;
  521. XXchar far *cp;
  522. XX
  523. XXmain(argc, argv)
  524. XXint argc;
  525. XXchar *argv[];
  526. XX{
  527. XX    long block, cyl, head, index;
  528. XX    short defect_count = 0;
  529. XX    char answer[BUFSIZ];
  530. XX
  531. XX    /*
  532. XX    ** say hello
  533. XX    */
  534. XX    puts(VERSION);
  535. XX    if (argc != 2) usage();
  536. XX
  537. XX    /*
  538. XX    ** figure out who to format
  539. XX    */
  540. XX    if (argv[1][1] != ':') usage();
  541. XX    drive = argv[1][0];
  542. XX    drive = toupper(drive);
  543. XX    drive -= '@';
  544. XX
  545. XX    /*
  546. XX    ** ask about interleave
  547. XX    */
  548. XX    printf("Interleave [0]? ");
  549. XX    fflush(stdout);
  550. XX    fgets(answer, BUFSIZ, stdin);
  551. XX    if ( strlen(answer) ) interleave = atoi(answer);
  552. XX
  553. XX    /*
  554. XX    ** ask for defect list
  555. XX    */
  556. XX    puts("Input your defect list, <enter> to terminate.");
  557. XX    while (defect_count < MAX_DEFECTS)
  558. XX    {
  559. XX        /*
  560. XX        ** which prompt
  561. XX        */
  562. XX        switch ( defect_type )
  563. XX        {
  564. XX            case DEFECT_LBA:
  565. XX            printf("Logical Block Address: ");
  566. XX            break;
  567. XX            
  568. XX            case DEFECT_CHI:
  569. XX            printf("Cyl, Head, Index: ");
  570. XX            break;
  571. XX        }
  572. XX        fflush(stdout);
  573. XX        fgets(answer, BUFSIZ, stdin);
  574. XX        if ( answer[0] == '\n' ) break;
  575. XX
  576. XX        /*
  577. XX        ** switch to cyl-head-index?
  578. XX        */
  579. XX        if ( strchr(answer, ',') ) defect_type = DEFECT_CHI;
  580. XX
  581. XX        /*
  582. XX        ** scan the answer
  583. XX        */
  584. XX        switch ( defect_type )
  585. XX        {
  586. XX            case DEFECT_LBA:
  587. XX            sscanf(answer, "%lx", &block);
  588. XX            defect_list_lba.list[defect_count].defect_lba3 = (block >> 24) & 0x00FF;
  589. XX            defect_list_lba.list[defect_count].defect_lba2 = (block >> 16) & 0x00FF;
  590. XX            defect_list_lba.list[defect_count].defect_lba1 = (block >> 8) & 0x00FF;
  591. XX            defect_list_lba.list[defect_count].defect_lba0 = block & 0x00FF;
  592. XX            format_type = FORMAT_ADDLBA;
  593. XX            break;
  594. XX            
  595. XX            case DEFECT_CHI:
  596. XX            sscanf(answer, "%ld, %ld, %ld", &cyl, &head, &index);
  597. XX            defect_list_chi.list[defect_count].defect_cyl2 = (cyl >> 16) & 0x00FF;
  598. XX            defect_list_chi.list[defect_count].defect_cyl1 = (cyl >> 8) & 0x00FF;
  599. XX            defect_list_chi.list[defect_count].defect_cyl0 = cyl & 0x00FF;
  600. XX            defect_list_chi.list[defect_count].defect_head = head & 0x00FF;
  601. XX            defect_list_chi.list[defect_count].defect_idx3 = (index >> 24) & 0x00FF;
  602. XX            defect_list_chi.list[defect_count].defect_idx2 = (index >> 16) & 0x00FF;
  603. XX            defect_list_chi.list[defect_count].defect_idx1 = (index >> 8) & 0x00FF;
  604. XX            defect_list_chi.list[defect_count].defect_idx0 = index & 0x00FF;
  605. XX            format_type = FORMAT_ADDCHI;
  606. XX            break;
  607. XX        }
  608. XX        defect_count++;
  609. XX    }
  610. XX
  611. XX    /*
  612. XX    ** adjust to be length of list in bytes
  613. XX    */
  614. XX    switch ( defect_type )
  615. XX    {
  616. XX        case DEFECT_LBA:
  617. XX        defect_count *= sizeof(struct defect_entry_lba);
  618. XX        break;
  619. XX
  620. XX        case DEFECT_CHI:
  621. XX        defect_count *= sizeof(struct defect_entry_chi);
  622. XX        break;
  623. XX    }
  624. XX
  625. XX    /*
  626. XX    ** if no defect list was entered, check to see if the
  627. XX    ** existing list should be used.
  628. XX    */
  629. XX    if ( !defect_count )
  630. XX    {
  631. XX        printf("Should the existing G_LIST be used (y,n)? ");
  632. XX        fflush(stdout);
  633. XX        fgets(answer, BUFSIZ, stdin);
  634. XX        if ( answer[0] == 'n' ) format_type = FORMAT_ORIG;
  635. XX    }
  636. XX
  637. XX    /*
  638. XX    ** verify that this is what the user really wants to do
  639. XX    */
  640. XX    printf("Do you really wish to format the SCSI\n");
  641. XX    printf("device that contains drive %c: (y,n)? ", argv[1][0]);
  642. XX    fflush(stdout);
  643. XX    fgets(answer, BUFSIZ, stdin);
  644. XX    if ( answer[0] != 'y' )
  645. XX    {
  646. XX        puts("Aborting low level format ....");
  647. XX        exit(1);
  648. XX    }
  649. XX
  650. XX    /*
  651. XX    ** build the defect list header
  652. XX    */
  653. XX    switch ( defect_type )
  654. XX    {
  655. XX        case DEFECT_LBA:
  656. XX        defect_list_lba.header.reserved = 0;
  657. XX        defect_list_lba.header.options = 0;
  658. XX        defect_list_lba.header.dll_msb = (defect_count >> 8) & 0x00FF;
  659. XX        defect_list_lba.header.dll_lsb = defect_count & 0x00FF;
  660. XX        break;
  661. XX        
  662. XX        case DEFECT_CHI:
  663. XX        defect_list_chi.header.reserved = 0;
  664. XX        defect_list_chi.header.options = 0;    
  665. XX        defect_list_chi.header.dll_msb = (defect_count >> 8) & 0x00FF;
  666. XX        defect_list_chi.header.dll_lsb = defect_count & 0x00FF;
  667. XX        break;
  668. XX    }
  669. XX
  670. XX    /*
  671. XX    ** put together the command
  672. XX    */
  673. XX    inregs.h.ah = 0x44;            /* ioctl */
  674. XX    inregs.h.al = 0x05;            /* write */
  675. XX    inregs.h.bl = drive;        /* unit */
  676. XX    inregs.x.cx = sizeof(struct cmd);
  677. XX    cp = (char *) &ioctl_data;
  678. XX    inregs.x.dx = FP_OFF(cp);
  679. XX    segregs.ds = FP_SEG(cp);
  680. XX    ioctl_data.command = I_FORMAT;
  681. XX    ioctl_data.arg1 = interleave;
  682. XX    ioctl_data.arg2 = format_type;
  683. XX    switch ( defect_type )
  684. XX    {
  685. XX        case DEFECT_LBA:
  686. XX        cp = (char *) &defect_list_lba;
  687. XX        break;
  688. XX        
  689. XX        case DEFECT_CHI:
  690. XX        cp = (char *) &defect_list_chi;
  691. XX        break;
  692. XX    }
  693. XX    ioctl_data.buf_ofs = FP_OFF(cp);
  694. XX    ioctl_data.buf_seg = FP_SEG(cp);
  695. XX    ioctl_data.buf_len = sizeof(struct defect_header) + defect_count;
  696. XX
  697. XX    /*
  698. XX    ** start the format
  699. XX    */
  700. XX    printf("Now formating with ");
  701. XX    switch (format_type)
  702. XX    {
  703. XX        case FORMAT_NORMAL:
  704. XX        puts("P_LIST and G_LIST ...");
  705. XX        break;
  706. XX
  707. XX        case FORMAT_ADDLBA:
  708. XX        printf("P_LIST, G_LIST and %d defects ...\n", (defect_count / sizeof(struct defect_entry_lba)));
  709. XX        break;
  710. XX            
  711. XX        case FORMAT_ADDCHI:
  712. XX        printf("%d defects ...\n", (defect_count / sizeof(struct defect_entry_chi)));
  713. XX        break;
  714. XX
  715. XX        case FORMAT_ORIG:
  716. XX        puts("P_LIST only ...");
  717. XX        break;
  718. XX    }
  719. XX    puts("Please wait ....");
  720. XX    intdosx(&inregs, &outregs, &segregs);
  721. XX
  722. XX    /*
  723. XX    ** see what happened
  724. XX    */
  725. XX    if ( outregs.x.cflag )
  726. XX        printf("DOS error %d occured during format.\n", _doserrno);
  727. XX    else
  728. XX        puts("Formating complete.");
  729. XX    exit(0);
  730. XX}
  731. XX
  732. XXusage()
  733. XX{
  734. XX    puts("usage: sformat drive:");
  735. XX    exit(1);
  736. XX}
  737. SHAR_EOF
  738. if test 6035 -ne "`wc -c < 'sformat.c'`"
  739. then
  740. echo shar: error transmitting "'sformat.c'" '(should have been 6035 characters)'
  741. fi
  742. fi # end of overwriting check
  743. echo shar: extracting "'sremap.c'" '(2674 characters)'
  744. if test -f 'sremap.c'
  745. then
  746. echo shar: will not over-write existing file "'sremap.c'"
  747. else
  748. sed 's/^XX//' > 'sremap.c' << \SHAR_EOF
  749. XX/*
  750. XX** SCSI Disk Block Reassign
  751. XX**
  752. XX** usage: sremap drive:
  753. XX**
  754. XX** Revision History:
  755. XX**
  756. XX** Version 1.0  10/17/90 Initial Release
  757. XX*/
  758. XX#include <stdio.h>
  759. XX#include <dos.h>
  760. XX#include "ioctl.h"
  761. XX
  762. XX#define TRUE (1)
  763. XX#define FALSE (0)
  764. XX#define VERSION "sremap Version 1.0 BWA"
  765. XX
  766. XXextern int _doserrno;
  767. XX
  768. XXstruct cmd ioctl_data;
  769. XXstruct remaps remap_list;
  770. XXunion REGS inregs, outregs;
  771. XXstruct SREGS segregs;
  772. XXunsigned char drive;
  773. XXchar far *cp;
  774. XX
  775. XXmain(argc, argv)
  776. XXint argc;
  777. XXchar *argv[];
  778. XX{
  779. XX    long block;
  780. XX    short remap_count = 0;
  781. XX    char answer[BUFSIZ];
  782. XX
  783. XX    /*
  784. XX    ** say hello
  785. XX    */
  786. XX    puts(VERSION);
  787. XX    if (argc != 2) usage();
  788. XX
  789. XX    /*
  790. XX    ** figure out who to format
  791. XX    */
  792. XX    if (argv[1][1] != ':') usage();
  793. XX    drive = argv[1][0];
  794. XX    drive = toupper(drive);
  795. XX    drive -= '@';
  796. XX
  797. XX    /*
  798. XX    ** ask for remap list
  799. XX    */
  800. XX    puts("Input your remap list, <enter> to terminate.");
  801. XX    while (remap_count < MAX_DEFECTS)
  802. XX    {
  803. XX        printf("Logical Block Address: ");
  804. XX        fflush(stdout);
  805. XX        fgets(answer, BUFSIZ, stdin);
  806. XX        if ( answer[0] == '\n' ) break;
  807. XX        sscanf(answer, "%lx", &block);
  808. XX        remap_list.list[remap_count].remap_lba3 = (block >> 24) & 0x00FF;
  809. XX        remap_list.list[remap_count].remap_lba2 = (block >> 16) & 0x00FF;
  810. XX        remap_list.list[remap_count].remap_lba1 = (block >> 8) & 0x00FF;
  811. XX        remap_list.list[remap_count].remap_lba0 = block & 0x00FF;
  812. XX        remap_count++;
  813. XX    }
  814. XX
  815. XX    /*
  816. XX    ** adjust to length of list in bytes
  817. XX    */
  818. XX    remap_count *= sizeof(struct remap_entry);
  819. XX
  820. XX    /*
  821. XX    ** verify that this is what the user really wants to do
  822. XX    */
  823. XX    printf("Do you really wish to remap blocks on the SCSI\n");
  824. XX    printf("device that contains drive %c: (y,n)? ", argv[1][0]);
  825. XX    fflush(stdout);
  826. XX    if ( getchar() != 'y' )
  827. XX    {
  828. XX        puts("Aborting reassign ....");
  829. XX        exit(1);
  830. XX    }
  831. XX
  832. XX    /*
  833. XX    ** build the remap list header
  834. XX    */
  835. XX    remap_list.header.reserved = 0;
  836. XX    remap_list.header.reserved2 = 0;
  837. XX    remap_list.header.rll_msb = (remap_count >> 8) & 0x00FF;
  838. XX    remap_list.header.rll_lsb = remap_count & 0x00FF;
  839. XX
  840. XX    /*
  841. XX    ** put together the command
  842. XX    */
  843. XX    inregs.h.ah = 0x44;            /* ioctl */
  844. XX    inregs.h.al = 0x05;            /* write */
  845. XX    inregs.h.bl = drive;        /* unit */
  846. XX    inregs.x.cx = sizeof(struct cmd);
  847. XX    cp = (char *) &ioctl_data;
  848. XX    inregs.x.dx = FP_OFF(cp);
  849. XX    segregs.ds = FP_SEG(cp);
  850. XX    ioctl_data.command = I_REASSIGN;
  851. XX    cp = (char *) &remap_list;
  852. XX    ioctl_data.buf_ofs = FP_OFF(cp);
  853. XX    ioctl_data.buf_seg = FP_SEG(cp);
  854. XX    ioctl_data.buf_len = sizeof(struct remap_header) + remap_count;
  855. XX
  856. XX    /*
  857. XX    ** start the remap
  858. XX    */
  859. XX    puts("Now reassigning ....");
  860. XX    puts("Please wait ....");
  861. XX    intdosx(&inregs, &outregs, &segregs);
  862. XX
  863. XX    /*
  864. XX    ** see what happened
  865. XX    */
  866. XX    if ( outregs.x.cflag )
  867. XX        printf("DOS error %d occured during reassign.\n", _doserrno);
  868. XX    else
  869. XX        puts("Reassigning complete.");
  870. XX    exit(0);
  871. XX}
  872. XX
  873. XXusage()
  874. XX{
  875. XX    puts("usage: sremap drive:");
  876. XX    exit(1);
  877. XX}
  878. SHAR_EOF
  879. if test 2674 -ne "`wc -c < 'sremap.c'`"
  880. then
  881. echo shar: error transmitting "'sremap.c'" '(should have been 2674 characters)'
  882. fi
  883. fi # end of overwriting check
  884. echo shar: extracting "'ioctl.h'" '(2373 characters)'
  885. if test -f 'ioctl.h'
  886. then
  887. echo shar: will not over-write existing file "'ioctl.h'"
  888. else
  889. sed 's/^XX//' > 'ioctl.h' << \SHAR_EOF
  890. XX/*
  891. XX** ioctl types that the driver understands
  892. XX*/
  893. XX#define I_FORMAT    'F'
  894. XX#define I_ERASE        'E'
  895. XX#define I_REWIND    'R'
  896. XX#define I_LOAD        'L'
  897. XX#define I_NOLOAD    'N'
  898. XX#define I_SPACE        'S'
  899. XX#define I_FILEMARK    'M'
  900. XX#define I_REASSIGN    'A'
  901. XX
  902. XX/*
  903. XX** definition of the structure to pass to the SCSI driver
  904. XX**
  905. XX** This should agree with the 'ioc' struct in 'struct.inc'
  906. XX*/
  907. XXstruct cmd {
  908. XX    short command;        /* command type */
  909. XX    short arg1;            /* command args */
  910. XX    short arg2;            /* command args */
  911. XX    short buf_seg;        /* command buffer segment */
  912. XX    short buf_ofs;        /* command buffer offset */
  913. XX    short buf_len;        /* command buffer length */
  914. XX};
  915. XX
  916. XX/*
  917. XX** Format Command options types
  918. XX*/
  919. XX#define FORMAT_NORMAL (0x00)
  920. XX#define FORMAT_ADDLBA (0x10)
  921. XX#define FORMAT_ORIG (0x18)
  922. XX#define FORMAT_ADDCHI (0x1C)
  923. XX
  924. XX/*
  925. XX** Defect List types
  926. XX*/
  927. XX#define DEFECT_LBA (1)
  928. XX#define DEFECT_CHI (2)
  929. XX
  930. XX#define MAX_DEFECTS (64)
  931. XX
  932. XX/*
  933. XX** defect list header
  934. XX*/
  935. XXstruct defect_header {
  936. XX    char reserved;        /* reserved */
  937. XX    char options;        /* format options */
  938. XX    char dll_msb;        /* defect list length MSB */
  939. XX    char dll_lsb;        /* defect list length LSB */
  940. XX};
  941. XX
  942. XX/*
  943. XX** defect list entry / block number
  944. XX*/
  945. XXstruct defect_entry_lba {
  946. XX    char defect_lba3;    /* defect block address MSB */
  947. XX    char defect_lba2;
  948. XX    char defect_lba1;
  949. XX    char defect_lba0;    /* defect block address LSB */
  950. XX};
  951. XX
  952. XX/*
  953. XX** defect list / block number
  954. XX*/
  955. XXstruct defects_lba {
  956. XX    struct defect_header header;
  957. XX    struct defect_entry_lba list[MAX_DEFECTS];
  958. XX};
  959. XX
  960. XX/*
  961. XX** defect list entry / cyl-head-index
  962. XX*/
  963. XXstruct defect_entry_chi {
  964. XX    char defect_cyl2;    /* defect cylinder MSB */
  965. XX    char defect_cyl1;
  966. XX    char defect_cyl0;    /* defect cylinder LSB */
  967. XX    char defect_head;
  968. XX    char defect_idx3;    /* defect index MSB */
  969. XX    char defect_idx2;
  970. XX    char defect_idx1;
  971. XX    char defect_idx0;    /* defect index LSB */
  972. XX};
  973. XX
  974. XX/*
  975. XX** defect list / chl-head-index
  976. XX*/
  977. XXstruct defects_chi {
  978. XX    struct defect_header header;
  979. XX    struct defect_entry_chi list[MAX_DEFECTS];
  980. XX};
  981. XX
  982. XX/*
  983. XX** remap list header
  984. XX*/
  985. XXstruct remap_header {
  986. XX    char reserved;        /* reserved */
  987. XX    char reserved2;        /* reserved */
  988. XX    char rll_msb;        /* remap list length MSB */
  989. XX    char rll_lsb;        /* remap list length LSB */
  990. XX};
  991. XX
  992. XX/*
  993. XX** remap list entry
  994. XX*/
  995. XXstruct remap_entry {
  996. XX    char remap_lba3;    /* remap block address MSB */
  997. XX    char remap_lba2;
  998. XX    char remap_lba1;
  999. XX    char remap_lba0;    /* remap block address LSB */
  1000. XX};
  1001. XX
  1002. XX/*
  1003. XX** remap list
  1004. XX*/
  1005. XXstruct remaps {
  1006. XX    struct remap_header header;
  1007. XX    struct remap_entry list[MAX_DEFECTS];
  1008. XX};
  1009. SHAR_EOF
  1010. if test 2373 -ne "`wc -c < 'ioctl.h'`"
  1011. then
  1012. echo shar: error transmitting "'ioctl.h'" '(should have been 2373 characters)'
  1013. fi
  1014. fi # end of overwriting check
  1015. echo shar: extracting "'equ.inc'" '(4746 characters)'
  1016. if test -f 'equ.inc'
  1017. then
  1018. echo shar: will not over-write existing file "'equ.inc'"
  1019. else
  1020. sed 's/^XX//' > 'equ.inc' << \SHAR_EOF
  1021. XX;
  1022. XX; Equates
  1023. XX;
  1024. XXTRUE        EQU    001h
  1025. XXFALSE        EQU    000h
  1026. XX
  1027. XXDISK_REQUEST    EQU    000h        ;Disk I/O Request
  1028. XXTAPE_REQUEST    EQU    001h        ;Tape I/O Request
  1029. XX
  1030. XX;
  1031. XX; Video Bus Monitoring
  1032. XX;
  1033. XXVIDEO_SEG    EQU    0B800h
  1034. XXVIDEO_OFS    EQU    79 * 2
  1035. XXVIDEO_COLOR    EQU    00600h        ;Light Red
  1036. XX
  1037. XX;
  1038. XX; ST-01 Card Registers
  1039. XX;
  1040. XXSCSI_CARD_SEG    EQU    0DE00h        ;Base Segment of Card
  1041. XXSCSI_CMD_PORT    EQU    01A00h        ;Offset to Command Port
  1042. XXSCSI_DATA_PORT    EQU    01C00h        ;Offset to Data Port
  1043. XX
  1044. XXSTACK_SIZE    EQU    1024        ;Our Local Stack
  1045. XX
  1046. XX;
  1047. XX; How the 16 bit sector number is broken down
  1048. XX; into a sector and cylinder number.
  1049. XX;
  1050. XX; x = Cylinder, y = track, always have only 1 head
  1051. XX;
  1052. XX; xxxx xxxx xxxx yyyy
  1053. XX;
  1054. XX        if large_drives
  1055. XXSECT_TRACK    EQU    16        ;Sectors per Track
  1056. XXROUND_CYL    EQU    0FFF0h        ;Round Sectors to nearest Cylinder
  1057. XXCLUSTSIZE    EQU    8        ;Number of Sectors to a Cluster
  1058. XX        else
  1059. XXSECT_TRACK    EQU    16        ;Sectors per Track
  1060. XXROUND_CYL    EQU    0FFF0h        ;Round Sectors to nearest Cylinder
  1061. XXCLUSTSIZE    EQU    4        ;Number of Sectors to a Cluster
  1062. XXSECT_2_FS    EQU    10        ;How far to shift for
  1063. XX                    ;Total Sectors to Fat Sectors
  1064. XX        endif
  1065. XX
  1066. XX;
  1067. XX; The max target to check for (0-X).
  1068. XX; If using 'reserve_addr', this should not execede 6!
  1069. XX;
  1070. XXMAXUNIT        EQU    6        ;Maximum Unit Number
  1071. XX
  1072. XXP_SECT        EQU    512        ;Physical Sector Size
  1073. XX
  1074. XX;
  1075. XX; CHUNK_MASK is the maximum number of sectors to access in one
  1076. XX; SCSI request.  It MUST be a power of two, and CHUNK_MASK * P_SECT
  1077. XX; MUST be <= 64K to prevent segment wrap problems.
  1078. XX;
  1079. XXCHUNK_MAX    EQU    32
  1080. XX
  1081. XXCMDENABLE    EQU    080h        ;Enable the output drivers
  1082. XXCMDENINTR    EQU    040h        ;Enable Interrupt
  1083. XXCMDPARITY    EQU    020h        ;Enable Parity
  1084. XXCMDSTARB    EQU    010h        ;Start Bus Arbitration
  1085. XXCMDATTN        EQU    008h        ;Assert ATTN
  1086. XXCMDBSY        EQU    004h        ;Assert BSY
  1087. XXCMDSEL        EQU    002h        ;Assert SEL
  1088. XXCMDRST        EQU    001h        ;Assert RST
  1089. XX
  1090. XX        if scsi_parity
  1091. XXCMDBASE        EQU    CMDPARITY    ;Base value of all commands
  1092. XX        else
  1093. XXCMDBASE        EQU    000h        ;Base value of all commands
  1094. XX        endif
  1095. XX
  1096. XXSTARBCOMPL    EQU    080h        ;Arbitration Complete
  1097. XXSTPARERR    EQU    040h        ;Parity Error
  1098. XXSTSEL        EQU    020h        ;SEL Asserted
  1099. XXSTREQ        EQU    010h        ;REQ Asserted
  1100. XXSTCD        EQU    008h        ;C/D Asserted
  1101. XXSTIO        EQU    004h        ;I/O Asserted
  1102. XXSTMSG        EQU    002h        ;MSG Asserted
  1103. XXSTBSY        EQU    001h        ;BSY Asserted
  1104. XX
  1105. XXREQ_MASK    EQU    STCD or STIO or STMSG
  1106. XXREQ_DATAOUT    EQU    000h        ;Data Out Phase
  1107. XXREQ_DATAIN    EQU    STIO        ;Data In Phase
  1108. XXREQ_CMDOUT    EQU    STCD        ;Command Out Phase
  1109. XXREQ_STATIN    EQU    STCD or STIO    ;Status In Phase
  1110. XXREQ_MSGOUT    EQU    STMSG or STCD    ;Msg Out Phase
  1111. XXREQ_MSGIN    EQU    STMSG or STCD or STIO ;Msg In Phase
  1112. XX
  1113. XXCOK        EQU    0        ;Command Completed OK
  1114. XXCNOCONNECT    EQU    1        ;Unable to Connect to Target
  1115. XXCBUSBUSY    EQU    2        ;Bus Busy
  1116. XXCTIMEOUT    EQU    3        ;Timeout waiting for Response
  1117. XXCERROR        EQU    4        ;Target Return Error
  1118. XXCBUSY        EQU    5        ;Target was Busy
  1119. XXCDISCONNECT    EQU    6        ;Target Disconnected
  1120. XXCOFFLINE    EQU    7        ;Target Went Offline
  1121. XXCMSGOUT        EQU    8        ;Target Request Message Out???
  1122. XXCPARERR        EQU    9        ;Parity Error Detected
  1123. XXCSELERR        EQU    10        ;Re-Select Detected
  1124. XX
  1125. XXSCSI_TESTREADY    EQU    000h        ;Test Unit Ready (6 byte)
  1126. XXSCSI_REWIND    EQU    001h        ;Rewind (6 byte)
  1127. XXSCSI_REQSENSE    EQU    003h        ;Request Sense (6 byte)
  1128. XXSCSI_FORMATUNIT    EQU    004h        ;Format Disk (6 byte)
  1129. XXSCSI_REASSIGN    EQU    007h        ;Reassign Bad Block (6 byte)
  1130. XXSCSI_WRITEFM    EQU    010h        ;Write File Marks (6 byte)
  1131. XXSCSI_SPACE    EQU    011h        ;Space Tape (6 byte)
  1132. XXSCSI_INQUIRY    EQU    012h        ;Inquire (6 byte)
  1133. XXSCSI_MODE_SET    EQU    015h        ;Mode Select (6 byte)
  1134. XXSCSI_ERASE    EQU    019h        ;Erase Tape (6 byte)
  1135. XXSCSI_MODE_GET    EQU    01Ah        ;Mode Sense (6 byte)
  1136. XXSCSI_LOAD    EQU    01Bh        ;Load / Unload Tape (6 byte)
  1137. XXSCSI_READSIZE    EQU    025h        ;Read Drive Capacity (10 byte)
  1138. XX        if extended_io
  1139. XXSCSI_READBLK    EQU    028h        ;Read Sectors (10 byte)
  1140. XXSCSI_WRITEBLK    EQU    02Ah        ;Write Sectors (10 byte)
  1141. XX        else
  1142. XXSCSI_READBLK    EQU    008h        ;Read Sectors (6 byte)
  1143. XXSCSI_WRITEBLK    EQU    00Ah        ;Write Sectors (6 byte)
  1144. XX        endif
  1145. XXSCSI_VERIFYBLK    EQU    02Fh        ;Verify Blocks (10 byte)
  1146. XX
  1147. XXMSG_COMPLETE    EQU    000h        ;Command is Complete
  1148. XXMSG_EXTEND    EQU    001h        ;Extended Message Follows
  1149. XXMSG_SAVE    EQU    002h        ;Save Data Pointers
  1150. XXMSG_RESTORE    EQU    003h        ;Restore Data Pointers
  1151. XXMSG_DISCONNECT    EQU    004h        ;Disconnect Requested
  1152. XXMSG_ERROR    EQU    005h        ;Error Detected
  1153. XXMSG_ABORT    EQU    006h        ;Abort the Command
  1154. XXMSG_REJECT    EQU    007h        ;Reject the Command
  1155. XXMSG_NOP        EQU    008h        ;No Operation
  1156. XXMSG_PARITY    EQU    009h        ;Parity Error Occured
  1157. XXMSG_RESET    EQU    00Ch        ;Reset the Unit
  1158. XXMSG_IDENTIFY    EQU    080h        ;Identify Yourself
  1159. XX
  1160. XX;
  1161. XX; Test Unit Ready Retry Count
  1162. XX;
  1163. XXREADY_RETRY    EQU    10        ;Wait 10 seconds for ready
  1164. XX
  1165. XX;
  1166. XX; Command Retry Count
  1167. XX;
  1168. XXMAX_RETRY    EQU    3        ;Retry 3 times
  1169. XX
  1170. XX;
  1171. XX; Sense sub types
  1172. XX;
  1173. XXSENSE_CCS    EQU    070h        ;Extended Sense Available
  1174. XX
  1175. XX;
  1176. XX; Format sub types
  1177. XX;
  1178. XXFORMAT_NORMAL    EQU    000h        ;Format with known defect list
  1179. XXFORMAT_ADDING    EQU    010h        ;Format with additional bad blocks
  1180. XXFORMAT_ORIG    EQU    018h        ;Format with original bad block list
  1181. XX
  1182. XX;
  1183. XX; Load sub types
  1184. XX;
  1185. XXLOAD_TAPE    EQU    001h        ;Load
  1186. XXUNLOAD_TAPE    EQU    000h        ;Unload
  1187. XX
  1188. XX;
  1189. XX; We write one filemark at the end of a tape
  1190. XX; so that we can space forward over stuff.
  1191. XX;
  1192. XXCLOSE_FM_CNT    EQU    001h
  1193. SHAR_EOF
  1194. if test 4746 -ne "`wc -c < 'equ.inc'`"
  1195. then
  1196. echo shar: error transmitting "'equ.inc'" '(should have been 4746 characters)'
  1197. fi
  1198. fi # end of overwriting check
  1199. echo shar: extracting "'options.inc'" '(1384 characters)'
  1200. if test -f 'options.inc'
  1201. then
  1202. echo shar: will not over-write existing file "'options.inc'"
  1203. else
  1204. sed 's/^XX//' > 'options.inc' << \SHAR_EOF
  1205. XX;
  1206. XX; Partition drives into single large partitions
  1207. XX;
  1208. XX; This is allowed if you are using DOS 4.0 or greater.
  1209. XX; Instead of breaking the drive up into 32Meg chunks,
  1210. XX; the entire drive will be allocated as one chunk.
  1211. XX;
  1212. XXlarge_drives    =    1
  1213. XX
  1214. XX;
  1215. XX; Allow multi_sector reads and writes.
  1216. XX;
  1217. XX; This means that a read request of less then CHUNK_MAX
  1218. XX; sectors will be done in one request to the drive rather
  1219. XX; then multiple single sector requests.
  1220. XX;
  1221. XXmulti_sector    =    1
  1222. XX
  1223. XX;
  1224. XX; Use the extended SCSI commands for reads and writes.
  1225. XX;
  1226. XX; This means that we can access drives larger then 1Gb
  1227. XX; and read/write more then 256 sectors per command.
  1228. XX;
  1229. XX; The disadvantage here is that not all devices support
  1230. XX; the extended command set.
  1231. XX;
  1232. XXextended_io    =    0
  1233. XX
  1234. XX;
  1235. XX; Use parity on the SCSI bus
  1236. XX;
  1237. XXscsi_parity    =    0
  1238. XX
  1239. XX;
  1240. XX; Reserve SCSI Address 7 for card
  1241. XX; This also means use Arbitration for getting control of the BUS
  1242. XX;
  1243. XXreserve_addr    =    0
  1244. XX
  1245. XX;
  1246. XX; Dump Sense information to the screen
  1247. XX;
  1248. XXdump_sense    =    1
  1249. XX
  1250. XX;
  1251. XX; Include the code to kludge the RAW ioctl call after an open
  1252. XX;
  1253. XXuse_kludge    =    1
  1254. XX
  1255. XX;
  1256. XX; Only Inquire for enough data to determine device type.
  1257. XX; This allows for older devices that violate the SCSI
  1258. XX; spec in that they don't return the normal inquire structure.
  1259. XX;
  1260. XXmini_inquire    =    0
  1261. XX
  1262. XX;
  1263. XX; Include code to display the SCSI bus phase on the screen
  1264. XX;
  1265. XXmonitor        =    0
  1266. XX
  1267. XX;
  1268. XX; Now select wether we want 8088 compatability or 80286+ code
  1269. XX;
  1270. XXoldcode        =    0
  1271. SHAR_EOF
  1272. if test 1384 -ne "`wc -c < 'options.inc'`"
  1273. then
  1274. echo shar: error transmitting "'options.inc'" '(should have been 1384 characters)'
  1275. fi
  1276. fi # end of overwriting check
  1277. echo shar: extracting "'struct.inc'" '(7831 characters)'
  1278. if test -f 'struct.inc'
  1279. then
  1280. echo shar: will not over-write existing file "'struct.inc'"
  1281. else
  1282. sed 's/^XX//' > 'struct.inc' << \SHAR_EOF
  1283. XX;
  1284. XX; Structures for SCSI commands
  1285. XX;
  1286. XXio_cmd        struc
  1287. XXio_cmd_op    db    ?        ;Opcode
  1288. XX        if extended_io
  1289. XXio_cmd_lun    db    ?
  1290. XXio_cmd_lba_b3    db    ?        ;Logical Block Address
  1291. XXio_cmd_lba_b2    db    ?
  1292. XXio_cmd_lba_b1    db    ?
  1293. XXio_cmd_lba_b0    db    ?
  1294. XXio_cmd_dummy1    db    ?
  1295. XXio_cmd_cnt_b1    db    ?        ;Block Count
  1296. XXio_cmd_cnt_b0    db    ?
  1297. XXio_cmd_dummy2    db    ?
  1298. XX        else
  1299. XXio_cmd_lba_b2    db    ?        ;Logical Block Address / Lun
  1300. XXio_cmd_lba_b1    db    ?
  1301. XXio_cmd_lba_b0    db    ?
  1302. XXio_cmd_cnt_b0    db    ?        ;Block Count
  1303. XXio_cmd_dummy1    db    ?
  1304. XX        endif
  1305. XXio_cmd        ends
  1306. XX
  1307. XXtio_cmd        struc
  1308. XXtio_cmd_op    db    ?        ;Opcode
  1309. XXtio_cmd_lun    db    ?        ;Lun
  1310. XXtio_cmd_cnt_b2    db    ?        ;Block Count
  1311. XXtio_cmd_cnt_b1    db    ?
  1312. XXtio_cmd_cnt_b0    db    ?
  1313. XXtio_cmd_dummy1    db    ?
  1314. XXtio_cmd        ends
  1315. XX
  1316. XX;
  1317. XX; Format the Unit
  1318. XX;
  1319. XXfmt_cmd        struc
  1320. XXfmt_cmd_op    db    ?        ;Opcode
  1321. XXfmt_cmd_type    db    ?        ;Format Type
  1322. XXfmt_cmd_dummy1    db    ?
  1323. XXfmt_cmd_il_b1    db    ?        ;Interleave (MSB)
  1324. XXfmt_cmd_il_b0    db    ?        ;Interleave (LSB)
  1325. XXfmt_cmd_dummy3    db    ?
  1326. XXfmt_cmd        ends
  1327. XX
  1328. XX;
  1329. XX; Verify Sectors
  1330. XX;
  1331. XXver_cmd        struc
  1332. XXver_cmd_op    db    ?        ;Opcode
  1333. XXver_cmd_lun    db    ?        ;Lun
  1334. XXver_cmd_lba_b3    db    ?        ;Logical Block Address MSB
  1335. XXver_cmd_lba_b2    db    ?
  1336. XXver_cmd_lba_b1    db    ?
  1337. XXver_cmd_lba_b0    db    ?        ;Logical Block Address LSB
  1338. XXver_cmd_dummy1    db    ?
  1339. XXver_cmd_len_b1    db    ?        ;Length MSB
  1340. XXver_cmd_len_b0    db    ?        ;Length LSB
  1341. XXver_cmd_dummy2    db    ?
  1342. XXver_cmd        ends
  1343. XX
  1344. XX;
  1345. XX; Load / Unload a Tape
  1346. XX;
  1347. XXload_cmd    struc
  1348. XXload_cmd_op    db    ?        ;Opcode
  1349. XXload_cmd_lun    db    ?        ;Lun
  1350. XXload_cmd_dummy1    db    2 dup (?)
  1351. XXload_cmd_type    db    ?        ;Load / Unload
  1352. XXload_cmd_dummy2    db    ?
  1353. XXload_cmd    ends
  1354. XX
  1355. XX;
  1356. XX; Write Filemarks on a Tape
  1357. XX;
  1358. XXfm_cmd        struc
  1359. XXfm_cmd_op    db    ?        ;Opcode
  1360. XXfm_cmd_lun    db    ?        ;Lun
  1361. XXfm_cmd_cnt_b2    db    ?        ;Filemark MSB
  1362. XXfm_cmd_cnt_b1    db    ?
  1363. XXfm_cmd_cnt_b0    db    ?        ;Filemark LSB
  1364. XXfm_cmd_dummy    db    ?
  1365. XXfm_cmd        ends
  1366. XX
  1367. XX;
  1368. XX; Space a Tape
  1369. XX;
  1370. XXspace_cmd    struc
  1371. XXspace_cmd_op    db    ?        ;Opcode
  1372. XXspace_cmd_code    db    ?
  1373. XXspace_cmd_cnt2    db    ?        ;Count
  1374. XXspace_cmd_cnt1    db    ?
  1375. XXspace_cmd_cnt0    db    ?
  1376. XXspace_cmd_dummy    db    ?
  1377. XXspace_cmd    ends
  1378. XX
  1379. XX;
  1380. XX; Reassign a Block
  1381. XX;
  1382. XXremap_cmd    struc
  1383. XXremap_cmd_op    db    ?        ;Opcode
  1384. XXremap_cmd_lun    db    ?        ;Lun
  1385. XXremap_cmd_dum1    db    ?        ;Reserved
  1386. XXremap_cmd_dum2    db    ?
  1387. XXremap_cmd_dum3    db    ?
  1388. XXremap_cmd_dum4    db    ?
  1389. XXremap_cmd    ends
  1390. XX
  1391. XX;
  1392. XX; Structure(s) returned by the sense command(s)
  1393. XX;
  1394. XXsense        struc
  1395. XXsense_sense    db    ?        ;Sense (Error) code
  1396. XXsense_lba_b2    db    ?        ;Failed Block Address
  1397. XXsense_lba_b1    db    ?
  1398. XXsense_lba_b0    db    ?
  1399. XXsense        ends
  1400. XX
  1401. XXe_sense        struc
  1402. XXe_sense_ccs    db    ?        ;0x70 for Extended Sense
  1403. XXe_sense_dummy1    db    ?
  1404. XXe_sense_sense    db    ?        ;Sense (Error) Group
  1405. XXe_sense_lba_b3    db    ?        ;Failed Block Address
  1406. XXe_sense_lba_b2    db    ?
  1407. XXe_sense_lba_b1    db    ?
  1408. XXe_sense_lba_b0    db    ?
  1409. XXe_sense        ends
  1410. XX
  1411. XX;
  1412. XX; Structure returned by the unit inquiry command
  1413. XX;
  1414. XXinq        struc
  1415. XXinq_dev_type    db    ?        ;Device Type
  1416. XXinq_dev_qual    db    ?        ;Device Qualifier
  1417. XX        ife mini_inquire
  1418. XXinq_stand_rev    db    ?        ;Standard Revision Level
  1419. XXinq_format    db    ?        ;Response Format
  1420. XXinq_length    db    ?        ;Length of Extra Data
  1421. XXinq_reserv1    db    ?
  1422. XXinq_reserv2    db    ?
  1423. XXinq_reserv3    db    ?
  1424. XXinq_manufact    db    8 dup (?)    ;Manufacture
  1425. XXinq_product    db    16 dup (?)    ;Product
  1426. XX        endif
  1427. XXinq        ends
  1428. XX
  1429. XX;
  1430. XX; Structure returned by the read drive capacity command
  1431. XX;
  1432. XXcap        struc
  1433. XXcap_sectors_b3    db    ?        ;MSB of sector count
  1434. XXcap_sectors_b2    db    ?
  1435. XXcap_sectors_b1    db    ?
  1436. XXcap_sectors_b0    db    ?        ;LSB of sector count
  1437. XXcap_size_b3    db    ?        ;MSB of sector size
  1438. XXcap_size_b2    db    ?
  1439. XXcap_size_b1    db    ?
  1440. XXcap_size_b0    db    ?        ;LSB of sector size
  1441. XXcap        ends
  1442. XX
  1443. XX;
  1444. XX; Structure Definitions For Our Device Driver
  1445. XX;
  1446. XXbpb        struc
  1447. XXbpb_ss        dw    ?        ;Sector Size
  1448. XXbpb_au        db    ?        ;Cluster Size in Sectors
  1449. XXbpb_rs        dw    ?        ;Reserved Sectors
  1450. XXbpb_nf        db    ?        ;Number of Fats
  1451. XXbpb_de        dw    ?        ;Number of Root Directory Entries
  1452. XXbpb_ts        dw    ?        ;Total Number Of Sectors
  1453. XXbpb_md        db    ?        ;Media Descriptor
  1454. XXbpb_fs        dw    ?        ;Number of Sectors in each Fat
  1455. XXbpb_st        dw    ?        ;Number of Sectors per Track
  1456. XXbpb_nh        dw    ?        ;Number of Heads
  1457. XXbpb_hs_lsw    dw    ?        ;Hidden Sectors (Least Sig Word)
  1458. XXbpb_hs_msw    dw    ?        ;Hidden Sectors (Most Sig Word)
  1459. XXbpb_ts_lsw    dw    ?        ;Large Total Sector Count
  1460. XXbpb_ts_msw    dw    ?
  1461. XXbpb_res        db    6 dup (?)    ;Reserved
  1462. XXbpb        ends
  1463. XX
  1464. XX;
  1465. XX; ioctl function 42h/62h
  1466. XX;
  1467. XXioctl_fmt    struc
  1468. XXioctl_fmt_spec    db    ?        ;Special Flags
  1469. XXioctl_fmt_head    dw    ?        ;Head to Format
  1470. XXioctl_fmt_cyl    dw    ?        ;Cylinder to Format
  1471. XXioctl_fmt_len    dw    ?        ;How Many Tracks
  1472. XXioctl_fmt    ends
  1473. XX
  1474. XX;
  1475. XX; ioctl function 61h
  1476. XX;
  1477. XXioctl_read    struc
  1478. XXioctl_read_spec    db    ?        ;Special Flags
  1479. XXioctl_read_head    dw    ?        ;Head to Read
  1480. XXioctl_read_cyl    dw    ?        ;Cylinder to Read
  1481. XXioctl_read_sect    dw    ?        ;Sector to Read
  1482. XXioctl_read_len    dw    ?        ;How Many Sectors
  1483. XXioctl_read_ofs    dw    ?        ;Buffer Offset
  1484. XXioctl_read_seg    dw    ?        ;Buffer Segment
  1485. XXioctl_read    ends
  1486. XX
  1487. XX;
  1488. XX; ioctl function 60h/61h return
  1489. XX;
  1490. XXdpb        struc
  1491. XXdpb_special    db    ?        ;Special Flags
  1492. XXdpb_type    db    ?        ;Device Type
  1493. XXdpb_attr    dw    ?        ;Device Attributes
  1494. XXdpb_cyl        dw    ?        ;Device Cylinder Count
  1495. XXdpb_media    db    ?        ;Device Media Type if Diskette
  1496. XXdpb_bpb        db    size bpb dup (?)
  1497. XXdpb_sectors    dw    ?        ;Sectors in Track
  1498. XXdpb_track    dd    SECT_TRACK dup (?)
  1499. XXdpb        ends
  1500. XX
  1501. XX;
  1502. XX; The internal control structure for a SCSI device
  1503. XX;
  1504. XXunit        struc
  1505. XXunit_1st_drv    db    ?        ;DOS Drive Numbers
  1506. XXunit_num_drv    db    ?        ;DOS Drive Count
  1507. XXunit_select    db    ?        ;SCSI Select Bit
  1508. XXunit_mcheck    db    ?        ;Media Check Byte
  1509. XXunit_inq_buf    db    size inq dup (?)
  1510. XXunit_inq_term    db    ?
  1511. XXunit_cap_buf    db    size cap dup (?)
  1512. XXunit_sense    db    size sense dup (?)
  1513. XXunit_e_sense    db    size e_sense dup (?)
  1514. XXunit        ends
  1515. XX
  1516. XX;
  1517. XX; Ioctl Commands
  1518. XX;
  1519. XXioc        struc
  1520. XXioc_command    dw    ?        ;Command
  1521. XXioc_param1    dw    ?        ;Command Dependent Data
  1522. XXioc_param2    dw    ?        ;Command Dependent Data
  1523. XXioc_buf_seg    dw    ?        ;Buffer Segment
  1524. XXioc_buf_ofs    dw    ?        ;Buffer Offset
  1525. XXioc_buf_len    dw    ?        ;Buffer Length
  1526. XXioc        ends
  1527. XX
  1528. XX;
  1529. XX; DOS requests
  1530. XX;
  1531. XXrh        struc
  1532. XXrh_len        db    ?        ;Length of Packet
  1533. XXrh_unit        db    ?        ;Unit Code (Block Only)
  1534. XXrh_cmd        db    ?        ;Command Code
  1535. XXrh_status    dw    ?        ;Returned Status
  1536. XXrh_res        db    8 dup (?)    ;Reserved
  1537. XXrh        ends
  1538. XX
  1539. XXrh0        struc            ;INITIALIZATION
  1540. XXrh0_rh        db    size rh dup (?)    ;Fixed Portion
  1541. XXrh0_nunits    db    ?        ;Number of units (Block Only)
  1542. XXrh0_brk_ofs    dw    ?        ;Break Address (Offset)
  1543. XXrh0_brk_seg    dw    ?        ;Break Address (Segment)
  1544. XXrh0_bpb_tbo    dw    ?        ;Pointer to BPB Array (Offset)
  1545. XXrh0_bpb_tbs    dw    ?        ;Pointer to BPB Array (Segment)
  1546. XXrh0_drv_ltr    db    ?        ;First Available Drive (DOS 3+, Block Only)
  1547. XXrh0        ends
  1548. XX
  1549. XXrh1        struc            ;MEDIA CHECK
  1550. XXrh1_rh        db    size rh dup (?)    ;Fixed Portion
  1551. XXrh1_media    db    ?        ;Media Descriptor from DPB
  1552. XXrh1_md_stat    db    ?        ;Media Status returned by Device Driver
  1553. XXrh1_volid_ofs    dw    ?        ;Offset of Volume ID String (DOS 3+)
  1554. XXrh1_volid_seg    dw    ?        ;Segment of Volume ID String (DOS 3+)
  1555. XXrh1        ends
  1556. XX
  1557. XXrh2        struc            ;GET BPB
  1558. XXrh2_rh        db    size rh dup (?)    ;Fixed Portion
  1559. XXrh2_media    db    ?        ;Media Descriptor from DPB
  1560. XXrh2_buf_ofs    dw    ?        ;Offset of Data Transfer Area
  1561. XXrh2_buf_seg    dw    ?        ;Segment of Data Transfer Area
  1562. XXrh2_pbpbo    dw    ?        ;Offset of Pointer to BPB
  1563. XXrh2_pbpbs    dw    ?        ;Segment of Pointer to BPB
  1564. XXrh2        ends
  1565. XX
  1566. XXrh4        struc            ;INPUT
  1567. XXrh4_rh        db    size rh dup (?)    ;Fixed Portion
  1568. XXrh4_media    db    ?        ;Media Descriptor from DPB
  1569. XXrh4_buf_ofs    dw    ?        ;Offset of Data Transfer Area
  1570. XXrh4_buf_seg    dw    ?        ;Segment of Data Transfer Area
  1571. XXrh4_count    dw    ?        ;Transfer Count (Sectors)
  1572. XXrh4_sector    dw    ?        ;Start Sector Number
  1573. XX        dd    ?
  1574. XXrh4_lsect_lsw    dw    ?        ;Start Sector LSW (32 bit)
  1575. XXrh4_lsect_msw    dw    ?        ;Start Sector MSW (32 bit)
  1576. XXrh4        ends
  1577. XX
  1578. XXrh8        struc            ;OUTPUT
  1579. XXrh8_rh        db    size rh dup (?)    ;Fixed Portion
  1580. XXrh8_media    db    ?        ;Media Descriptor from DPB
  1581. XXrh8_buf_ofs    dw    ?        ;Offset of Data Transfer Area
  1582. XXrh8_buf_seg    dw    ?        ;Segment of Data Transfer Area
  1583. XXrh8_count    dw    ?        ;Transfer Count (Sectors)
  1584. XXrh8_sector    dw    ?        ;Start Sector Number
  1585. XX        dd    ?
  1586. XXrh8_lsect_lsw    dw    ?        ;Start Sector LSW (32 bit)
  1587. XXrh8_lsect_msw    dw    ?        ;Start Sector MSW (32 bit)
  1588. XXrh8        ends
  1589. XX
  1590. XXrh12        struc            ;OUTPUT IOCTL
  1591. XXrh12_rh        db    size rh dup (?)    ;Fixed Portion
  1592. XXrh12_media    db    ?        ;Media Descriptor from DPB
  1593. XXrh12_buf_ofs    dw    ?        ;Offset of Data Transfer Area
  1594. XXrh12_buf_seg    dw    ?        ;Segment of Data Transfer Area
  1595. XXrh12_count    dw    ?        ;Transfer Count (Sectors)
  1596. XXrh12_sector    dw    ?        ;Start Sector Number
  1597. XXrh12        ends
  1598. XX
  1599. XXrh19        struc            ;IOCTL
  1600. XXrh19_rh        db    size rh dup (?)    ;Fixed Portion
  1601. XXrh19_major    db    ?        ;Major Code
  1602. XXrh19_minor    db    ?        ;Minor Code
  1603. XXrh19_si        dw    ?        ;Caller SI Register
  1604. XXrh19_di        dw    ?        ;Caller DI Register
  1605. XXrh19_buf_ofs    dw    ?        ;Caller Buffer Offset
  1606. XXrh19_buf_seg    dw    ?        ;Caller Buffer Segment
  1607. XXrh19        ends
  1608. SHAR_EOF
  1609. if test 7831 -ne "`wc -c < 'struct.inc'`"
  1610. then
  1611. echo shar: error transmitting "'struct.inc'" '(should have been 7831 characters)'
  1612. fi
  1613. fi # end of overwriting check
  1614. #
  1615. # End of shell archive
  1616. #
  1617. exit 0
  1618. -- 
  1619. Brian Antoine                   |
  1620. ISC-Bunker Ramo                 |  ...uunet!isc-br!tau-ceti!briana
  1621. Spokane, WA                     |     briana@tau-ceti.isc-br.com
  1622.  
  1623. exit 0 # Just in case...
  1624. -- 
  1625. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  1626. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  1627. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  1628. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  1629.