home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TURBO4IO.ZIP / FAST_I_O.DOC < prev    next >
Encoding:
Text File  |  1988-03-17  |  2.1 KB  |  41 lines

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