home *** CD-ROM | disk | FTP | other *** search
- /* ------------------------------------------------------ */
- /* LP_TAB.C */
- /* (c) 1989 Ulrich Schmitz & TOOLBOX */
- /* ------------------------------------------------------ */
- #include<dos.h>
- #include<stdio.h>
- #include<ctype.h>
- #include<graphics.h>
-
- typedef unsigned char byte; /* neuer Variablentyp BYTE */
-
- /* --------------- Laufwerksparameter Tabelle ----------- */
- void LP_Tabelle()
- {
- int i, wert, t_segment=0x0000, t_offset=0x0078,
- segment, offset;
- char c_wert;
-
- offset = peek(t_segment, t_offset);
- /* Adresse der Tabelle ermitteln */
- t_offset = 0x007a;
- segment = peek(t_segment, t_offset);
-
- gotoxy(1,1);
- printf("\n╔═══════════════════════════════════════════");
- printf("════════════════════════════╗");
- printf("\n║ ");
- printf(" ║");
- printf("\n╠═══════════════════════════════════════════");
- printf("════════════════════════════╣");
-
- gotoxy(1,5);
- for(i = offset+1; i <= (offset +10); i++) {
- wert = peekb(segment, i);
- wert = (byte) wert;
- printf("║ ");
- printf(" Std.->%03d ║\n", wert);;
- }
-
- printf("╚═════════════════════════════════════════════");
- printf("══════════════════════════╝");
-
- gotoxy(3,3);
- printf("----- Laufwerksparameter-Tabelle ");
- printf("(Priorität vor BIOS-Funktion) -----");
-
- gotoxy(3,5);
- offset++;
- printf(" 1. Schrittzeit (Zeitspanne von Spur zu Spur)");
- printf(" :");
- scanf("%d", &c_wert);
- pokeb(segment, offset, c_wert);
-
- gotoxy(3,6);
- offset++;
- printf(" 2. Nachlaufzeit des Diskettenmotors in ");
- printf("1/18 Sekunden :");
- scanf("%d", &c_wert);
- pokeb(segment, offset, c_wert);
-
- gotoxy(3,7);
- offset++;
- printf(" 3. Bytes pro Sektor (0=128, 1=256, ");
- printf("2=512, 3=1024) :");
- scanf("%d", &c_wert);
- pokeb(segment, offset, c_wert);
-
- gotoxy(3,8);
- offset++;
- printf(" 4. Max. mögliche Anzahl Sektoren pro ");
- printf("Spur (9, 15, 18) :");
- scanf("%d", &c_wert);
- pokeb(segment, offset, c_wert);
-
- gotoxy(3,9);
- offset++;
- printf(" 5. Zeitspanne, definiert Zwischenraum ");
- printf("zweier Sektoren :");
- scanf("%d", &c_wert);
- pokeb(segment, offset, c_wert);
-
- gotoxy(3,10);
- offset++;
- printf(" 6. Datentransferlänge (nicht ");
- printf("dokumentiert) :");
- scanf("%d", &c_wert);
- pokeb(segment, offset, c_wert);
-
- gotoxy(3,11);
- offset++;
- printf(" 7. Magnetischer Freiraum zwischen ");
- printf("2 Sektoren (>als 5.):");
- scanf("%d", &c_wert);
- pokeb(segment, offset, c_wert);
-
- gotoxy(3,12);
- offset++;
- printf(" 8. ASCII-Code des Füllzeichens ");
- printf("bei Formatiervorgängen :");
- scanf("%d", &c_wert);
- pokeb(segment, offset, c_wert);
-
- gotoxy(3,13);
- offset++;
- printf(" 9. Steprate (Ruhezeit des Kopfes) ");
- printf("in Millisekunden :");
- scanf("%d", &c_wert);
- pokeb(segment, offset, c_wert);
-
- gotoxy(3,14);
- offset++;
- printf("10. Max. Zeitdauer, bis Disk-Motor ");
- printf("Betriebsgeschw. err.:");
- scanf("%d", &c_wert);
- pokeb(segment, offset, c_wert);
- }
-
- main()
- {
- clrscr();
- LP_Tabelle();
- gotoxy(1,24);
- return(0);
- }
- /* ------------------------------------------------------ */
- /* Ende von LP_TAB.C */