home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR10
/
COMM270.ZIP
/
COMM270.DOC
next >
Wrap
Text File
|
1993-12-24
|
16KB
|
301 lines
COMMENT
(c) 1987, 1988, 1989, 1990 Galapagos Development and Scott Wenzel
772 Crescent Street, Buffalo, NY 14216
┌─────────────────────────────────────────────────────────────────────────────┐
│ │
│ 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 │
│ │
│~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~│
│ 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
$6.00 in US money, and I will see that you get at least two future updates
of COMMENT.COM and my hearty thanks.
As a greater incentive, anyone registering with $15 or more will get:
- source code (which you want because then you can change the quotes)
- a printed copy of the current docs which includes the ASM source code frame
- even heartier thanks.
In addition, registrants will be able to get future fun quasi-commercial
versions of COMMENT at greatly reduced cost.
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
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
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 to enable off-color comments, (also
known as "wiener mode," added more stuff, fixed bug
in dump mode that prevented display of first item
and caused crap at end of dump
Version 2.70 04/09/90 -- added checking for ANSI driver loaded
-----------------------------------------------------------------------------
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 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 file was created and modified using Eric Isaacson's A86 shareware
assembler, an item I highly recommend. If, however, you wanna be asinine
and use MASM, you will have to install all the ASSUMES and SEGMENT and ENDS
statements and other such junk. Eric's A86 allows you to have done with all
that and simply write clean code. This program is loosely based on a routine
done some years ago called CAVEAT, but all the quotes have been rewritten and
the indexing routine expanded greatly beyond the old version's practical limit
of 100 messages or so, beyond which some of them seemed to never be displayed.
Since the new 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
772 Crescent Street
Buffalo, New York 14216
716-835-4821 (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.
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.
COMMENT can be redirected to standard output, which means you can enjoy all
the messages by sending a dump to LPT1:. Cheaters.
------------------------------------------------------------------------------
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.
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.
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!
If you wanna force people to load the ANSI driver or equivalent, you could
insert escape codes for color, screen position, etc. I use these for some
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?
----------------------------------------------------------------------------
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.
----------------end-of-author's-documentation---------------
Software Library Information:
This disk copy provided as a service of
The Public (Software) Library
We are not the authors of this program, nor are we associated
with the author in any way other than as a distributor of the
program in accordance with the author's terms of distribution.
Please direct shareware payments and specific questions about
this program to the author of the program, whose name appears
elsewhere in this documentation. If you have trouble getting
in touch with the author, we will do whatever we can to help
you with your questions. All programs have been tested and do
run. To report problems, please use the form that is in the
file PROBLEM.DOC on many of our disks or in other written for-
mat with screen printouts, if possible. The P(s)L cannot de-
bug programs over the telephone.
Disks in the P(s)L are updated monthly, so if you did not get
this disk directly from the P(s)L, you should be aware that
the files in this set may no longer be the current versions.
For a copy of the latest monthly software library newsletter
and a list of the 2,000+ disks in the library, call or write
The Public (Software) Library
P.O.Box 35705 - F
Houston, TX 77235-5705
Orders: 800-2424-PSL
Info: 713-524-6394
FAX #: 713-524-6398
CIS ID: 71355,470