--- cci/d/pits/bio.c 2019/07/28 12:24:19 1.1 +++ cci/d/pits/bio.c 2019/07/28 12:30:30 1.1.1.2 @@ -3,6 +3,7 @@ #define LINE 80 #define CRTN 0x0d #define EOL '.' +int cyccnt; /* I/O ROUTINES TO CPU2 CONSOLE */ @@ -140,10 +141,11 @@ int c; { -#define ALL 00 -#define VDDC 03 -#define VIOC 05 -#define MT 06 +#define ALL 0x8 +#define MT 0xe +#define VIOC 0xd +#define VDDC 0xb +#define EXIT 0x7 int flag, valid; @@ -169,6 +171,10 @@ while (valid){ flag |= VDDC; valid = 0; break; + case '4': + flag |= EXIT; + valid = 0; + break; default: writes(" invalid test number\n"); writes("\nRe-enter test number : "); @@ -184,7 +190,7 @@ int c; { int valid, cont; valid = 1; -writes("\n\nController number [0-3] : "); +writes("\n\nController number [0-7] : "); while(valid){ c = readc(); switch(c){ @@ -204,6 +210,22 @@ while(valid){ cont = 3; valid = 0; break; + case '4': + cont = 4; + valid = 0; + break; + case '5': + cont = 5; + valid = 0; + break; + case '6': + cont = 6; + valid = 0; + break; + case '7': + cont = 7; + valid = 0; + break; default: writes(" invalid controller number\n"); writes("\nRe-enter controller number : "); @@ -218,7 +240,8 @@ int c; { int valid, type; valid = 1; -writes("\n\nDisk type [0 = fsd, 1 = smd, 2 = xfd] : "); +cyccnt = 30; +writes("\n\nEnter disk type [0 = fsd, 1 = smd, 2 = xfd, 3 = xsd] : "); while(valid){ c = readc(); switch(c){ @@ -234,6 +257,10 @@ while(valid){ type = 2; valid = 0; break; + case '3': + type = 3; + valid = 0; + break; default: writes(" invalid disk type\n"); writes("\nRe-enter disk type : "); @@ -241,6 +268,9 @@ while(valid){ break; } } + writes("\n\nEnter number of cycles for seek test (default 30): "); + c = getdec(); + if (c != 0) cyccnt = c; return(type); } /********************************************************** @@ -268,6 +298,27 @@ gethex() } } return(n); +} + /********************************************************** + Decimal input routine, call fill and validates the characters + in the character buffer. Then returns the DECIMAL value back to + the calling routine. + **********************************************************/ +getdec() +{ + char s[LINE]; + int k[1],i,n; + n=0; + fill(s,k); /* Fill s[] */ + for (i=0;i= '0' && s[i] <= '9') + n=0x10*n+s[i]-'0'; + if ((s[i] < '0' ) || (s[i] > '9')) + { + writes("\nInvalid decimal digit: "); writec(s[i]); writes(" (ignored)"); + } + } + return(n); } /**************************************************** This routine fills a character buffer with characters