Ask Mr. Tech

Ask Mr. Tech # 1
II Alive Volume 1 Number 1
March / April 1993

QUESTION; I’m trying to use a genealogical program with earlier Apple models (II+, lie, and lie) using DOS 3.3. In order to adapt this program to the IIGS, the program requires that each disk be processed through an “Advanced Configuration Routine.” This routine asks for ASCII Decimal codes for the printer. I’ve listed the codes that I need for my IIGS and Image Writer II. Can you explain what these codes are and what they do?

ANSWER: As verbal creatures, we humans often forget the true nature of computers as number crunching machines. It’s easy to anthropomorphize our computers when we see a prompt like “Are you sure you want to do this?” We want to believe that somewhere, deep in the machine, is something that understands what this sentence means and that truly cares about whether we accidentally overwrite our precious data. In reality, the letters, numerals, and punctuation that form the verbal communications of any particular program are nothing more than strings of numbers arranged in a pattern by the computer.

The most widely used code to assign numbers to characters for computers is called ASCII (American Standard Code for Information Interchange, pronounced ASK-ee). One byte of computer information can range in value from 0 to 255. If we assign one number to each of the 26 letters of our alphabet, it would seem that we have a lot of room left over for other symbols. Actually, ASCII assigns 26 codes for the upper-case alphabet, plus 26 more codes for their lower-case equivalents, plus ten codes for the numerals, plus thirty-two codes for punctuation and symbols, and one number for the space bar. Even this list only accounts for 95 of the possible numbers in the ASCII code. As it turns out, the first 32 numbers of the ASCII code are reserved for standard control codes (more on this later), and the number 127 is reserved for a delete code.

Still, this only accounts for 128 of the 255 possible ASCII codes. The upper 128 codes are where ASCII becomes non-standard. Unfortunately, different computer manufacturers have chosen to interpret these codes in different ways. The IBM computers reserve this space for special display characters and symbols to allow creating graphics on the text screen. (Telecommunications users will know these as “ANSI graphics.”) Apple computers, on the other hand, just duplicate the first 127 ASCll codes but interpret them in different ways-as flashing or inverse, for example. Newer Apple II computers allow for a mode to display Mouse Text characters for some of these “alternate” ASCII codes. A chart of the ASCII codes and the corresponding characters is available in Appendix C of your Image Writer II Owners Guide.

Some peripherals, such as printers, use sequences of certain ASCII codes to allow them to shift into special modes. Actions such as turning bold on or off happen because a program sends the proper sequence of ASCII codes to the printer. Usually, the so-called “control codes” are used for these commands. Since these control codes don’t correspond to any printable character, computers, printers, and other devices use them for other purposes. For example, ASCII 13 (Control-M) is a carriage return- the same as pressing the Return key (try it). ASCII 12 (Control-L) is a form feed, and will cause a printer to advance to the top of the next sheet of paper. ASCII 19 (Control- S) and ASCII 17 (Control-Q) mean “Stop sending data” and “Continue sending data” and are often used with modems.

Most printers are designed to watch for a particular control code that will tell them that a command is about to be sent. This control code is called a “lead-in” character and is usually represented by ASCII code number 27, ESC (the equivalent of the Escape key). The printer will print all of the characters sent to it on the paper, unless it encounters an Escape code, in which case it will interpret the following characters as a command to do something special instead of printing them.

Escape codes for the Image Writer II printer are listed in Appendix B of the Owner’s Guide. The codes that you are looking for to set up your program are:

Compressed printing on (17 cpi):
Compressed printing off:
Elite printing on (12 cpi)
Elite printing off
Bold printing on:
Bold printing off:
27 81 (Escape Q)
27 78 (Escape N)
27 69 (Escape E)
27 78 (Escape N)
27 33 (Escape !)
27 34 (Escape”‘)

Your genealogy program is not the only program that can use ASCII codes. AppleWorks also has the capability of customizing your printer configuration to take advantage of ASCII command sequences that your printer recognizes. With a manual of almost any printers escape codes you can set up a “Custom Printer” to take advantage of that printer’s special features.

Note: All Tech Questions are answered either by Editor Jerry Kindall or by Bill Carver, the Quality Computers Technician

Please follow and like us:
error

About the Author

Jerry Kindall

Jerry Kindall was Quality Computers' technical writer and served as II Alive's Editor in Chief from its inception through mid-1995. He is currently a contract programmer writer at a certain Large Software Company in the Seattle area. He and his wife breed and show Glen of Imaal Terriers.