PSB No: P-0082
Page:
11 of 14
page contains a print sample of the Registered Tables available in printers sold in the
U.S. In order to print the first 31 characters in Tables 1 through 9, the ESC ( ^
command must be sent.
Listed below is a Basic language program and an explanation of the program that will
print the output illustrated on page 13 of this bulletin.
10 FOR Z=1 TO 6
20
READ Y,Y$
30 LPRINT “Table”;Y;” “;Y$
40
LPRINT CHR$(27);“(t”;CHR$(3);CHR$(0);CHR$(0);CHR$(Y);CHR$(0);
50
LPRINT CHR$(27);“t”;CHR$(0)
60
IF Y=0 THEN GOTO 100
70
LPRINT CHR$(27);“(^“;CHR$(31);CHR$(0);
80
FOR X=1 TO 255:LPRlNT CHR$(X);:NEXT X
90
GOTO 120
100 FOR X=33 TO 126:LPRINT CHR$(X);:NEXT X
110 FOR X=161 TO 254:LPRlNT CHR$(X);:NEXT X
120 LPRINT CHR$(10):LPRINT CHR$(10)
130 NEXT Z
140 DATA 0, Italic, 1, PC437 (US),3,PC850 (International),7,PC860 (Portugal)
150 DATA 8, PC863 (Canada-French),9,PC865 (Norway)
Program Description
10
20
30
40
50
60
Begin loop to print the 6 Registered Tables
Read Registered Table number and Table Name
Print Registered Table number and Table Name
Send the Assign Character Table command to the printer assigning the
Registered Character Table read in line 20 to Selectable Character Table 0.
Send the Select Character Table command to the printer selecting Selectable
Table number 0 as the current Character Table for printing.
If the Registered Character Table number is 0, do not execute commands in lines
70 through 90. This is because the Italic Character Table duplicates control
codes and non-displayable characters in ASCII values 127 through 160. Program
lines 100 and 110 prevent the attempted printing of this range of ASCII values.
Note: tines 70 through 90 will execute ONLY if the Registered Character Table to be
printed is NOT table number 0. Refer to the conditional command in line 60.
70
If the Registered Character Table number is not 0, send the Print Data as
Characters command to the printer. Specifically, this command, as listed, tells
the printer to print the next 31 bytes as data, not control codes.