home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
t
/
tspa3140.zip
/
TSUNTH.TST
< prev
next >
Wrap
Text File
|
1992-08-23
|
3KB
|
145 lines
(* This is a test program for the TSUNTH.TPU unit 25-Feb-89
Updated 21-Mar-90, 23-Jul-90, 1-Aug-90, 5-Jan-91, 21-Jul-91,
24-Nov-91, 23-Aug-92 *)
uses Dos, TSUNTH;
procedure LOGO;
begin
writeln;
writeln ('TSUNTH unit test by Prof. Timo Salmi, 23-Aug-92');
writeln ('University of Vaasa, Finland, ts@uwasa.fi');
writeln;
end; (* logo *)
(* Testing if graftabl is loaded *)
procedure TEST1;
begin
if GRTABLFN then
writeln ('GRAFTABL has been loaded')
else
writeln ('GRAFTABL has not been loaded');
end; (* test1 *)
(* Is a math coprocessor present *)
procedure TEST4;
begin
if MATHCOFN then
writeln ('A math coprocessor is present')
else
writeln ('No math coprocessor present');
end; (* test4 *)
(* Number of serial ports *)
procedure TEST5;
begin
writeln ('Number of serial ports ', RS232FN);
Flush (output);
end; (* test5 *)
(* Number of parallel ports *)
procedure TEST6;
begin
writeln ('Number of parallel ports ', PARPORFN);
Flush (output);
end; (* test6 *)
(* Country code *)
procedure TEST7;
begin
writeln ('The country code is ', COUNTRFN);
Flush (output);
end; (* test7 *)
(* Processor chip type *)
procedure TEST8;
begin
writeln ('The processor chip is ', CHIPFN);
Flush (output);
end; (* test8 *)
(* Get ROM BIOS version *)
procedure TEST9;
begin
writeln ('The ROM BIOS version (date) is ', ROMDTEFN);
Flush (output);
end; (* test9 *)
(* Is an enhanced keyboard present *)
procedure TEST10;
begin
if ISENHAFN then
writeln ('Enhanced keyboard')
else
writeln ('Not an enhanced keyboard');
end; (* test10 *)
(* Last drive, and interleave values *)
procedure TEST11;
var lastdrive : char;
interleave : byte;
ch : char;
begin
lastdrive := LASTDRFN;
writeln ('The last drive on this system is ', lastdrive);
if lastdrive > 'B' then
for ch := 'C' to lastdrive do
writeln ('Drive ', ch, ' interleave is ', INTERLFN (ch));
writeln;
for ch := 'A' to lastdrive do
writeln ('Drive ', ch, ' number of FATs is ', FATSFN (ch));
end; (* test11 *)
(* Show date and time formats of your configuration *)
procedure TEST13;
begin
writeln ('The country-dependent date format is ', DATEFMFN);
writeln ('The country-dependent time format is ', TIMEFMFN);
end; (* test13 *)
procedure TEST14;
const drive = 'A';
begin
writeln ('Number of cylinders on ', drive, ', is ', NRCYLFN(drive));
end; (* test14 *)
(* Test whether a mouse is available *)
procedure TEST15;
begin
write ('MOUSTAFN: ');
case MOUSTAFN of
0 : writeln ('No mouse & driver detected');
1 : writeln ('Mouse detected, with other than two buttons');
2 : writeln ('Mouse detected, with two buttons');
3 : writeln ('Mouse Systems or Logitech mouse detected, EEEEEK!!!!');
4 : writeln ('Mouse status unknown');
end;
end; (* test15 *)
(* Simple false/true test whether a mouse is available *)
procedure TEST16;
begin
write ('ISMOUSFN: ');
case ISMOUSFN of
true : writeln ('Mouse detected');
false : writeln ('No mouse detected');
end;
end; (* test16 *)
(* Main program *)
begin
LOGO;
TEST4;
TEST5;
TEST6;
TEST7;
TEST8;
TEST9;
TEST10;
TEST15;
{}
{... if you want the rest of the tests, just include them ...}
{}
write ('Press <═╝'); readln;
end. (* tsunth.tst *)