Commodore MPS 1000 — Commodore MPS 1000 Dot Matrix Printer User's Manual PDF (EN)

do is turn on your computer and type in the programs exactly as they appear in this manual. If you have any questions, see your Commodore Computer User's Guide. Although all the example programs are in BASIC, you can of course change them to any programming language that you prefer to use. Simply follow the instructions in the manual for your programming language. The MPS 1000 and Commodore BASIC In order to send any information to the printer, you must first open a file for it. A sample statement for opening a file is: 10 OPENl,4 The 1 in the line above is the file number, and the 4 is the device number.

You can use any number from 1to127 for the file number, for file numbers 128 to 255 the computer will insert a LF (linefeed) after each CR (carriage return). The device number should be 4 unless you have two printers. If you have two printers connected to your computer, you will sometimes use another device number. See Appendix D for further information. After you have opened a file, you send information to the printer with a PRINT# statement, such as the sample below: 20 PRINT#l, "THE PRINTER PRINTS THIS" The PRINT# statement is much like the PRINT statement in BASIC except that it must be followed by the same number of the file that has been OPENed and a comma.

Anything inside quotation marks after that will be sent to the printer and printed. As you will see in programs later in this chapter, you can also send instructions to the printer with a PRINT# statement. After you have finished with a file, you should close it using the format below: 30 CLOSE! All you need for this statement is the word CLOSE and the file num- ber. If you wish, type in and run the three lines above, which form a program. Each time you want to see the results of a program, type RUN and then press RETURN. 36