The data dump on the previous page was made while writing an earlier version of this appendix. By comparing the column of characters at the right with the printout of hex codes, you can see that the capital A (for Appendix) in the third row, was printed as 41. You can use the table of character codes (Appendix B) to find out what character corresponds to each code.

If you look at the first character of the dump, you can see that the ESC character appears in hex as lB, and in the character column as a dot. To find the command, look at the next character, 40 hex (@), and refer to the numerical list of commands in Appendix A.

In this way you can quickly determine that prior to printing, the word processor sent seven commands to set up the printer followed by a BEL character to sound the beeper.

Command

Function

ESC @

Initialize printer

ESC R 0

Select USA character set

ESC t l

Select Epson Character Graphics

ESC 6

Printable code expansion

DC2

Cancel

condensed mode

ESC P

Select

pica

ESC p 0

Cancel proportional

BEL

Sound

beeper

If you find codes in your data dump that you did not enter in your program or codes you did not expect your application program to send, your computer may be changing the codes before sending them to the printer.

Data dump mode can be turned off by turning off the printer; it is also cancelled by an INIT signal from the computer.

IBM PC BASIC Solutions

IBM PC BASIC inserts a carriage return and line feed (CR-LF) after each 80 characters you send it. It also adds a line feed to each carriage return included explicitly in an LPRINT statement. Use the BASIC statement WIDTH LPRINT 255 to remove this problem. The 255 is a special number that prevents the computer system from inserting a CR-LF into the line unless there is one in your program.

C-4

Problem Solving and Maintenance