Programming 3 – 9
Programming the printer
For each printing feature explained in this chapter, three different forms
of each code are listed as follows:
ASCII Decimal Hexadecimal
ESC 1 27 49 1B 31
Standard abbreviation Standard presentation Hexadecimal code used by
in ASCII-used for of Decimal Code. A some software packages to
reference variation of the same enter printing commands.
command is A variation of the same
CHR$(27);CHR$(49) command is CHR$(&H1B);
CHR$(&H31)
Carriage return and line feed
ASCII Decimal Hexadecimal
CR 13 0D
Carriage return tells the printer to print the line of data and returns the
print head to the left side of the page. IBM PC adds a line feed after a
carriage return unless 128 is added to the command. If you send a
CHR$(141), therefore the result is just a carriage return; for IBM SET 1
only.
ASCII Decimal Hexadecimal
LF10 0A
VT 11 0B
Line feed advances the paper one line; line spacing is 1/6 inch unless it
is reset.