Ad Space — Top Banner

?ILLEGAL DEVICE NUMBER ERROR

Commodore Commodore 64

Severity: Minor

What Does This Error Mean?

?ILLEGAL DEVICE NUMBER ERROR means you specified a device number that the C64 does not support. Valid device numbers are 0-30. Device 8 is the disk drive, device 1 is the datasette, device 4 is the printer.

Affected Models

  • Commodore 64
  • Commodore 64C
  • Commodore 128 (C64 mode)
  • VICE emulator (C64)

Common Causes

  • Device number out of range (above 30)
  • Using device 0 where it is not valid
  • Typo in the device number
  • Trying to access a device that does not exist on the system

How to Fix It

  1. Check the device number in your LOAD, SAVE, or OPEN command.

    Device 1 = Datasette (tape). Device 4 = Printer. Device 8 = First disk drive. Device 9 = Second disk drive.

  2. Make sure the device number is between 0 and 30.

    Numbers above 30 are not valid on the C64.

  3. If unsure, use device 8 for disk or 1 for tape.

    LOAD "*",8 loads from disk. LOAD "*",1 loads from tape.

Frequently Asked Questions

Why does the C64 use numbers instead of drive letters?

The C64 predates the IBM PC's drive letter convention. Commodore used the IEC serial bus with numbered devices — a common approach in the late 1970s.

Can I change a disk drive's device number?

Yes. The 1541 drive has DIP switches or a solder jumper on the circuit board to change from device 8 to 9, 10, or 11.