The following article was printed in January 1979 of the magazine „Microcomputing".
Create banner pages with ASCII characters
Philip Tubb
ALF Products, Inc.
128 S. Taft2
Denver CO 80228

Say It with a Banner


It's going to be a banner year, and here's the first entry. We'll keep you posted.

Computers have long been used to generate posters. Most computer hobbyists have seen various calendars printed by computers, and (usually in violation of copyright laws) posters of Snoopy, Star Trek characters and, recently, Star Wars characters. Another form of computer poster that has long been popular is the character-string poster, or "banner."
The program presented here (Program A) is an 8080 assembly-language program to print character-string posters. Four sets of data are available to print in different character styles. The most useful character set (in my opinion) is the Franklin Gothic Wide (FGW) data. This data was obtained by a simple brute-force method: The character set was projected using an opaque projector and traced onto paper already printed up with indications of pica-type spaces.
With great restraint, nonsymmetries present in the character set were retained in the final data, resulting in realistic reproductions of the FGW characters. They are bold characters with very heavy lines and are easily read from a distance. They do, however, take a great deal of time to print (especially on ten-character-per-second terminals).
Another popular character set is Old English. That data was created by Bob Purser by sheer artistic interpretation of Old English characters. As usual in Old English, many characters are not recognizable except by context.
The remaining two character sets are Football Scoreboard and Football Scoreboard Italic, which were my first character sets. They were originally designed for a special poster program that used a different form of data. (An object listing of the Football Scoreboard data is presented in Program B.) The characters consist of an 8 x 8 dot matrix using the six types of dots shown in Fig. 1.
The first inclination in poster programs is to use a standard 5 x 7 or 7 x 9 dot matrix. Although this is fine for printing very small letters with overlapping dots (as on a CRT or a dotmatrix printer), a first attempt will reveal that it is quite poor for poster printing.
Having seen such attempts, I began by solving the corner and diagonal line problems with my six dot types. Using a chessboard (8 x 8, remember?) and several scraps of paper (blank, filled-in and four diagonally half filled-ins), I designed the characters. Each dot is represented by three lines of characters, five characters wide. The italic version was (quite obviously) created by moving each successive dot down by one line; the result is marginally passable.
All four character sets include the characters A through Z (uppercase) and space. Old English also includes lowercase a through z. Franklin Gothic Wide includes through 9, ?, $, !, &, ', comma, semicolon, hyphen, period, colon, and both opening and closing quotes. (The quotes are given in ASCII as open and closed square brackets.) The Football Scoreboard sets include 1 through 9, period, comma, semicolon, ?, !, colon, ", ', (, ) and -.
Now for a look at the program. Line 200 sets the stack pointer; this may have to be changed if you don't have RAM at the very highest addresses. The program begins with a standard universal line-input routine. It allows a full line to be input, and has various facilities for editing. ("Sub" is used for Control Z, return, line feed. The Control Z causes the return to be ignored, and line feed is always ignored. This allows you to go to the next line on your terminal to continue input when you reach the end of your carriage. The other features should be reasonably obvious.)
Three routines, which should be tailored to your system, are called. INC (INput Character) begins at line 2500; it reads one character from the keyboard into the A register. No other registers are modified. INCLR (INput CLeaR) clears any input latches or buffers, thus avoiding trouble with keys pressed before the program is run or during printing. It modifies only the Aregister; source code is found inside INC at line 2530. OUTC (OUTput Character) is found at line 2550; the character in the A register is printed on the terminal; no registers are modified.
Also in this general area at the end of the program are two buffers that must be in RAM. "SPACE" is a one-byte tempo-rary, and "BUF" is the lineinput buffer, randomly selected as 72. Since the data follows at 006'000 (600 hex), the buffer could not be much larger if located at its current address. The buffer is easily moved since its location is defined in line 2490 (INBUF). The length of the buffer is also easily changed (both of these parameters can be changed without reassembling the program) since it is defined in line 2480 (INLEN).
The general line-input routine ends at line 870, whereupon the poster-generation program begins. First, a check is made to see if all input characters exist in the character set. This is to avoid the possibility of trying to print a poster for hours, then discovering an impossible request. If any Illegal characters are found, they are printed, the line is ignored and the input routine is run again. The character set data begins with a list of characters present in the set (all with the most significant bit being zero) followed by a zero. This information is used to determine whether or not each input character exists.
Next, each character is printed. The remaining data in the character set table contains the information used to print each letter or symbol. The first byte is the actual character (in ASCII, which is "American Standard Code for Information Interchange," not ASC II or ASC 2 as some would have you believe). The next byte is the number of data bytes following (for the character specified by the first byte).
The next byte specifies the number of "background" characters to print. This is usually space, as defined (and changeable) in line 2460. The next byte specifies the number of "foreground" characters to print; this is usually @, as defined (and changeable) in line 2470. These two alternate: background, foreground, background, etc. When the number of characters printed equals 72 (or, in the program, is greater than 71), a return line feed is printed; and the next data byte represents the number of background characters to be printed even if the most recent data was for background.
To create different effects, the background and foreground characters may be exchanged or set to other characters. If "BACK" is @ and "FORE" is space, an "inverse video" poster is created.
Note that spaces are not printed immediately. When a space is to be printed (by the OUTP routine at line 2220), a counter (SPACE) is incremented. When a non-space character (other than return) is to be printed, first spaces are printed until the counter is zero. When return line feed is printed, the counter is set to zero. This causes trailing spaces to be ignored, resulting in much faster printing except on inverse-video posters.
To print each character, the data is scanned until the desired data is found. At the end of the table, a zero is stored. If this is encountered, something has gone wrong and the character is skipped. (Since this possibility has already been checked right after line input, it should not occur. However, errors are easily made between the two halves of the table, and this check simplifies testing.)
Once the correct data is found, four lines of background are printed(adjustable by changing "GAP" at line 2450). This is the space between letters and the space preceding the first letter. Another gap is printed after the last letter. Note that for the italic character set, GAP should be changed to one since an inherent gap is present. (On inverse-video posters, a space should be used as the first and last character.)
You may wish to replace the jump at line 2170 with a jump to itself to avoid having a colon printed by the input routine at the end of your poster.
The character set data is not included in the source code. (With the object for the program, the data for FGW takes up just under 8K.) It has been added to our object tapes by special programs. It is doubtful that anyone would wish to type this amount of data in manually. Paper tapes are available from ALF Products (128 South Taft; Denver, CO 80228). Source code, $3.50. Object code plus data set tape: Gothic, $3.50; Scoreboard, $2.50; Old English, $3.50; Scoreboard Italic, $3.00. Add $1 per order for postage.

Program listing. Not yet completed!

Scanned von Werner Cirsovius
February 2014
© Microcomputing (kilobaud)