Commodore VIC-20 Disk Directory List Command
This article explains the specific BASIC command sequence required to view file listings on a disk drive connected to the Commodore VIC-20. Unlike modern systems, the VIC-20 does not use a simple directory command, requiring users to load the disk catalog as a program file instead. Readers will learn the exact syntax needed to access the 1540 or 1541 drive directory and display the contents on the screen.
Understanding the VIC-20 Disk System
The Commodore VIC-20 typically paired with the 1540 floppy disk drive, though it maintained compatibility with the later 1541 model used by the Commodore 64. These drives operated under Commodore DOS, which managed file storage differently than contemporary operating systems. There was no dedicated command within the VIC-20βs built-in BASIC V2 to simply print a list of files. Instead, the disk directory was treated as a special file residing on the disk itself.
The Directory Command Sequence
To list the contents of a disk, the user must instruct the computer to load the directory file into memory. This is achieved using the LOAD command targeting the special filename β$β. The standard device number for the disk drive is 8. Once the directory data is loaded into RAM, it must be displayed using the LIST command. It is crucial not to execute the RUN command, as the directory data is formatted as a BASIC program but is not intended to be executed.
The specific command sequence is as follows:
- Type
LOAD"$",8and press Return. - Wait for the βREADY.β message to appear.
- Type
LISTand press Return.
Upon executing the LIST command, the screen will display the disk ID, the number of blocks free, and the names of all files stored on the disk along with their file types and block sizes.
Alternative Methods and Cartridges
While the LOAD method is the standard approach for unexpanded VIC-20
systems, many users enhanced their experience with expansion cartridges.
Products like the Final Cartridge or various DOS wedges modified the
BASIC interpreter to allow for a simplified directory command, often
mapped to a function key or a short abbreviation like DIR.
However, without such hardware additions, the LOAD"$",8
method remains the definitive way to view disk contents on the original
hardware.
Conclusion
Mastering the directory listing process is essential for any VIC-20 enthusiast managing software on physical media. By treating the disk catalog as a loadable file, users can efficiently manage their library without needing additional software or hardware expansions. This fundamental skill ensures compatibility across all standard Commodore disk drives connected to the VIC-20.