Classic Computer Magazine Archive ANTIC VOL. 3, NO. 11 / MARCH 1985


Now-print those special Atari characters

With Custom Print you can make complete printouts of your programs or text files-printing any character in the Atari special set.  The BASIC program can also load a custom character set file for later printing.  Custom Print works on all Atari computers with 32K, BASIC, and a disk drive.  It is compatible with the Epson, Gemini or, with the modification listing, the NEC or Prowriter printer correctly typed in that impossible machine language string that Antic insisted on publishing.  But when you tried to LIST the program to your printer, it reached the line with the crazy characters and began a continuous form feed until you shut off the power.  So, how do you make your own printout of "Biffdrop"?
  Custom Print uses your printer's graphics capabilities to print an ATASCII file.  (This means your program must have been previously LISTed to disk.)
  Antic Disk subscribers have a pair of bonus character set samples.  The files are titled COMPUTER.SET and STYLISH.SET.

Type in listing 1, checking it with TYPO II before you RUN it.  If you have a NEC or Prowriter printer, also type in listing 2. This file should be LISTed to disk.  Load the first listing, then ENTER listing 2.  Save this merged file before RUNning it. (Note: The original program contained a rather long machine language string which has since been changed to data statements for easier typing.  This will cause a slight initialization delay.  The more adventurous of you may wish to change this back.- ANTIC ED)

The program will ask if you want to print with a custom character set (c-set), Atari's c-set, or the last set loaded. If you load a c-set you will be asked for the disk drive number 1-4 that your c-set file is on.  A directory for that disk will be displayed on the screen.
  You are then prompted to input the filename of the c-set to load.  Type the name only, do not type the device D:.  If the file selected is not there the error is flagged and the filename is requested again.  To refresh your memory, or to get a directory of a different disk (and different drive if desired) just press [RETURN] here to go back to the drive number prompt.
  Once a good c-set filename is inputted, all of Atari's characters are printed to the screen.  The new c-set is displayed as it is loaded.  This only takes a few seconds, so don't blink.  The routine even checks for valid c-set files.  A c-set for the Atari is 1024 bytes long.  If the file loaded is not exactly that length, an error will be flagged and the program will restart.  InstEdit by Sheldon Leemon is the best commercially available c-set editor in my book. (See our catalog in this issue.- ANTIC ED)
  The next prompt is for the drive number that the text file is on.  If you chose not to use a custom c-set, this will be the next input after bypassing the c-set loader routine.  Press the key for the desired disk drive number 1-4.  Again a directory of that disk is displayed on the screen.  You will then be requested to input the text filename again.  All the same options are available.

The file must be either a LISTed program file or a text file with a carriage return (character 155) imbedded every 255 characters.  Typically you will print LISTed BASIC programs.  I frequently use Custom Print with a simple BASIC text editor to create exotic title pages for my articles, or print fancy letters to friends.
  After a valid filename is given, you will be asked for the number of print characters per line.  NEC users have no options here.  The NEC has only one graphics dot density, which works out to the 60 characters per line print mode.  Gemini users have the option to print with 60, 120, or even a tight-packed 240 characters per print line.  This latter print density is just a bit tough on the eyes.  But since the Gemini supports a quad density dot graphics mode, I decided to implement it in the program.  Epson owners have only the first two options.  Modify listing 1 as follows:


  The 60 characters per line makes the most readable listings.  They are slightly oversized characters in comparison to the normal printer characters.  The 120 characters per line is quite readable too.  It is best for BASIC program listings, since BASIC allows a maximum of 120 characters per line.  Each program line will appear on one print line in the listing without wraparound.  Gemini owners may get a kick out of the 240 characters per line print mode, but it is very difficult to read.
  Custom Print then prompts you for vertical line spacing.  Option one is stacked" print.  This means that each line is printed just above the next, exactly as characters appear on the Atari screen.  This is ideal for printing out control-character graphics text files.  Some of my sysop friends (Bulletin Board System Operators) use the 120 character per line, stacked print mode for program listings.  Modifying their BBS programs as frequently as they do can eat up a lot of paper, but this print format is quite paper-efficient.  Option two selects single spaced print, which is most commonly used for program listings.

Next you are prompted for text positioning.  The first option selects centering of text.  I commonly use this option when making title pages.  Block left, the second option, is the most commonly used print style.  Block right is a bit unusual.  You might consider using this for listings you intend to put in a binder.
  The next step is title input.  If you do not want a title, just press [RETURN].  Next you will be asked if you wish to skip perforations.  If your answer is yes, the listing will be paginated without title or page numbering.  Suppressing perforation skipping allows you to print continuous labels from preformatted text files.  This is commonly used by sysops who keep extensive user group disk libraries.  If a title is input, it will be printed at the top of each page along with page number.  I usually use the title for the program name, revision number, and listing date.
  Finally you will be asked to double check your printer and disk drive to be sure all is ready.  Then press the [RETURN] key to begin printing.  Once started, if you change your mind for any reason, just press the [ESCAPE] key to abort the printing.  If a custom c-set was chosen, this c-set will be enabled as the file is printed.
  After the file is printed, or print aborted, you will be prompted to continue listing files or quit.  If you quit, the program will restore the memory it had previously reserved for custom c-set data.  This precludes the need of pressing [SYSTEM RESET] to recover the reserved RAM.

Custom Print uses the printer's dot addressable graphics capabilities to LIST your files.  The Machine Language program in PROG$ reads the currently installed c-set bit maps and translates them into a format that your printer can understand.  Other printers may be used with this program if the escape-control print codes are modified according to your printer's needs.
  Because Atari's characters are an 8x8 dot matrix, this program will not work on graphics printers with only a 5x7 dot matrix.  If you make modifications to listing 1 and your printouts have upside-down characters, then replace line 100 of the program with the line 100 for the NEC revision in listing 2. (NOTE: Antic urges all readers making modifications for printers not listed above to send those modifications to us so that we can pass them on to our readers -ANTIC ED).
  There is a limitation with the Atari printer handler that most people are not aware of.  You absolutely cannot send an ATASCII 155 to your printer.  The P: device always converts 155s (Atari's internal representation of carriage return) to ASCII 13.
  To get around this problem, the machine language string PROG$ looks for these 155s as it converts the bit maps for your printer.  If it finds any, they are changed to ATASCII 151s.  This bit map is different, but close enough that the character is still quite readable.  Using Atari's c-set, this problem occurs only with the upper case, inverse video letter "A".  Compare closely the printout of normal and inverse video "A" in the Atari c-set example to see the difference.  This is certainly better than having an unreadable character

This program is completely compatible with XL machines and does not need the Translator disk, but you may wish to use it because of another undocumented XL Operating System bug, Occasionally, a printout will pause for 35-40 seconds for no apparent reason and will then pick up right where it left off again, without dropping a single character.
  At first I thought it was a certain character combination (as Atari personnel explained it to me).  After checking into the problem further, I found that the pauses are entirely random.  It even happens occasionally when just listing a program with the printer's standard characters.  The problem occurs more often with Custom Print, because it sends 8 bytes of data for every printed character.  Be patient and your printout will always pick up right where it I left off.  The Translator will cure this timeout problem if you need that listing in a hurry.

MatthewjW Ratcliff is an electrical engineer in St. Louis, Missouri and a regular contributor to Antic.

NECFIX.LST Download / View