Basic ProgrammingThe LPRINT command in BASIC makes output go to the printer rather than to thTo send text to the printer, simply enclose the words in double quotes:LPRINT "Aline of text"The statement above prints the line of text, and then moves the printing positbeginning of the next line. If you do not want this automatic carriage return andput a semicolon (;) after the data:LPRINT "A line of text";LPRINT"... and this text is on the same line"Keep in mind, however, that BASIC automatically adds a carriage return and linethe 80th character in a line. If necessary, you can use a WIDTH statement to ch;For serial printersIf you are using your printer with a serial interface, you have to be sure to redirtfrom the computer to the serial port you are using, either COM1: or COM2:, raththe default port, LPT1:. There are two ways to do this:1 . If you are using DOS, you can use the MODE command. Then, use thecommand in your BASIC programs, just as we do in our examples.2. You can also redirect output to COM1: or COM2: from within BASIC, by openinas a file and printing your data to that file. If you want to run any of our sample pyou will need to modify them. At the beginning of your program, include onestatements:OPEN "COM1:9600,N,8,1" AS #1orOPEN "COM2:9600,N,8,1" AS #1Then, to print data, use the PRINT# 1 command, being sure to include a commathe # 1 and the data:PRINT#1, "A line of text"Like the PRINT command, PRINT# 1 automatically moves the print position to theunless you use a semicolon (;) after the data.When you send an LPRINT statement, the text between the quotation marks is сto a string of numbers, which are then processed by the printer and output apatterns that make up the individual characters. Each character is assigned avalue according to the American Standard Code for Information Interchange