home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / UTILITY / BATCH / RING13.ZIP / RING.DOC < prev    next >
Encoding:
Text File  |  1990-08-28  |  7.8 KB  |  208 lines

  1.  
  2.  
  3.                                   RING, v1.3
  4.                                 -------------
  5.                                 from TifaWARE
  6.  
  7.  
  8.  
  9.  
  10. What's New
  11. ----------
  12.  
  13.  
  14.      With version 1.3 I have substantially reorganized RING's source code,
  15. placing commonly-used routines in libraries and useful equates and macros
  16. in separate files. From the user's point of view, however, there should be
  17. no change in the program. Sharing code, equates and macros in this way
  18. will make it easier for me to both develop and maintain other assembly
  19. language programs.
  20.  
  21.      Version 1.2 introduces the '-e' option. If you're running DOS v3.30
  22. you can use this option to sound a bell only when the previous program had
  23. a non-zero return code; ie, exited with an error. This provides an ideal
  24. way to notify users of problems when used in a batch file.
  25.  
  26.      Many of the principal functions in RING have been completely
  27. rewritten for version 1.1. These changes will make it easier for me to
  28. revise the program. From the user's point of view, though, nothing will
  29. have changed.
  30.  
  31.  
  32.  
  33.  
  34. Introduction
  35. ------------
  36.  
  37.  
  38.      The PC has brought about great strides in productivity recently, but
  39. one problem has been the lack of multitasking features in MS-DOS.  If you
  40. have a long job to run, you not only tie up the computer but you also must
  41. glance at the screen every once in a while to figure out whether the job
  42. has finished.  Either that, or you risk leaving the computer idle because
  43. you don't know how long the job will take.  This is clearly inefficient. 
  44.  
  45.      RING provides a poor man's approach to multitasking.  No, it doesn't
  46. let you run two programs at the same time; instead, it merely rings the
  47. console bell a few times.  What's this got to do with multitasking, you
  48. ask? It's quite simple - start your job in the usual fashion, type "RING",
  49. and walk away.  While your computer's doing one task, you're free to go
  50. about another - read a newspaper, grab a cup of coffee, shuffle some papers
  51. around your desk, or talk with any who happens by your office.  As soon as
  52. your job has finished, the PC's console bell will sound, advising you it's
  53. time for more work. 
  54.  
  55.  
  56.  
  57.  
  58. Usage
  59. -----
  60.  
  61.  
  62.      Running this program is a breeze.  Assuming you've placed RING.COM on
  63. your system where DOS can find it, type RING -? to display a brief help
  64. message similar to the following:
  65.  
  66.      TifaWARE RING, v1.3a, 08/28/90 - rings the console bell.
  67.      Usage: ring [-options] [count]
  68.      
  69.      Options:
  70.        -e = ring bell only if errorlevel is non-zero
  71.        -? = display this help message
  72.      
  73.      count denotes a repetition count and must be between 0 and 15.
  74.      The default value of count is 3.
  75.  
  76. [If you don't remember anything else from reading the documentation, at
  77. least remember how to display this help message.]
  78.  
  79.      Normally, you'll invoke RING without any arguments, and the console
  80. bell will sound three times.  This is probably fine in most situations. 
  81. However, RING also allows you to specify how many times the bell should
  82. ring - anything between 0 and 15 times.  Thus, you could create a batch
  83. file to run a program and then ring the bell 1 time if the program was
  84. successful and 15 times otherwise. 
  85.  
  86.      With the '-e' option you can ring the console bell conditional on the
  87. previous program's return code. No matter what that program was, RING will
  88. examine its return code and sound the console bell only if it is non-zero.
  89. Further, it uses this return code as its own. Thus, the main difference
  90. between "RING -e" and the batch command "if errorlevel 1 RING" is that the
  91. first command preserves the value of ERRORLEVEL from the previous program
  92. while the second does *not*. This enables you to write cleaner batch files
  93. yet still report errors. [NB: This option relies on undocumented
  94. "features" of MS-DOS and hence may not work on all versions of DOS. Please
  95. contact me if you're not running DOS v3.30 but would still like to use
  96. this option.]
  97.  
  98.  
  99.  
  100.  
  101. If You Have Any Trouble
  102. -----------------------
  103.  
  104.  
  105.      RING will attempt to let you know of any problems that arise.  Here
  106. are the messages you might see and how you should deal with them:
  107.  
  108.      ring: invalid option -- x.
  109.           - Type "RING -?" for a list of valid options.
  110.  
  111.      ring: invalid repetition count -- 100.
  112.           - The repetition count must be an unsigned integer
  113.             between 0 and 15. Note: RING reacts sensibly if 
  114.             a count of 0 is specified.
  115.  
  116.      ring: unable to locate errorlevel.
  117.           - Make sure you're using COMMAND.COM as the parent 
  118.             shell and that it's from a supported version of 
  119.             DOS. [Currently only PC/MS-DOS v3.30 is supported.]
  120.  
  121. These error messages are written to the standard error device.  In this
  122. way, they won't disappear down a pipe or into a file should you try to
  123. redirect RING's output, although I can't imagine why you would ever do
  124. this. 
  125.  
  126.      Additionally, RING uses a return code to convey information about the
  127. success or failure of its operation.  Possible return values are:
  128.  
  129.      Code      Meaning
  130.      ----      -------
  131.      0         Program completed successfully
  132.      1         Help message was displayed
  133.  
  134. if the '-e' option was *NOT* specified or whatever the previous program's
  135. return code was otherwise. You can test for these codes using the
  136. ERRORLEVEL variable in a batch file. 
  137.  
  138.  
  139.  
  140.  
  141. Requirements
  142. ------------
  143.  
  144.  
  145.      TifaWARE RING runs on machines operating under MS-DOS v2.xx or later,
  146. and requires less than 2K of memory! [NB: To use the '-e' option, you must
  147. be operating MS-DOS v3.30.] It does not use BIOS calls, make direct writes
  148. to video RAM, or otherwise require machines to be "PC-compatible".  In
  149. fact, RING even runs properly on a DEC Rainbow!
  150.  
  151.  
  152.  
  153.  
  154. Who Owns It?
  155. ------------
  156.  
  157.  
  158.      I am releasing this implementation of RING into the public domain. 
  159. Since my involvement with MS-DOS began in 1984, I've been a heavy user of
  160. public domain software.  Public domain software is a terrific idea.  For
  161. the most part, programs are useful and the source code instructive, all at
  162. no cost! With this small contribution to the public domain I hope to pay
  163. back, in some sense, my gratitude to those other programmers who have made
  164. my computing so much easier. 
  165.  
  166.      As a public domain program, RING carries no obligation on my part to
  167. support users or provide future upgrades.  I have tried to write clean code
  168. and believe it to be "bug-free".  Nevertheless, you must use this program
  169. ***AT YOUR OWN RISK***.  I strongly urge you to scan the source code
  170. yourself, make any desired changes, and recompile the program, if this is
  171. possible.  If you make this standard practice with newly acquired public
  172. domain software, you'll not only protect your system from worms and viruses
  173. but also get a better feel for exactly how each program works!
  174.  
  175.      As author of RING, I ask of you two things: First, if you distribute
  176. this program, please keep together my original source code, documentation,
  177. and executable.  This just makes it easier for others to use the software. 
  178. Second, let me hear what you think of RING.  You don't have to send any
  179. money, just comments and suggestions. 
  180.  
  181.  
  182.  
  183.  
  184. Kudos
  185. -----
  186.  
  187.  
  188.      Many thanks go to Borland for its stand-alone debugger, which greatly
  189. reduced the time spent developing this program. Thanks are also due to
  190. Josep Fortiana Gregori (D3ESJFG0@EB0UB011) for providing a code fragment
  191. suggesting how to locate ERRORLEVEL in memory and to Yan Juras for
  192. pointing out where exactly to look.
  193.  
  194.  
  195.  
  196.  
  197.  
  198.                           George A. Theall
  199.  
  200.                              TifaWARE
  201.                        506 South 41st St., #3M
  202.                       Philadelphia, PA.  19104
  203.                               U.S.A.
  204.  
  205.                          +1 215 662 0558
  206.  
  207.               GTHEALL@PENNDRLS.UPENN.EDU (ARPA Internet)
  208.