home *** CD-ROM | disk | FTP | other *** search
-
-
-
- "VPRINT" Vertical Printing Program Instructions
- - by -
- Steven E. Margison
-
- Copyright 1984, S.E. Margison
-
-
- I. INTRODUCTION
- This program was originally intended to print fanfold
- adhesive labels for the sides of 3-ring binders. The idea was to
- print vertically, so that the labels would be easier to read when
- the binders were lined up on a shelf. But, like many programs,
- what started out to be a quick one-evening job wound up taking
- over 25 hours, 17K of source code, and 4K of executable program
- code. Another classic case of "wouldn't-it-be-nice-if..."!
- VPRINT.COM is intended for use with Z80-based CPM systems
- and an Epson MX80 printer with GrafTrax Plus. It should be
- obvious that the basis of this program is the use of the graphics
- mode on the Epson to write out a custom character set, with all
- characters turned "sideways." This presents some unusual
- formatting problems, in that margins become switched around. In
- order to maintain a vertical label that reads from left-to-right,
- it is necessary to either buffer all text first, then print it in
- last-line-in, first-line-out order, starting at the left margin
- of the paper, or write each line as received from the console,
- justifying to the RIGHT-hand margin. The second approach is the
- one that VPRINT uses. This may cause some headaches when first
- using the program as explained later, but this program is, after
- all, intended primarily for label-making, not for word-processing!
-
- II. USAGE
- The program is disgustingly simple to use. After the
- program signs on, it will prompt you with a '>' character. You
- then type in the text you want printed, the special commands you
- want, or a combination of both, and then a <RETURN>. The line is
- then printed out, and you are prompted for the next line. (And
- THAT took 17K of source code????)
- The special character set includes all upper case letters,
- numbers, and most punctuation, with the following exceptions:
- no control characters accepted
- $ is tall up arrow
- % is tall down arrow (except when used as command lead-in)
- & is fancy border character #1
- < and > are spaces (reserved for future special characters)
- (note that a regular space character is recognized)
- = is fancy border character #2
- @ is a slashed zero (normal 0 is un-slashed)
- These additional punctuation marks are supported normally:
- [ ] \ ^ _(underscore)
-
- Any illegal characters found in the text string are simply
- eliminated and the remaining characters in the line printed. All
- characters are in a 5 X 7 dot-matrix style, except for a few
- which are 6 X 7. An attempt was made to duplicate the normal
- Epson character set, but that is not possible as the Epson does
-
-
- 1
-
-
-
- some neat "half-spacing" tricks within its character set which
- can't be duplicated in the graphics mode.
-
- III. SPECIAL COMMANDS
- No printing program would be complete without special
- printing commands, and VPRINT is no exception! There are at
- least 14 print mode combinations (more if you start getting
- tricky!). In addition, there are several commands aimed at
- adjusting character/line spacing, form length, etc. All special
- commands are preceeded by a % character, and MUST be the first
- items on a text line. A text line may consist only of commands
- if desired. The program will report an error and "kill" the
- entire line on the first encountered command systax or value
- error. Multiple special commands may be used, provided each is
- prefaced with its own % sign. A % sign within the text string is
- treated as a character, rather than a lead-in to a command. The
- special commands are as follows:
- K = sets normal graphics (mode K) (Default)
- L = sets hi-resolution graphics (mode L)
- D = sets "double-strike" mode. Line is printed,
- paper is advanced 1 dot height, and line is re-
- printed.
- T = Tall characters. All characters are printed
- twice normal height. Spacing between characters
- remains normal.
- En = sets "Emphasized" mode. Line is reprinted over itself
- "n" number of times, where "n" is number 1-9. Note
- that "n" = 0 cancells this mode, and that "n" = 1 is
- actually the normal mode of operation (1 pass).
- Cnn = sets maximum number of characters to allow per line
- This affects right-hand margin placement.
- (Maximum is 80, Default is 40)
- Wnn = sets number of 72" increments between vertical
- columns. Range is from 1-72, Default is 12 (1/6")
- Sn = sets number of dot spacings between characters.
- Range is 1-9, Default is 4.
- \ = suppress line feed at end of line. Allows for
- "overstriking" one line with the next line.
- A = Force paper advance of one line immediately
- F = Force form feed immediately
- ? = Prints HELP menu to console (overrides remainder of
- line)
- N = returns to Normal character mode (cancells T, D,
- and E modes)
- R = re-initialize printer. Used mainly to reset
- top-of-form.
- Pnn = sets paper form length. "nn" is 1-11 inches,
- Default is 1".
- Q = Quit program immediately and return to system.
-
- Note that "n" and "nn" above must be fully expressed. For
- two-digit entries, use leading zero if necessary. Error message
- is generated for any illegal syntax or variable.
-
-
-
-
- 2
-
-
-
- The ">" prompt character is preceeded by the print modes
- currently in effect. As follows:
-
- K> (mode K, no special modes set)
- LD> (mode L, Double strike mode set)
- LE3T> (mode L, Emphasize with 3 passes, using Tall
- characters)
- K\D> (mode K, Double strike mode set, current line
- will overprint last line)
-
- A typical entry may be as follows:
-
- K>%C20%W36%R%T%E3%DSTEVEN MARGISON
- KE3TD>%F%Q
-
- These lines would set a limit of 20 characters (%C20),
- 36/72" line (column) spacing (%W36), re-set printer (not needed
- if program just invoked, as initialization of program
- automatically does a %R), set Tall characters (%T), Emphasize
- with 3 passes (%E3), and Double-strike (%D). My name would then
- be printed, and the modes would be echoed before the prompt for
- the next line. The next line would do a form feed (%F), and then
- return to CPM (%Q). Piece-of-cake, Right??? Note that all of
- the commands on line 1 could have been done first, and my name
- just typed on the second line with the same results. The form
- feed and exit would then be on line 3. A little creative
- thinking should show how these modes, plus the overstrike (%\)
- function can be mixed to form some unique printing. Keep in mind
- that the Wnn command sets the forward paper motion, and values
- less than 06 will cause one line to run into or overprint the
- previous line. (This is how Double-striking works; by temporarily
- setting a W01 mode, then returning to the user's selection.)
-
- IV. ABOUT MARGINS, LINE LENGTHS, JUSTIFICATION
- The actual length of a line and, more importantly, where the
- right-hand or "top" margin appears is a function of the K or L
- modes, the character count limit, and the number of dot spacings
- set between characters (vertically). Remember the Epson limits
- for graphics: mode K is not more than 480 bytes (dots), and mode
- L is not more than 960 bytes (dots). The right-hand margin is
- literally the maximum number of bytes programmed. The formula
- is: MAX = (NUMCHARS*8) + (SPACING*NUMCHARS)
- Where NUMCHARS is the maximum number of characters set with
- the Cnn command;
- and SPACING is the number of dot spaces set with the Sn
- command. For the defaults of 40 and 4 respectively:
-
- MAX = (40*8) + (4*40)
- = 320 + 160
- = 480
- which we all know is the maximum for mode K graphics.
- This will put the top of the first character at the right-most
- head position on the Epson. Since this is the maximum for mode
- K, any attempt to set Cnn or Snn higher will result in an error
- message warning of too many bytes for mode K. Changing to mode L
-
-
- 3
-
-
-
- will give more room, but for the SAME values, the right-hand
- margin will still be 480 bytes in from the left, which is only
- about half-way across the page in mode L! As you can see, the
- formula above determines the position of the "top" of the line.
- I suggest for any given set of labels (or whatever) to print,
- practice on normal fanfold paper until the proper margin and
- format are determined, then load the real stuff and go to work.
-
- V. ERRORS
- The program, I believe, will not let you commit an
- unpardonable sin. There are many error messages, all of which
- will point you to your error. Like most programs, though, it
- will ultimately print what you tell it to print, not what you
- meant it to print!
-
- VI. SYSTEM COMPATABILITY
- Although I have no way to try the program on another CPM
- system, I have kept the program to normal CPM 2.2 and above
- standards. (One caution: the system MUST be a Z80 system, as some
- instructions are used which are NOT 8080/8085 compatible.) I am
- using the normal LST: device output system calls, and at no time
- is bit 7 sent to the printer. As long as your system does not
- attempt to "trap" control characters sent to the LST: device,
- there should be no problems.
-
-
- Well, like the program, what started to be a quick one-page set
- of instructions has now become several pages of documentation.
- Hope you enjoy this program. If you are ambitious enough to want
- to add new features or more character sets, contact me via
- CompuServe E-MAIL (74435,1042) and we can discuss a transfer of
- source files.
-
- ********************** COPYRIGHT NOTICE *************************
- This program and associated documentation are copyright 1984
- by Steven E. Margison. Permission is given to CompuServe members
- to download and use VPRINT.BIN and VPRINT.DOC as desired,
- provided no sale or profit results from such use, and provided
- all copyright notices remain intact. Right of sale of this
- program is reserved by the copyright owner.
- *****************************************************************
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 4
- **************************************************
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-