home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / 1990 / 01 / titel / lp_tab.c next >
Encoding:
C/C++ Source or Header  |  1989-11-07  |  3.4 KB  |  127 lines

  1. /* ------------------------------------------------------ */
  2. /*                    LP_TAB.C                            */
  3. /*        (c) 1989  Ulrich Schmitz & TOOLBOX              */
  4. /* ------------------------------------------------------ */
  5. #include<dos.h>
  6. #include<stdio.h>
  7. #include<ctype.h>
  8. #include<graphics.h>
  9.  
  10. typedef unsigned char byte;    /* neuer Variablentyp BYTE */
  11.  
  12. /* --------------- Laufwerksparameter Tabelle ----------- */
  13. void LP_Tabelle()
  14. {
  15.   int i, wert, t_segment=0x0000, t_offset=0x0078,
  16.       segment, offset;
  17.   char c_wert;
  18.  
  19.   offset = peek(t_segment, t_offset);
  20.               /*   Adresse der Tabelle ermitteln  */
  21.   t_offset = 0x007a;
  22.   segment = peek(t_segment, t_offset);
  23.  
  24.   gotoxy(1,1);
  25.   printf("\n╔═══════════════════════════════════════════");
  26.   printf("════════════════════════════╗");
  27.   printf("\n║                                           ");
  28.   printf("                            ║");
  29.   printf("\n╠═══════════════════════════════════════════");
  30.   printf("════════════════════════════╣");
  31.  
  32.   gotoxy(1,5);
  33.   for(i = offset+1; i <= (offset +10); i++) {
  34.     wert = peekb(segment, i);
  35.     wert = (byte) wert;
  36.     printf("║                                           ");
  37.     printf("                  Std.->%03d ║\n", wert);;
  38.   }
  39.  
  40.   printf("╚═════════════════════════════════════════════");
  41.   printf("══════════════════════════╝");
  42.  
  43.   gotoxy(3,3);
  44.   printf("----- Laufwerksparameter-Tabelle  ");
  45.   printf("(Priorität vor BIOS-Funktion) -----");
  46.  
  47.   gotoxy(3,5);
  48.   offset++;
  49.   printf(" 1. Schrittzeit (Zeitspanne von Spur zu Spur)");
  50.   printf("          :");
  51.   scanf("%d", &c_wert);
  52.   pokeb(segment, offset, c_wert);
  53.  
  54.   gotoxy(3,6);
  55.   offset++;
  56.   printf(" 2. Nachlaufzeit des Diskettenmotors in ");
  57.   printf("1/18 Sekunden  :");
  58.   scanf("%d", &c_wert);
  59.   pokeb(segment, offset, c_wert);
  60.  
  61.   gotoxy(3,7);
  62.   offset++;
  63.   printf(" 3. Bytes pro Sektor (0=128, 1=256, ");
  64.   printf("2=512, 3=1024)     :");
  65.   scanf("%d", &c_wert);
  66.   pokeb(segment, offset, c_wert);
  67.  
  68.   gotoxy(3,8);
  69.   offset++;
  70.   printf(" 4. Max. mögliche Anzahl Sektoren pro ");
  71.   printf("Spur (9, 15, 18) :");
  72.   scanf("%d", &c_wert);
  73.   pokeb(segment, offset, c_wert);
  74.  
  75.   gotoxy(3,9);
  76.   offset++;
  77.   printf(" 5. Zeitspanne, definiert Zwischenraum ");
  78.   printf("zweier Sektoren :");
  79.   scanf("%d", &c_wert);
  80.   pokeb(segment, offset, c_wert);
  81.  
  82.   gotoxy(3,10);
  83.   offset++;
  84.   printf(" 6. Datentransferlänge  (nicht ");
  85.   printf("dokumentiert)           :");
  86.   scanf("%d", &c_wert);
  87.   pokeb(segment, offset, c_wert);
  88.  
  89.   gotoxy(3,11);
  90.   offset++;
  91.   printf(" 7. Magnetischer Freiraum zwischen ");
  92.   printf("2 Sektoren (>als 5.):");
  93.   scanf("%d", &c_wert);
  94.   pokeb(segment, offset, c_wert);
  95.  
  96.   gotoxy(3,12);
  97.   offset++;
  98.   printf(" 8. ASCII-Code des Füllzeichens ");
  99.   printf("bei Formatiervorgängen :");
  100.   scanf("%d", &c_wert);
  101.   pokeb(segment, offset, c_wert);
  102.  
  103.   gotoxy(3,13);
  104.   offset++;
  105.   printf(" 9. Steprate (Ruhezeit des Kopfes) ");
  106.   printf("in Millisekunden    :");
  107.   scanf("%d", &c_wert);
  108.   pokeb(segment, offset, c_wert);
  109.  
  110.   gotoxy(3,14);
  111.   offset++;
  112.   printf("10. Max. Zeitdauer, bis Disk-Motor ");
  113.   printf("Betriebsgeschw. err.:");
  114.   scanf("%d", &c_wert);
  115.   pokeb(segment, offset, c_wert);
  116. }
  117.  
  118. main()
  119. {
  120.   clrscr();
  121.   LP_Tabelle();
  122.   gotoxy(1,24);
  123.   return(0);
  124. }
  125. /* ------------------------------------------------------ */
  126. /*                 Ende von LP_TAB.C                      */
  127.