home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR10 / COMM270.ZIP / COMM270.DOC next >
Text File  |  1993-12-24  |  16KB  |  301 lines

  1. COMMENT
  2. (c) 1987, 1988, 1989, 1990 Galapagos Development and Scott Wenzel
  3. 772 Crescent Street, Buffalo, NY  14216
  4. ┌─────────────────────────────────────────────────────────────────────────────┐
  5. │                                                                             │
  6. │                          Look for these upcoming new                        │
  7. │                          items, toys and innovations                        │
  8. │                          from Galapagos Development:                        │
  9. │                                                                             │
  10. │                 -  AIRPLANE TOILET(tm) - the oddest game you ever saw       │
  11. │                 -  POSTpaid(tm) - to format files to print on PS devices    │
  12. │                 -  COMMRES - memory-resident popup version of COMMENT       │
  13. │                                                                             │
  14. │~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~│
  15. │  Register now!  Register now!  Register now!  Register now!  Register now!  │
  16. │                                                                             │
  17. └─────────────────────────────────────────────────────────────────────────────┘
  18. Register your copy of this program by sending me your name, address, the
  19. version number you are using (displayable by invoking COMMENT ?), and
  20. $6.00 in US money, and I will see that you get at least two future updates
  21. of COMMENT.COM and my hearty thanks.
  22.  
  23. As a greater incentive, anyone registering with $15 or more will get:
  24. -  source code (which you want because then you can change the quotes)
  25. -  a printed copy of the current docs which includes the ASM source code frame
  26. -  even heartier thanks.
  27.  
  28. In addition, registrants will be able to get future fun quasi-commercial
  29. versions of COMMENT at greatly reduced cost.
  30.  
  31. Speaking of commercials, let me say that starting with Version 2.61, all copies
  32. of COMMENT contain a "commercial" that comes up now and then in spectacular
  33. fashion to encourage you to register and get all sorts of goodies like these.
  34.  
  35. By the way, let me know WHERE you got this copy of COMMENT.  I always
  36. like to see the information supply lines at work.  It's an odd feeling dialing
  37. into a new BBS and finding your own program got there before you did.
  38.  
  39.  
  40. VERSION HISTORY -- COMMENT.ASM
  41.  
  42. Version 1.00 04/15/87  --  original version with 20 quotes
  43. Version 1.40 06/01/87  --  expanded to 75 quotes
  44. Version 1.90 09/15/87  --  expanded to 100 quotes
  45. Version 2.09 05/30/88  --  reworked algorithm to include blocks and pointers
  46. Version 2.10 12/15/88  --  expanded to 115 quotes
  47. Version 2.11 06/01/89  --  expanded to 123 quotes, added separator lines
  48. Version 2.12 07/26/89  --  expanded to 125 quotes, corrected some items
  49. Version 2.13 08/17/89  --  changed about a dozen quotes and updated others
  50. Version 2.20 10/17/89  --  made formatting consistent, began use of ANSI codes
  51. Version 2.30 10/23/89  --  expanded to 160 quotes
  52. Version 2.31 11/21/89  --  expanded to 169 quotes and added command-line parms
  53. Version 2.41 12/22/89  --  expanded to 205 quotes, rewrote subroutine calls for clarity
  54. Version 2.50 12/23/89  --  added "dump" mode to spit out all messages for diagnostic uses
  55. Version 2.55 01/07/90  --  expanded to 285 quotes -- went from 5 to 7 mblocks
  56. Version 2.61 01/31/90  --  added X option to enable off-color comments, (also 
  57.                            known as "wiener mode," added more stuff, fixed bug
  58.                            in dump mode that prevented display of first item 
  59.                            and caused crap at end of dump
  60. Version 2.70 04/09/90  --  added checking for ANSI driver loaded
  61. -----------------------------------------------------------------------------
  62. VERSION HISTORY -- COMMRES.ASM
  63.  
  64. Version 0.01 12/12/89  --  Testing version; problems with segment pointers -- not operable
  65. Version 0.10 12/14/89  --  Testing version; still pointer problems but does install correctly
  66. Version 0.25 01/04/90  --  Testing version; working out way to do windowing
  67. Version 0.30 04/01/90  --  Miserable failure; project on hold
  68. -----------------------------------------------------------------------------
  69. COMMENT.ASM and COMMENT.COM Version 2.0 - 3.0+
  70. COMMRES.ASM and COMMRES.COM Version 0.01 - 1.0+
  71.  
  72. (c) Copyright 1987, 1988, 1989, 1990  Scott Wenzel
  73. Commercial redistribution prohibited
  74. No fee may be charged for distribution of any portion of this code or any
  75. executable program or derivative created from any portion of this code.
  76. NOTE!
  77. NOTE!
  78. NOTE!
  79.  
  80. This file was created and modified using Eric Isaacson's A86 shareware
  81. assembler, an item I highly recommend.  If, however, you wanna be asinine
  82. and use MASM, you will have to install all the ASSUMES and SEGMENT and ENDS
  83. statements and other such junk.  Eric's A86 allows you to have done with all
  84. that and simply write clean code.  This program is loosely based on a routine
  85. done some years ago called CAVEAT, but all the quotes have been rewritten and
  86. the indexing routine expanded greatly beyond the old version's practical limit
  87. of 100 messages or so, beyond which some of them seemed to never be displayed.
  88. Since the new routine uses the seconds' AND hundredths' timer of the DOS clock
  89. in a dual-indexing scheme in order to come up with its pseudo-random choice
  90. of quotes, any of you geniuses can go ahead and tweak it to read the date
  91. or something or factor in the month or whatever and thus be able to have
  92. (theoretically) thousands of quotes in here (see your Assembly Language
  93. manual under the heading of "Memory Segment Limits."  See also "65,535")
  94. Go ahead and modify it all you want, but leave some of the quotes in, and
  95. also leave all this stuff in so we can keep some kind of revision history
  96. and therefore not reinvent the wheel.  Leave a few of the choice quotes in
  97. just so we can continue to warp young minds with this sort of thing.
  98.  
  99. Scott Wenzel
  100. Galapagos Development
  101. 772 Crescent Street
  102. Buffalo, New York 14216
  103. 716-835-4821 (please don't call me with your problems)
  104.  
  105. tt
  106. ---------------------------------------------------------------------------
  107. HOW "COMMENT" WORKS:
  108.  
  109. On startup, COMMENT checks to make sure the ANSI driver is loaded and blows
  110. out if it doesn't find it.  Then, it reads the EQU showing the "message block"
  111. count and the number of messages in each.  This version contains seven blocks,
  112. with 25h (or so) messages in each.  Notice that the total number of messages in
  113. this scheme must, therefore, be a multiple of the number of blocks, and that
  114. all blocks must contain the same number of messages.  If you're not literate
  115. enough to actually fill all those message slots, you can pad them out with
  116. blank strings until someone says something amazing you can stick in there.
  117.  
  118. Anyway, it takes the seconds' indicator of the DOS Get Time function, and
  119. divides that by the number of blocks.  The modulus (remainder) of this 
  120. number acts as an offset pointer in JMPTABLE, thus pointing to the block
  121. from which the message will come.  Yes, this means there's a practical limit
  122. of 60 blocks.
  123.  
  124. Then, the routine uses the hundredths' indicator to pick out the message 
  125. offset from the beginning of the designated block.  And yes, this means
  126. there's a practical limit of 100 messages per block, a limit the original
  127. CAVEAT routine suffered from.
  128.  
  129. The resulting offsets are added together, pointing out the message to be
  130. issued.  The regular DOS write-string function displays the message, then 
  131. the routine exits.
  132. ------------------------------------------------------------------------------
  133. COMMAND-LINE PARAMETERS
  134.  
  135. There are some options for COMMENT.  
  136.  
  137. ?
  138.  
  139. "comment ?" displays a help message and short copyright notice.  This includes
  140. a summary of the parameters and the current version number.
  141.  
  142. c
  143.  
  144. "comment c" displays the full copyright notice and information about upgrades
  145. and registration.
  146.  
  147. d
  148.  
  149. "comment d" invokes "dump mode," wherein an equate called TNUM (which should
  150. be placed in the top and should reflect the total count of messages in hex) is
  151. read.  The system then just starts from top to bottom cranking out all quotes.
  152.  
  153. x
  154.  
  155. "comment x" enables you to get out of "wiener mode" and display all the entries
  156. in COMMENT, including the off-color ones.  This is the only param that can be
  157. combined with others, but X has to come first!
  158.  
  159. #
  160.  
  161. "comment" followed by a number from 2 to 9 spits out that many random quotes.
  162. In practical terms, for a 24-line screen the best number is 3.  Entering 0
  163. or a number larger than 9 results in you getting either 1 message or whatever
  164. the first nonzero digit is.  Entering any non-numeric gets you 1 message, too.
  165.  
  166.  
  167. You can use a slash or a dash as a parameter indicator, or use nothing.  The
  168. program has been told to ignore everything it can't eat.
  169.  
  170. Therefore,  COMMENT c, COMMENT /c and COMMENT -C (or, hell, COMMENT @!@$!%@C)
  171. are all treated identically.
  172.  
  173. COMMENT can be redirected to standard output, which means you can enjoy all
  174. the messages by sending a dump to LPT1:.  Cheaters.
  175. ------------------------------------------------------------------------------
  176. MODIFYING COMMENT.ASM
  177.  
  178. To change any existing messages, just alter the text, keeping in mind things
  179. like line breaks, single quotes or apostrophes-if-you-use-them, and DOS' 
  180. requirements for the formatting of data for the INT 21h write-string 
  181. function.  I have adhered to a certain standard of appearance in entering
  182. these messages, and would appreciate this being continued.
  183.  
  184. HOW MESSAGES HAVE BEEN FORMATTED IN COMMENT
  185.  
  186. Messages have been set up as follows.  If a message is a direct quote, it has
  187. on its first line a double quote.  Succeeding lines of that quote are indented
  188. exactly one character.  Quotes of quotes are set off with a single quote.
  189. All apostrophes are inset by inserting a literal ascii code 39 in the text --
  190. there are many examples of this.
  191.  
  192. All quotes from material or people are attributed.  This includes the author,
  193. the name of the song or poem or piece or whatever, the album or collection
  194. it's from, the year of publication, and as much other information as can be
  195. obtained.  If you include "surprising quotes," stuff people may have heard
  196. but don't generally know where it came from, be SURE you do this.  The 
  197. attribution is set up as follows:  3 leading spaces, a hyphen, a single space,
  198. then the attribution.  Any succeeding lines of attribution are set in to
  199. indent 5 spaces so they align with the first meaningful character in Line 1,
  200. NOT the hyphen.  I also try to keep things from taking up the full width of 
  201. the screen.  Or the full height, either.  Don't try to excerpt "Gone With
  202. The Wind" or "War and Peace" in here.  It's counterproductive.
  203.  
  204. FIDDLING WITH THE NUMBERS, ETC.
  205.  
  206. To increase the number of messages within each block, increase the equate
  207. for this at the top of the file, then go in and move the "MBLOCKx" markers
  208. so that they occur every "x" number of messages.  For instance, if you have
  209. three blocks, sixteen messages per block, MBLOCK1 will appear at the M10
  210. position, MBLOCK2 will appear at M20, etc.  If you change this to seventeen
  211. messages per block, MBLOCK1 will appear next to M11, MBLOCK2 will be next
  212. to M22, etc.
  213.  
  214. To add a new block, increase the equate at the top, and add in an entry to
  215. the JMPTABLE below whatever MBLOCK listing is already there.  Then, go down 
  216. to the bottom of the offset listings, and add in that same MBLOCKx entry,
  217. followed by enough Mxx entries to handle the messages-per-block figure.
  218. and lastly, add in the actual quote text.
  219.  
  220. Also, so that dump mode works correctly, change the tnum equate, which dump
  221. mode uses to set a loop to count through them all.  If you add messages and
  222. do not increase this equate, the messages will not appear in the dump, 
  223. though they will of course be displayed if called specifically.
  224.  
  225. ----------------------------------------------------------------------------
  226.  
  227. POSSIBLE IMPROVEMENTS
  228.  
  229. I've thought of a few different ways this could be improved. One is to
  230. allow for user-editing of messages, but then again, that would take away
  231. programmers' creative license.  Another idea was to make it memory-resident,
  232. burping out quotes at random times and when least expected.  A version I have
  233. also been working on would latch onto the keyboard buffer and randomly
  234. insert quotes into whatever you were typing at the time... a great way to 
  235. spice up those drab office memos and reports.  See who actually reads them!
  236.  
  237. If you wanna force people to load the ANSI driver or equivalent, you could
  238. insert escape codes for color, screen position, etc.   I use these for some
  239. items, but limit myself to bold or underline or flashing characters only.
  240. I imagine you could use ANSI color and cursor-positioning, but I don't because
  241. many people have only monochrome and color would be wasted.
  242.  
  243. If you use off-color comments, load them into whatever the LAST mblock is
  244. (highest number) that you have defined.  If you do not invoke the X option,
  245. the last mblock is ignored and none of the messages in it will be displayed.
  246. Yes, this means there's a limit on the number of rowdy messages you can
  247. have, but if you change the amounts associated with XRATE, you can have 
  248. it mark off several mblocks if you want.  How much do you really want anyhow?
  249.  
  250. ----------------------------------------------------------------------------
  251. ABOUT COMMRES.ASM:
  252.  
  253. This is a version I wanted to try that would load memory-resident and then 
  254. be popped up at any time for a quick comment in the middle of other things.
  255. I began work on this in December, 1989 and developed a version that at least
  256. would load correctly and not screw up other TSRs, though I still have not
  257. fathomed the mystery of which DOS interrupts are safe to use during a TSR.  It
  258. will involve a lot of rewriting of COMMENT.
  259.  
  260. The present pre-alpha version sits on the keyboard interrupt.  I have thought
  261. of doing it to sit on the clock and erupt every few minutes.  There are lots of
  262. possibilities.
  263.  
  264.          ----------------end-of-author's-documentation---------------
  265.  
  266.                         Software Library Information:
  267.  
  268.                    This disk copy provided as a service of
  269.  
  270.                         The Public (Software) Library
  271.  
  272.          We are not the authors of this program, nor are we associated
  273.          with the author in any way other than as a distributor of the
  274.          program in accordance with the author's terms of distribution.
  275.  
  276.          Please direct shareware payments and specific questions about
  277.          this program to the author of the program, whose name appears
  278.          elsewhere in  this documentation. If you have trouble getting
  279.          in touch with the author,  we will do whatever we can to help
  280.          you with your questions. All programs have been tested and do
  281.          run.  To report problems,  please use the form that is in the
  282.          file PROBLEM.DOC on many of our disks or in other written for-
  283.          mat with screen printouts, if possible.  The P(s)L cannot de-
  284.          bug programs over the telephone.
  285.  
  286.          Disks in the P(s)L are updated monthly, so if you did not get
  287.          this disk  directly from the P(s)L,  you should be aware that
  288.          the files in this set may no  longer be the current versions.
  289.  
  290.          For a copy of the latest monthly software library newsletter
  291.          and a list of the 2,000+ disks in the library, call or write
  292.  
  293.                         The Public (Software) Library
  294.                               P.O.Box 35705 - F
  295.                            Houston, TX 77235-5705
  296.                             Orders: 800-2424-PSL
  297.                             Info:   713-524-6394
  298.                             FAX #:  713-524-6398
  299.                             CIS ID: 71355,470
  300.  
  301.