home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / murutil / readme.doc < prev    next >
Encoding:
Text File  |  1988-11-22  |  10.5 KB  |  220 lines

  1.                             M U R U T I L
  2.                       Harry Murphy's Utilities
  3.  
  4.                       22 November 1988 Edition
  5.                              (MURUTIL4)
  6.  
  7.      This is a collection of routines and files which I find  useful  on
  8. my COMPAQ Desk Pro Computer.  They all assume that you are running under
  9. MSDOS Version 2.0, or later, on an IBM PC/XT/AT  computer  or  an  equi-
  10. valent "clone" with an 8086 or 8088 or equivalent processor.
  11.  
  12.      This edition contains three new "pipeline" utilities,  DETAB,  PIPE
  13. and TRIM.  DETAB expands tab codes by inserting blanks, assuming tabs at
  14. column 9, 17, 25, 33 and so forth.   PIPE merely copies its input to its
  15. output.  TRIM deletes trailing blanks.
  16.  
  17.      In this edition, WHERE now searches for files without an  extension
  18. as if they had a wildcard extension.  That is, "WHERE myfile" is proces-
  19. sed as if it were  "WHERE myfile.*",  but  "WHERE myfile." is  processed
  20. without change.
  21.  
  22.      In this edition, UPDATE is substantially faster  than  in  previous
  23. versions because it copies the files itself,  rather than  invoking  the
  24. COPY utility.   UPDATE's verification is now a true byte-by-byte verifi-
  25. cation;  earlier versions relied on COPY's /V option.
  26.  
  27.                  ------------------------------------
  28.  
  29.      This edition of MURUTIL contains the following utilities:
  30.  
  31.  
  32. ALERT      This Turbo Pascal program generates a series of five warbling
  33. alert tones once a minute until a total of fifteen have  passed.    This
  34. can be useful when you include ALERT in a batch file to tell you that  a
  35. long-running program has finished.
  36.  
  37. ALMANAC    This Turbo Pascal program gets the current DOS date/time  and
  38. displays almanac information as in the following example:
  39.  
  40.            14:10h MST,  Thursday, 18 February 1988
  41.            This is day  49 of the year 1988.
  42.            Sunrise today is at  6:49h MST.
  43.            Sunset  today is at 17:52h MST.
  44.                 Length of day: 11:02h.
  45.  
  46.      You may want to include ALMANAC in your AUTOEXEC.BAT  file.    (See
  47. the AUTOEXEC.BAT example.)
  48.  
  49. CAPSLOCK   Some programs tinker with the CapsLock bit to force the  user
  50. into an  upper-case  or  a  lower-case  mode  without  telling  him  nor
  51. re-setting it when they exit.  Changing this bit may not affect the  LED
  52. on the keyboard so the user may find himself typing in lower case,  even
  53. though the CapsLock light is on -- or vice versa.  CAPSLOCK is  a  small
  54. assembly program which simply toggles the CapsLock bit.    If  you  find
  55. yourself in a reversed CapsLock  mode,  simply  run  CAPSLOCK  and  that
  56. should fix it.
  57.  
  58. DATETIME   This Turbo Pascal program gets the current date and time from
  59. the keyboard, using an unambiguous date format, and sets  the  DOS  date
  60. and time accordingly.    You  may  want  to  include  DATETIME  in  your
  61. AUTOEXEC.BAT file.  (See the AUTOEXEC.BAT example.)
  62.  
  63.      Acceptable date formats are:  "04-JUN-86", "4JUN86", "4  JUN  1986"
  64. and so forth.
  65.  
  66.      Acceptable time formats are:  "9:55:12", "9:55", "9.55", "9;55" and
  67. so forth.
  68.  
  69. DATTIM     This Turbo Pascal program displays the current date and  time
  70. on the screen in the following format:  "12:03h, Saturday, 10 May 1986".
  71.  
  72. DETAB      This assembly language program is a filter, or pipeline, rou-
  73. tine which converts tab codes to spaces while copying the input file  to
  74. the output file and filtering out the FFH byte and  all  control  bytes.
  75. Each carriage-return is followed by a line-feed code.   Trailing  blanks
  76. are deleted. An all-blank line is written simply as a CR/LF combination.
  77. Tab stops are assumed every 8 spaces at column 9, 17, 25, 33 etc.
  78.  
  79.            DETAB Examples:
  80.  
  81.            DETAB <INPUT.FIL >OUTPUT.FIL
  82.            DETAB <AFILE.TXT | SORT >AFILE.SRT
  83.            DIR *.PAS | DETAB | SORT >DIR.LIS
  84.  
  85. DIFF       This  Turbo  Pascal  program  compares  two  text  files  and
  86. displays their differences (if any).  "Syntax:  DIFF afile.ext bfile.ext
  87. [diff.lis]".  See DIFF.DOC for more detailed information.
  88.  
  89. DUMP       This Turbo Pascal program displays the contents of a file  in
  90. hex and ASCII format.
  91.  
  92. FULLDIR    This Turbo Pascal program generates full  directories.   When
  93. run with no parameters,  FULLDIR generates a directory of all  files  in
  94. the default directory and all subdirectories.  When run with a specified
  95. directory,  FULLDIR generates a directory of all files in that directory
  96. and all subdirectories.   For example, if your default drive is C:, then
  97. running "FULLDIR C:\" will generate a directory of all the files on your
  98. default drive.  The output from FULLDIR can be redirected.  For example,
  99. "FULLDIR C:\ > ALLFILES.LIS" will write the directory to ALLFILES.LIS.
  100.  
  101. LOCKPS     This small assembly  program  toggles  the  Print  Screen  in
  102. Progress bit to lock/unlock the PrtSc key.  On my  computer,  the  PrtSc
  103. key is the "upper case" of an extra asterisk key.  If  I'm  holding  the
  104. shift key down when I hit the asterisk key, I don't get an  asterisk,  I
  105. get an unwanted screen dump.  LOCKPS prevents  this  by  setting  a  bit
  106. which makes MSDOS think that a screen dump is  already  under  way.    A
  107. second run of LOCKPS clears  the  bit  so  that  the  key  can  be  used
  108. normally.
  109.  
  110. LOOK       This Turbo Pascal program allows one to look at an ASCII file
  111. and to scroll forwards and backwards through  it  without  altering  the
  112. file.  Although many screen editors can be used for this purpose,  there
  113. is always a chance that you might inadvertently delete or add  something
  114. while doing so.  LOOK allows you to look without this danger.
  115.  
  116. MAXIM      This assembly language program displays  a  randomly-selected
  117. quotation from a library of over 500 one-line quotations.  You may  want
  118. to include MAXIM in your  AUTOEXEC.BAT  file.    (See  the  AUTOEXEC.BAT
  119. example.)
  120.  
  121. MRKTIM     This  program  marks  the  current  time,  in  seconds  since
  122. midnight, for subsequent use by the RUNTIM program.  The information  is
  123. stored in the Intra-Application Communications  Area,  memory  locations
  124. 0:04FA through 0:04FF.
  125.  
  126. PIPE       This assembly language program is a  pipeline  routine  which
  127. merely copies its input file to its output file,  using an 8192 byte I/O
  128. buffer.   Its primary use is to copy a file back to itself after it  has
  129. been processed by another pipeline routine.  (See the second example.)
  130.  
  131.             PIPE Examples:
  132.  
  133.             PIPE <INPUT.FIL >OUTPUT.FIL
  134.             SORT <DATA.FIL | PIPE >DATA.FIL
  135.  
  136. RUNTIM     This Turbo Pascal program displays the run time of  an  event
  137. marked by a prior call to MRKTIM.  The  information  is  stored  in  the
  138. Intra-Application Communications Area,  memory locations 0:04FA  through
  139. 0:04FF.
  140.  
  141. SNAP       This assembly language routine  takes  a  "snapshot"  of  the
  142. current display screen  and  writes  it  to  the  file,  SNAP.001.    If
  143. SNAP.001 already exists, the file is written to SNAP.002 and so forth.
  144.  
  145. TRIM       This assembly language program is a pipeline routine which
  146. copies its input file to its output file while filtering out the FFH
  147. byte and all control bytes, except for tabs.  Each carriage-return is
  148. followed by a line-feed code.  All trailing blanks are deleted.  An all-
  149. blank line is written simply as a CR/LF combination.
  150.  
  151.            TRIM Examples:
  152.  
  153.            TRIM <INPUT.FIL >OUTPUT.FIL
  154.            TRIM <ADDR.LIS | SORT >ADDR.LIS
  155.            DIR *.FOR | TRIM >DIR.LIS
  156.  
  157. UPDATE     This Turbo Pascal utility  compares  the files  in  a  source
  158. directory (or device) with files in a target directory (or  device)  and
  159. copies those files in the source directory which aren't  in  the  target
  160. directory or which  are  more  recent  than  the  files  in  the  target
  161. directory.  The  copies  are  performed  in  alphabetical  order.    For
  162. example, "UPDATE *.* A:*.*" will copy files from the  default  directory
  163. to the floppy drive, A:. There are two  mutually  exclusive  options  to
  164. UPDATE, "/S" and "/V".  These  options,  if  used,  MUST  be  the  third
  165. parameter to UPDATE.  The "/S" option shows which files would be copied,
  166. but does not do the copying.   The  "/V"  option performs a byte-by-byte
  167. verification of each file after it is copied.   If you hit any key while
  168. UPDATE is running,  UPDATE will pause and allow you to  continue  or  to
  169. abort the update process.
  170.  
  171.    UPDATE Examples:
  172.  
  173.    UPDATE *.FOR A:              Updates all files with the extension
  174.                                 ".FOR" from the default directory to
  175.                                 drive A:.
  176.  
  177.    UPDATE A:*.ASM *.* /S        Shows which .ASM files would be copied
  178.                                 from drive A: to the default directory.
  179.  
  180.    UPDATE C:\WORK\*.* A:*.* /V  Updates all files from C:\WORK\ to
  181.                                 drive A: with verification.
  182.  
  183. WHERE      This Turbo Pascal program searches the entire  default  drive
  184. for all occurrences of a file, including hidden and system files.  Wild-
  185. card specifications are permitted.  For example, "WHERE *.FOR" will find
  186. all files ending in the extension of FOR.  Similarly, "WHERE *.P??" will
  187. find all files ending in an extension starting  with  "P".   The  output
  188. from WHERE can be redirected.  For example, "WHERE TP*.* > TP.LIS"  will
  189. write the file list to TP.LIS.
  190.  
  191.                  ------------------------------------
  192.  
  193.      Note that, with the exception of my MAXIM program,  I have included
  194. the source program for each of these utilities.   My policy  is  not  to
  195. use anyone's program until I have a copy of the source code which I  can
  196. examine, compile and link myself.   In these days in  which  sociopathic
  197. hackers are writing programs infested with trap doors, Trojan horses and
  198. viruses, my policy makes more sense than ever and I urge you to adopt it
  199. too.  If you are uncertain about using MAXIM, write or call me  for  the
  200. proper date/time and number of bytes for MAXIM executable file.
  201.  
  202.      I wrote programs ALERT, ALMANAC, CAPSLOCK, DATETIME, DATTIM, DETAB,
  203. DIFF, DUMP, FULLDIR, LOCKPS, LOOK, MAXIM, MRKTIM,  PIPE,  RUNTIM,  SNAP,
  204. TRIM, UPDATE and WHERE and I hereby make them available for  free,  non-
  205. commercial, distribution and use.
  206.  
  207.      Although I have taken great care in writing my programs, I make  no
  208. warranty as to their suitability nor usefulness for any application, use
  209. or purpose and I hereby specifically disclaim any responsibility for any
  210. loss or damage resulting from the  use  of  these  programs,  which  are
  211. herewith furnished for you to use at your own risk, as you see fit.
  212.  
  213.  
  214. Harry M. Murphy, Consultant
  215. 3912 Hilton Avenue, NE
  216. Albuquerque, NM 87110
  217. Tel:  (505) 881-0519
  218. 22 November 1988.
  219.  
  220.