home *** CD-ROM | disk | FTP | other *** search
- These are basically the same three files rewritten to convert text
- files to either upper case, lower case, or to convert lower and
- upper case at the same time. Originally these utilities were written
- in Turbo Pascal 3.01a, then converted to Turbo Pascal 4.0, using the
- same algorithm, AND no blockreads and blockwrites. Using a 190K text
- file as an example, I timed this utility against similar conversions I
- did with Turbo C 1.5 and Microsoft C 5.0 (with the compiler toggles
- set to optimization for speed \Ox). The times on an 6 MHz AT were
- interesting (my home computer is an XT with an Orchid Tiny Turbo, which
- in about all cases is the same as a 6 MHz AT):
-
- old version TP4 ~84 seconds
- TPC 1.5 ~22 seconds
- MSC 5.0 ~16/18 seconds
- revised code TP4 ~4.4 seconds
-
- I changed a couple of other parts of the algorithm for the TP4 version
- that ended up with the excellent time, but still the results are rather
- astounding, it seems. The reason I'm passing this on is that it might
- be of interest to other programmers working through the same kind of
- problems and trying to decide which route to go as far as a compiler or
- language. (And for feedback.)
-
- Also, there is included the routine to cause highlighted prompts or
- screen displays (see the comments in the source code and read the manuals
- on what the interrupt called does when given certain parameters). This
- in itself took some experimenting to work out, but does provide a quick
- and good screen output without needing to rely on ANSI. One warning is
- that you must reset the textcolor and textbackground (which I don't do
- here, since I am doing all the output to a monochrome screeen) to colors
- of your own choice if you anticipate that your output will be on CGA,
- EGA or VGA screens. Otherwise, the results of the hilite call will
- produce uneven screen colors.
-
- I'd be interested in hearing any comments, reactions or further
- information about any of the above. If you have any, please leave me
- a message on the BBS where you found this.
-
- Mike Bailey
- Madison, Wisconsin
-