home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / SMAILSRC.ZIP / UUPC.ZIP / COMM.ZIP / COMM.H < prev    next >
Encoding:
Text File  |  1990-04-03  |  2.0 KB  |  64 lines

  1. /*
  2. **    declarations for comm.asm
  3. **
  4. **    compilation must use the Ze switch to enable the
  5. **    "far" keyword for the small memory model
  6. **
  7. **    Robin Rohlicek   3/86
  8. **    skl@van-bc.UUCP     5/88    (more prototypes and com_errors fix)
  9. */
  10.  
  11. void far select_port(int);    /* select active port (1 or 2) */
  12.  
  13. void far save_com(void);    /* save the interupt vectors */
  14.  
  15. void far restore_com(void);    /* restore those vectors */
  16.  
  17. int far install_com(void);    /* install our vectors */
  18.  
  19. void far open_com(             /* open com port */
  20.     int,     /* baud */
  21.     int,     /* 'M'odem or 'D'irect */
  22.     int,     /* Parity 'N'one, 'O'dd, 'E'ven, 'S'pace, 'M'ark */
  23.     int,     /* stop bits (1 or 2) */
  24.     int);    /* Xon/Xoff 'E'nable, 'D'isable */
  25.  
  26. void far close_com(void);    /* close com port */
  27.  
  28. void far dtr_off(void);        /* clear DTR */
  29.  
  30. void far dtr_on(void);        /* set DTR */
  31.  
  32. long far r_count(void);        /* receive counts */
  33.     /* high word = total size of receive buffer */
  34.     /* low word = number of pending chars */
  35. #define r_count_size() ((int)(r_count() >> 16))
  36. #define r_count_pending() ((int)r_count())
  37.  
  38. int far receive_com(void);    /* get one character */
  39.     /* return -1 if none available */
  40.  
  41. long far s_count(void);        /* send counts */
  42.     /* high word = total size of transmit buffer */
  43.     /* low word = number of bytes free in transmit buffer */
  44. #define s_count_size() ((int)(s_count() >> 16))
  45. #define s_count_free() ((int)s_count())
  46.  
  47. void far send_com(int);        /* send a character */
  48.  
  49. void far send_local(int);    /* simulate receive of char */
  50.  
  51. void far sendi_com(int);    /* send immediately */
  52.  
  53. void far break_com(void);    /* send a BREAK */
  54.  
  55. int far * far com_errors(void);    /* return far pointer to error counts
  56.                     (in static area) */
  57. #define COM_EOVFLOW 0    /* buffer overflows */
  58. #define COM_EOVRUN  1    /* receive overruns */
  59. #define COM_EBREAK  2    /* break chars */
  60. #define COM_EFRAME  3    /* framing errors */
  61. #define COM_EPARITY 4    /* parity errors */
  62. #define COM_EXMIT   5    /* transmit erros */
  63. #define COM_EDSR    6    /* data set ready errors */
  64. #define COM_ECTS    7    /* clear to send errors */