[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]

The OPEN statement is somewhat different for each device. The parameters in the OPEN statement are shown in the table below for each device.

TABLE of OPEN Statement Parameters:

   FORMAT: OPEN file#, device#, number, string
DEVICE DEVICE# NUMBER STRING
CASSETTE 1 0 = Input
1 = Output
2 = Output with EOT
File Name
MODEM 2 0 Control Registers
SCREEN 3 0,1
PRINTER 4 or 5 0 = Upper/Graphics
7 = Upper/Lower Case
Text Is PRINTed
DISK 8 to 11 2-14 = Data Channel
15 = Command Channel
Drive #, File Name, File Type, Read/Write Command

OUTPUT TO PRINTER

The printer is an output device similar to the screen. Your main concern when sending output to the printer is to create a format that is easy on the eyes. Your tools here include reversed, double-width, capital and lower case letters, as well as dot-programmable graphics.

The SPC function works for the printer in the same way it works for the screen. However, the TAB function does not work correctly on the printer, because it calculates the current position on the line based on the cursor's position on the screen, not on the paper.

The OPEN statement for the printer creates the channel for communication. It also specifies which character set will be used, either upper case with graphics or upper and lower case.

EXAMPLES of OPEN Statement for Printer:

   OPEN 1,4: REM UPPER CASE/GRAPHICS
   OPEN 1,4,7: REM UPPER AND LOWER CASE

[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]
This page has been created by Sami Rautiainen.
Read the small print. Last updated May 20, 1998.