Printer Control Codes Examples
Following are two examples using printer control codes
with the IBM Personal Computer BASIC. To send data
directly to the printer using IBM Personal Computer
BASIC, you use the command LPRINT. You use the
label CHR$ followed by the ASCII decimal value in
parentheses to indicate the data you want sent to the
printer. Therefore, to send a printer control code to the
printer, you use LPRINT CHR&(X), where X is the
ASCII value of the control code.
In order to try the examples, first start BASIC. Your
IBM BASIC manual describes how to start BASIC.
Example 1.
This is an example of a printer instruction used to print
in the Double Width print mode.
1
Type:LPRINT CHR$(14);"IBM Personal
Computer"
2
Press Enter (+-1 ).
3
Your printer will print:
IBM
PE2'...--s.CJon.a.l
c:::
c )
fTl
P
Ll
t.
E2''''
Graphics Printer 1-27
Need help?
Do you have a question about the Personal Computer AT and is the answer not in the manual?