Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In the good old days of Commodore (64 and 128), the command to type to load the first program off a disk was:

LOAD "*",8,1

Where I take it that "*" was probably a wild card that would just effectively give all the contents of the disk to LOAD which would then successfully load whatever happened to be the first loadable (i.e. executable) item on the disk.

But what are the other two parameters for?

share|improve this question
add comment

migrated from stackoverflow.com Aug 4 '11 at 9:43

This question came from our site for professional and enthusiast programmers.

3 Answers

up vote 9 down vote accepted

LOAD "*",8,1

The general syntax is:

LOAD ["<filename>"[, <device number>[, <secondary number>]]]
  • The filename * means the first file on the the disk, as you mentioned in your question.

  • The first number parameter is a device number. 8 is the device number for the first disk drive. From the Wikipedia article on Commodore DOS:

By convention, the first disk drive unit on a system has device number 8, the second drive, if present, 9, etc., up to a maximum of 15

This seems to come from the IEEE-488 bus, which the Commodore PET used.

  • The second number parameter, in this case 1, means to load the stored program into memory, starting at the memory location specified by the first two bytes in the file you are loading. This is generally used for machine language programs. 0, by contrast, is the default value, and would load the stored program to $0801 (the beginning of BASIC memory)

A full description is available at the C64 wiki page for the LOAD command.

share|improve this answer
add comment

The 8 is the disk drive. So kinda like C:. The 1, I believe, is the communication channel. It's kinda like a PORT in the TCP sense.

share|improve this answer
add comment

Wikipedia has some info on Commodore DOS.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.