home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / communic / sercom / setparms.c < prev   
Encoding:
C/C++ Source or Header  |  1986-09-04  |  564 b   |  19 lines

  1. #include "dos.h";
  2.  
  3. unsigned int setparms(portno, parmbyte)
  4. int portno;                                      /* 1 for com2, 0 for com1 */
  5. unsigned int parmbyte;
  6. {
  7. union REGS inr, outr;
  8. unsigned int status;
  9.  
  10.      inr.x.dx = portno;                          /* Port Number            */
  11.      inr.h.ah = 0;                               /* Function number        */
  12.      inr.h.al = parmbyte;
  13.      int86(0x14, &inr, &outr);                   /* ROM-BIOS Serial i/o int*/
  14.      status = outr.x.ax;
  15.      return(status);
  16. }
  17.  
  18. /* Figure 16.1: SETPARMS.C */
  19.