PSB No:
Page: 14 of 14
C l h n1 n2 d, . . . dk is the command for printing control codes as data where nl and n2 are variables and d, . ..d,representthedat&atistobeprintedas characbrs. The variables nl and n2 tell the printer Yhe next xx ASCII codes are to be interpreted as characters instead of control codes”. Thii command is used primarily to print displayable characters such as ASCII values 0 through 31 in Registered Tables 1 through 9 which are normally used as control codes (LF, FF, ESC, etc.)
TO determine the values for nl and n2 perform the following steps.
1. Determine how many ASCII codes will be sent sequentially immediately following nl and n2
2 Using long division, divide the quantity of ASCII codes that will be sent sequentially immediately following nl and n2 by 255.
3.The remainder in the quotient is the value for n1.
4.The whoie number in the quotient is the value for n2
EXAMPLE
1.The symbols for the different suits of a card deck (hearts, diamonds, clubs, and spades - V’, +, 4, and 4) are to be printed. These are each separate
ASCII codes (ASCII codes 2 3.4, and 5 when using the PC437 Character table).
24dividedby255= 0 with a remainder of 4.
3.nl =4
4.n2=0
In the Basic programming language, the command would look like this.
Thii command, as listed in the line above, will cause the printer to print the symbols for the different suits of a card deck (hearts, diamonds, clubs, and spades V’, +, 4, and 4). Another example of using the ESC ( * command is illustrated in the explanation of the ESC ( t (Assign Character Table) command.