LP 1 (260-1152) Control Codes Faxback Doc. # 5655 You can instruct the Printer to execute a Line Feed/Carriage Return and a Top of Form command by using the following control codes as arguments in the CHR$ function. FUNCTION CONTROL CODES (DECIMAL) Line Feed/Carriage Return 10 or 13 Top of form 11 or 12 A Line Feed/Carriage Return command will be ignored if it is the first or last item in an LPRINT list. But a Top of Form command should always be the first item in the LPRINT list. Any preceding items will be ignored. Examples: LPRINT CHR$(11); "TOP OF FORM" LPRINT "LINE ONE";CHR$(10);"LINE TWO";CHR$(10);"LINE THREE" SPECIAL PROGRAMMING NOTE: When the Print Head reaches it mechanical stop point at the right edge of the platen, a forced Line Feed/Carriage Return occurs. Any data remaining in the 132-character print buffer will be lost. For example, LPRINT 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18 will cause the Computer to print the numbers on a single line until the Print Head reaches its mechanical stop point. It will then execute a Line Feed/Carriage Return and any characters remaining in the print buffer will be lost. The maximum number of characters per line depends on how you've set the print density control (on the rear of the Line Printer next to the Serial Plate). If the density is set to maximum to maximum, the Print Head will never reach its mechanical stop point. The Line Printer will simply print out the entire contents of the 132-character buffer, execute an automatic Line Feed/Carriage Return and continue if more data is sent to the buffer. No data will be lost. However, the characters are rather small with the print density set to maximum. A more readable setting will allow around 100 characters (includ- ing blanks) to be printed before a mechanically forced Line Feed/Carriage Return occurs. To avoid losing data due to a mechanically forced Line Feed/Carriage Return: 1. Determine the maximum number of characters that can be printed using the desired print density. 2. Don't print out lines whose lengths exceed this number. Also watch out for trailing commas or semi-colons at the end of an LPRINT list; these may cause you to lose data on subsequent LPRINT statements. 3. If you want to use a long LPRINT list, then embed carriage returns in the list to force a carriage return without losing data. Example: LPRINT A,B,C,D,E;CHR$(10);F,G,H,I,J;CHR$(10);K,L,M,N,O will print out three lines with five items per line. (dtc-08/04/93)