home *** CD-ROM | disk | FTP | other *** search
/ Super Net 1 / SUPERNET_1.iso / PC / OTROS / EXTRAS / UUCODE / UUPC / TEST / UPC12ES2.ZIP / UUCICO / fossil.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-11-07  |  3.3 KB  |  83 lines

  1. /*--------------------------------------------------------------------*/
  2. /*       f o s s i l . c                                              */
  3. /*                                                                    */
  4. /*       UUPC/extended defines for accessing FOSSIL functions via     */
  5. /*       INT 14 under MS-DOS; also used for other INT14 interfaces.   */
  6. /*--------------------------------------------------------------------*/
  7.  
  8. /*--------------------------------------------------------------------*/
  9. /*    Changes Copyright (c) 1990-1993 by Kendra Electronic            */
  10. /*    Wonderworks.                                                    */
  11. /*                                                                    */
  12. /*    All rights reserved except those explicitly granted by the      */
  13. /*    UUPC/extended license agreement.                                */
  14. /*--------------------------------------------------------------------*/
  15.  
  16. /*--------------------------------------------------------------------*/
  17. /*                          RCS Information                           */
  18. /*--------------------------------------------------------------------*/
  19.  
  20. /*
  21.  *    $Id: fossil.c 1.4 1993/11/06 17:56:09 rhg Exp $
  22.  *
  23.  *    Revision history:
  24.  *    $Log: fossil.c $
  25.  * Revision 1.4  1993/11/06  17:56:09  rhg
  26.  * Drive Drew nuts by submitting cosmetic changes mixed in with bug fixes
  27.  *
  28.  * Revision 1.3  1993/10/12  01:33:59  ahd
  29.  * Normalize comments to PL/I style
  30.  *
  31.  * Revision 1.2  1993/10/09  22:21:55  rhg
  32.  * ANSIfy source
  33.  *
  34.  * Revision 1.1  1993/05/30  15:25:50  ahd
  35.  * Initial revision
  36.  *
  37.  * Revision 1.1  1993/05/30  00:16:35  ahd
  38.  * Initial revision
  39.  *
  40.  */
  41.  
  42.  
  43. /*--------------------------------------------------------------------*/
  44. /*                        System include files                        */
  45. /*--------------------------------------------------------------------*/
  46.  
  47. #include <stdio.h>
  48. #include <dos.h>
  49.  
  50. /*--------------------------------------------------------------------*/
  51. /*                    UUPC/extended include files                     */
  52. /*--------------------------------------------------------------------*/
  53.  
  54. #include "lib.h"
  55. #include "fossil.h"
  56.  
  57. /*--------------------------------------------------------------------*/
  58. /*                          Global variables                          */
  59. /*--------------------------------------------------------------------*/
  60.  
  61. short portNum;                      /* Must be set by openline()     */
  62.  
  63. /*--------------------------------------------------------------------*/
  64. /*       F o s s i l C n t l                                          */
  65. /*                                                                    */
  66. /*       Perform control functions on a FOSSIL port                   */
  67. /*--------------------------------------------------------------------*/
  68.  
  69.  short FossilCntl( const char function, const unsigned char info )
  70.  {
  71.    union REGS regs;
  72.  
  73.    regs.x.dx = portNum;
  74.    regs.h.ah = function;
  75.    regs.h.al = info;
  76.    regs.x.bx = 0x00;          /* Insure start function doesn't        */
  77.                               /* cause ES:CX to be twiddled           */
  78.    int86( FS_INTERRUPT, ®s, ®s );
  79.  
  80.    return (short) regs.x.ax;  /* Return AX to caller                  */
  81.  
  82.  } /* FossilCntl */
  83.