home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / communic / rsutil / showcom.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-09-12  |  991 b   |  37 lines

  1. /**********************************************
  2. * Programm SHOWCOM. Zeigt die Parameter aller
  3. * verfügbaren seriellen Schnittstellen an.
  4. ***********************************************/
  5.  
  6. #include <dos.h>
  7. #include <stdio.h>
  8. #include <conio.h>
  9.  
  10. #include "getcom.c"
  11.  
  12. /*=======================================================================*/
  13.  
  14. int main()
  15. {
  16.  char *VersionString="SHOWCOM  V2.3 (C) 1990 Richard Franz/c't";
  17.  int i;                    /* Laufvariablen für Schleifen    */
  18.  int getcom();                /* Deklaration Funktion getcom    */
  19.  int ret;
  20.  unsigned char far *maxcom;
  21.  int commax;
  22.  
  23.  FP_SEG(maxcom) = 0x0040;
  24.  FP_OFF(maxcom) = 0x0011;        /* Anzahl COM-Schnittstellen    */
  25.  commax = (*maxcom & 0x0e) >> 1;    /* aus Equipmentword isolieren    */
  26.  
  27.  printf("%s\n",VersionString);
  28.  for (i=1 ; i<=commax ; i++)
  29.   {
  30.    ret = getcom(i);
  31.    if (ret)                /* Abbruch bei Fehler in GETCOM */
  32.      break;
  33.   }
  34.  return(ret);                /* Errorlevel aus dem letzten    */
  35. }                    /* Aufruf von GETCOM        */
  36. 
  37.