Dec 222017
 
Version 3.05 of COMMENT. Displays a quote of the day message.
File COMM305.ZIP from The Programmer’s Corner in
Category Games and Entertainment
Version 3.05 of COMMENT. Displays a quote of the day message.
File Name File Size Zip Size Zip Type
COMM302.DOC 17217 6713 deflated
COMMENT.COM 54299 23137 deflated

Download File COMM305.ZIP Here

Contents of the COMM302.DOC file


COMMENT
(c) 1987, 1988, 1989, 1990, 1991 Galapagos Development and Scott Wenzel
29 South Charles Street, Red Lion, PA 17356


Look for these upcoming new
items, toys and innovations
from Galapagos Development:

- AIRPLANE TOILET(tm) - the oddest game you ever saw
- POSTpaid(tm) - to format files to print on PS devices
- COMMRES - memory-resident popup version of COMMENT
- SPACE - musical and graphical free-space display for HD

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Register now! Register now! Register now! Register now! Register now!


Register your copy of this program by sending me your name, address, the
version number you are using (displayable by invoking COMMENT ?), and
$8.00 in US money. Thanks to you, it's working.

As a greater incentive, anyone registering with $15 or more will get a future
updated version of COMMENT on disk. You also have the option of getting the
ASM source code if you want it. You're then on your own.

Speaking of commercials, let me say that starting with Version 2.61, all copies
of COMMENT contain a "commercial" that comes up now and then in spectacular
fashion to encourage you to register and get all sorts of goodies like these.

By the way, let me know WHERE you got this copy of COMMENT. I always
like to see the information supply lines at work. It's an odd feeling dialing
into a new BBS and finding your own program got there before you did.


VERSION HISTORY -- COMMENT.ASM

Version 1.00 04/15/87 -- original version with 20 quotes -- written for MASM
Version 1.40 06/01/87 -- expanded to 75 quotes
Version 1.90 09/15/87 -- expanded to 100 quotes
Version 2.09 05/30/88 -- reworked algorithm to include blocks and pointers
Version 2.10 12/15/88 -- expanded to 115 quotes - no longer MASM-compatible
Version 2.11 06/01/89 -- expanded to 123 quotes, added separator lines
Version 2.12 07/26/89 -- expanded to 125 quotes, corrected some items
Version 2.13 08/17/89 -- changed about a dozen quotes and updated others
Version 2.20 10/17/89 -- made formatting consistent, began use of ANSI codes
Version 2.30 10/23/89 -- expanded to 160 quotes
Version 2.31 11/21/89 -- expanded to 169 quotes and added command-line parms
Version 2.41 12/22/89 -- expanded to 205 quotes, rewrote subroutine calls for clarity
Version 2.50 12/23/89 -- added "dump" mode to spit out all messages for diagnostic uses
Version 2.55 01/07/90 -- expanded to 285 quotes -- went from 5 to 7 mblocks
Version 2.61 01/31/90 -- added X option - enables off-color quotes, (to get
out of "wiener mode"), added more stuff, fixed bug
in dump mode that prevented display of first item
and caused crap at end of dump; added commercials.
Version 2.70 04/09/90 -- added checking for ANSI driver (now req'd.)
Version 2.80 06/05/90 -- expanded to 325 quotes, added pause option and timed
wait-after-display option
Version 2.81 06/19/90 -- more stuff, fixed wait mode to be speed independent
Version 2.82 09/29/90 -- still more material, cleaned up wait-vs-pause
Version 2.83 11/15/90 -- Corrected some material, added more
Version 3.00 12/13/90 -- Added keyword-searching option and more quotes
Version 3.01 12/21/90 -- Added failed-to-find message and some new material
Version 3.02 01/07/91 -- Bug fix, corrected failure of /w and /p after the
/f parameter was added. Added short pause between
multiple found messages. And, as always, new stuff
-----------------------------------------------------------------------------
VERSION HISTORY -- COMMRES.ASM

Version 0.01 12/12/89 -- Testing version; problems with segment pointers -- not operable
Version 0.10 12/14/89 -- Testing version; still pointer problems but does install correctly
Version 0.25 01/04/90 -- Testing version; working out way to do windowing
Version 0.30 04/01/90 -- Miserable failure; project on hold
-----------------------------------------------------------------------------
COMMENT.ASM and COMMENT.COM Version 2.0 - 3.0+
COMMRES.ASM and COMMRES.COM Version 0.01 - 1.0+

(c) Copyright 1987, 1988, 1989, 1990, 1991 Scott Wenzel
Commercial redistribution prohibited
No fee may be charged for distribution of any portion of this code or any
executable program or derivative created from any portion of this code.
NOTE!
NOTE!
NOTE!

This program is designed to spit out a lot of odd messages from a hard-coded
internal pile of around 350 or so. It uses a random-selection feature, with
attention paid to various command-line options, to select the new and
bizarre message to be spat out onto your screen. It uses all DOS and BIOS
calls and thus should run anywhere. The original routine was rooted in a long-
forgotten program called CAVEAT, which I ripped to smithereens and rebuilt
stronger and more powerful. Since the new selection and indexing
routine uses the seconds' AND hundredths' timer of the DOS clock in a
dual-indexing scheme in order to come up with its pseudo-random choice of
quotes, any of you geniuses can go ahead and tweak it to read the date or
something or factor in the month or whatever and thus be able to have
(theoretically) thousands of quotes in here (see your assembly language manual
under the heading of "Memory Segment Limits." See also "65,535") Go ahead and
modify it all you want, but leave some of the quotes in, and also leave all
this stuff in so we can keep some kind of revision history and therefore not
reinvent the wheel. Leave a few of the choice quotes in just so we can
continue to warp young minds with this sort of thing.

Scott Wenzel
Galapagos Development
29 South Charles Street
Red Lion, Pennsylvania 17356
717-246-2697 (please don't call me with your problems)

tt
---------------------------------------------------------------------------
HOW "COMMENT" WORKS:

On startup, COMMENT checks to make sure the ANSI driver is loaded and blows
out if it doesn't find it. Then, it reads the EQU showing the "message block"
count and the number of messages in each. This version contains seven blocks,
with 25h (or so) messages in each. Notice that the total number of messages in
this scheme must, therefore, be a multiple of the number of blocks, and that
all blocks must contain the same number of messages. If you're not literate
enough to actually fill all those message slots, you can pad them out with
blank strings until someone says something amazing you can stick in there.

Anyway, it takes the seconds' indicator of the DOS Get Time function, and
divides that by the number of blocks. The modulus (remainder) of this
number acts as an offset pointer in JMPTABLE, thus pointing to the block
from which the message will come. Yes, this means there's a practical limit
of 60 blocks.

Then, the routine uses the hundredths' indicator to pick out the message
offset from the beginning of the designated block. And yes, this means
there's a practical limit of 100 messages per block, a limit the original
CAVEAT routine suffered from.

The resulting offsets are added together, pointing out the message to be
issued. The regular DOS write-string function displays the message, then
the routine exits.
------------------------------------------------------------------------------
COMMAND-LINE PARAMETERS

There are some options for COMMENT.

?

"comment ?" displays a help message and short copyright notice. This includes
a summary of the parameters and the current version number.

c

"comment c" displays the full copyright notice and information about upgrades
and registration.

d

"comment d" invokes "dump mode," wherein an equate called TNUM (which should
be placed in the top and should reflect the total count of messages in hex) is
read. The system then just starts from top to bottom cranking out all quotes.

x

"comment x" enables you to get out of "wiener mode" and display all the entries
in COMMENT, including the off-color ones. This is the only param that can be
combined with others, but X has to come first!

#

"comment" followed by a number from 2 to 9 spits out that many random quotes.
In practical terms, for a 24-line screen the best number is 3. Entering 0
or a number larger than 9 results in you getting either 1 message or whatever
the first nonzero digit is. Entering any non-numeric gets you 1 message, too.

p

"comment p" (or some combination of the above) will wait for you to press a
key following message display. Can be used in dump mode, but who needs it?

w

"comment w" causes COMMENT to wait about five seconds and then return to DOS.
Use this mode for unattended operation.

You can use a slash or a dash as a parameter indicator, or use nothing. The
program has been told to ignore everything it can't eat.

Therefore, COMMENT c, COMMENT /c and COMMENT -C (or, hell, COMMENT @!@$!%@C)
are all treated identically.

f

"comment f" followed by a word or phrase causes COMMENT to search the message
base and spit out all the quotes that contain that phrase. Please note that
there's a small bug in the program somewhere that, if you select an extremely
popular word or phrase (try "Carlin") the program gets excited and starts
spitting out some extra quotes that have nothing to do with what you wanted.
I'll fix that some day. **Please note that the F option is case-sensitive**,
so if you type in "Cat" and the only occurence is "cat" you will not get the
quote displayed. I suggest you try both ways, or optionally (on longer
search phrases) leave off the first letter. Thus, COMMENT /Fomputer will get
you anything containing "Computer" or "computer" but will not get you (at least
in this version) "COMPUTER." No other options work with /F, and as warning,
**when you use /F the /X option is turned on and cannot be disabled!**
If you go searching for naughty words, you'll get them. I am not responsible
for you being potentially offended as a result. Remember you heard it here.

If the search finds nothing, you'll be so informed.

The "F" option was by far the most fun to write. Just for trivia's sake.

-----------------------------------------------------------------------------
An extra note:

COMMENT can be redirected to standard output, which means you can enjoy all
the messages by sending a dump to LPT1:. Cheaters. Your output will probably
contain some ANSI escape sequences -- no telling what they may do to your
printer output, so be prepared. I have not included any means to filter out
the ANSI sequences, because I kind of like them.
------------------------------------------------------------------------------
MODIFYING COMMENT.ASM

To change any existing messages, just alter the text, keeping in mind things
like line breaks, single quotes or apostrophes-if-you-use-them, and DOS'
requirements for the formatting of data for the INT 21h write-string
function. I have adhered to a certain standard of appearance in entering
these messages, and would appreciate this being continued.

HOW MESSAGES HAVE BEEN FORMATTED IN COMMENT

Messages have been set up as follows. If a message is a direct quote, it has
on its first line a double quote. Succeeding lines of that quote are indented
exactly one character. Quotes of quotes are set off with a single quote.
All apostrophes are inset by inserting a literal ASCII code 39 in the text --
there are many examples of this.

All quotes from material or people are attributed. This includes the author,
the name of the song or poem or piece or whatever, the album or collection
it's from, the year of publication, and as much other information as can be
obtained. If you include "surprising quotes," stuff people may have heard
but don't generally know where it came from, be SURE you do this. The
attribution is set up as follows: 3 leading spaces, a hyphen, a single space,
then the attribution. Any succeeding lines of attribution are set in to
indent 5 spaces so they align with the first meaningful character in Line 1,
NOT the hyphen. I also try to keep things from taking up the full width of
the screen. Or the full height, either. Don't try to excerpt "Gone With
The Wind" or "War and Peace" in here. It's counterproductive. Also, in the
ASM code, many, many lines are wider than 80 columns! If you have a text editor
that can only go to 80, 127, or 255 columns, I suggest you junk it and get
something else. I have used the Norton Editor for years and am pleased with
its seemingly unlimited line width handling. Put it this way: Norton can
handle a much wider line than my assembler can.

FIDDLING WITH THE NUMBERS, ETC.

To increase the number of messages within each block, increase the equate
for this at the top of the file, then go in and move the "MBLOCKx" markers
so that they occur every "x" number of messages. For instance, if you have
three blocks, sixteen messages per block, MBLOCK1 will appear at the M10
position, MBLOCK2 will appear at M20, etc. If you change this to seventeen
messages per block, MBLOCK1 will appear next to M11, MBLOCK2 will be next
to M22, etc. Remember that we're counting in hex.

To add a new block, increase the equate at the top, and add in an entry to
the JMPTABLE below whatever MBLOCK listing is already there. Then, go down
to the bottom of the offset listings, and add in that same MBLOCKx entry,
followed by enough Mxx entries to handle the messages-per-block figure.
and lastly, add in the actual quote text.

Also, so that dump mode works correctly, change the tnum equate, which dump
mode uses to set a loop to count through them all. If you add messages and
do not increase this equate, the messages will not appear in the dump,
though they will of course be displayed if called specifically.

----------------------------------------------------------------------------

POSSIBLE IMPROVEMENTS

I've thought of a few different ways this could be improved. One is to
allow for user-editing of messages, but then again, that would take away
programmers' creative license. Another idea was to make it memory-resident,
burping out quotes at random times and when least expected. A version I have
also been working on would latch onto the keyboard buffer and randomly
insert quotes into whatever you were typing at the time... a great way to
spice up those drab office memos and reports. See who actually reads them!

You could get very snazzy with the ANSI driver support. You could perhaps
insert escape codes for color, screen position, etc. I use ANSI for many
items, but limit myself to bold or underline or flashing characters only.
I imagine you could use ANSI color and cursor-positioning, but I don't because
many people have only monochrome and color would be wasted.

If you use off-color comments, load them into whatever the LAST mblock is
(highest number) that you have defined. If you do not invoke the X option,
the last mblock is ignored and none of the messages in it will be displayed.
Yes, this means there's a limit on the number of rowdy messages you can
have, but if you change the amounts associated with XRATE, you can have
it mark off several mblocks if you want. How much do you really want anyhow?
Nasty as they wanna be, I guess.

Eventually I will have to write this as a Windows application just to keep
up with things. Someday I may make the message blocks user-editable. Maybe.
----------------------------------------------------------------------------
ABOUT COMMRES.ASM:

This is a version I wanted to try that would load memory-resident and then
be popped up at any time for a quick comment in the middle of other things.
I began work on this in December, 1989 and developed a version that at least
would load correctly and not screw up other TSRs, though I still have not
fathomed the mystery of which DOS interrupts are safe to use during a TSR. It
will involve a lot of rewriting of COMMENT.

The present pre-alpha version sits on the keyboard interrupt. I have thought
of doing it to sit on the clock and erupt every few minutes. There are lots of
possibilities.


 December 22, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)