/*===========================================================================*\ | QBENCH.C ver 2.0d, 03-22-89 | | | | Produces a "screens/second" table for QWIKC Screen Utilities. | | | | I'm not trying to support this program, so don't expect it to be | | perfect. It will just give you a good feel for speed. The time is | | adjusted for an average 8 second test for each condition - total of 56 | | seconds. For more accurate results, change test_time to 16. Or for a | | quicker but less accurate test, change test_time to 2. | | Be sure to see how fast virtual screens are! | | Also try this out in a multi-tasking environment. | | Test is for 80x25 screens only. | | | | Copyright (c) 1988,1989 by James H. LeMay, All rights reserved. | | | | Conversion to Turbo C by Jordan Gallagher / Wisdom Research | \*===========================================================================*/ #include #include #include #include #include #include #include "qwikc20.h" #include "timerd12.h" enum attrs { attr, noattr }; enum procs { qwrites, qfills, qattrs, qstores, qscrolls }; #define test_time 8 /* test time in seconds for each case. 8 gives +/- 1% */ int attrib; int count; unsigned screens; char row; char col; char rows; char cols; float scrpersec[5][2]; char strng[81]; int proc; int a; FILE *fv; int todisk; int tovirtual; char ch; vscr_t oldscr; unsigned scr1[4000]; unsigned scr2[4000]; char names[5][80] = { " qwrite- ", " qfill- ", " qattr- ", " qstore- ", " qscroll- " }; /******************************| check_zenith |*****************************\ Since Zenith doesn't have snow on any CGAs, turn off snow checking. \***************************************************************************/ void check_zenith(void) { char far *zds_rom=(char far *) 0xF000800CL; if(qsnow && strcmp( (char *) zds_rom, "ZDS CORP" ) == 0) { qsnow=0; cardsnow=0; } } /********************************| clearscr |*******************************\ Clears the screen using the yellow on black attribute. \***************************************************************************/ void clearscr(void) { qfill( 1, 1, crt_rows, crt_cols, WHITE+BLUE_BG, ' ' ); } /*******************************| timertest |*******************************\ Clears the screen using the yellow on black attribute. \***************************************************************************/ void timertest(void) { unsigned char tests=0; timer( T_START ); do { for(count=0; count