DMP 205 (260-2904) Using Control Codes Faxback Doc. # 5730 The following example uses BASIC'S CHR$() function to send a multiple code sequence to the printer. Set up the printer and enter BASIC in the normal way. then type and run the following program: 10 LPRINT "HALF LINE; CHR$(27);"J";CHR$(15);' Performs 15/180 inch line feed 20 LPRINT "FEEDING" Roll the paper forward and look at the result. the word FEEDING is printed just below HALF LINE with half line spacing, because the codes CHR$(27);"J";CHR$(15) tell the printer to change the forward line feed to 15/180 inch (1/12 inch), which is half of the normal distance. NOTE: Results vary, depending on the LF or CR function switch setting in your printer. If you activated the LF command, this could also cause a difference result. The "Control Sequence Summary" table that follow show the control code sequences grouped according to function. These tables list the name and mnemonic for each code sequence. Examples of some mnemonics are: -------------------------------------------------------------------------- MNEMONIC DEFINITION -------------------------------------------------------------------------- n indicates a number NUL null code HT horizontal tab LF line feed VT vertical tab FF form feed CR carriage return SO shift out SI shift in DC device control code CAN cancel ESC escape SP space -------------------------------------------------------------------------- Where a character appears by itself, that character, or its appropriate code, is a part of the control code sequence. SELECTING A FONT SET The following command selects an LQ font when the LQ mode is selected by the ESC x n command 10 LPRINT CHR$(27);"x";CHR$(1);:'Selects the LQ mode 20 LPRINT CHR$(27);"k";CHR$(2);:'Selects Courier Font 30 LPRINT "Courier Font Printing "; 40 LPRINT CHR$(27);"k";CHR$(1);:'Selects Sans Serif Font 50 LPRINT "Sans Serif Font Printing"; (smc-12/07/93)