It is important to use OPEN before using any of the following BASIC commands: CLOSE, CMD, GET#, INPUT# and PRINT#. Furthermore, the OPEN command has to use the right file in the right device with the right logical filenumber with values between 1 until 255 (reasonably below 128).

On the C64 each device has got a separate device number, and in the OPEN command this number is used to identify the right peripheral device. If the device number is omitted, the first device — the datasette — will be used.

The use of the secondary address will vary from device to device and specifies what kind of device operation is to be executed, e.g. reading or writing data files or formatting a disk. By omitting the secondary number, the secondary number is 0 and a data file read will be used.

Device number 0 | keyboard (not counted as first device!)

Device number 1 | datasette | secondary number 0 = for loading; 1 = for writing; 2 = for writing with file end (EOT - End Of Tape)

↑Channel 0 and 1 are officially dedicated to LOAD and SAVE. They differ from normal channels in that the file type is always PRG and the mode is "read" for channel 0 and "write" for channel 1. With this convention the KERNAL does not need to add ",p,r" or ",p,w" to the filename. If this behavior suits your program, nothing stops you to use channel 0 and 1 in your own programs.