this post was submitted on 16 Jan 2025
72 points (98.6% liked)

Ask Lemmy

27480 readers
1536 users here now

A Fediverse community for open-ended, thought provoking questions


Rules: (interactive)


1) Be nice and; have funDoxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them


2) All posts must end with a '?'This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?


3) No spamPlease do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.


4) NSFW is okay, within reasonJust remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either !asklemmyafterdark@lemmy.world or !asklemmynsfw@lemmynsfw.com. NSFW comments should be restricted to posts tagged [NSFW].


5) This is not a support community.
It is not a place for 'how do I?', type questions. If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email info@lemmy.world. For other questions check our partnered communities list, or use the search function.


6) No US Politics.
Please don't post about current US Politics. If you need to do this, try !politicaldiscussion@lemmy.world or !askusa@discuss.online


Reminder: The terms of service apply here too.

Partnered Communities:

Tech Support

No Stupid Questions

You Should Know

Reddit

Jokes

Ask Ouija


Logo design credit goes to: tubbadu


founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] Zombiepirate@lemmy.world 34 points 22 hours ago* (last edited 22 hours ago) (2 children)

Loading a program from disk on the Commodore 64

LOAD"*",8,1

I haven't loaded a game on that system since I was probably 10 or so, but I'll never forget the command.

I memorized it as L-O-A-D shift-2 star shift-2 comma eight comma one.

[–] palordrolap@fedia.io 31 points 22 hours ago (1 children)

Fun fact: There's a common misconception that this would load the first program on a disk, but it actually loads the most recently loaded program from the disk. If the disk is detected as being freshly inserted (as determined by the 2-character identifier in the disk's directory header), that defaulted to the first program in the disk's directory.

Admittedly, most of the time that makes it a distinction without a difference, but if you'd loaded something else from the same disk first, and you then wanted to load the first in the directory, you would need to use LOAD":*",8,1 instead.

That extra colon is vaguely related to the colon in C:\ on Windows computers. A lone colon was taken as an abbreviation of 0:, because in Commodore DOS(es) the drive "letters" were numbers. Dual slot drives were possible and then the two slots were 0: and 1:.

"So what's the 8 for in the LOAD command?" you might ask; "Isn't that the drive "letter" "? No, that's the device number. Note that drives on the 8-bit Commodores were always external. The 8 was more like the drive's "IP address" on the serial bus.

"What about the ,1?" That meant to LOAD the program at the memory address specified by the program's header on the disk. Without that, the computer would ignore the header and try to load into BASIC memory.

The neat part about loading at any address meant that it could overwrite parts of zero-page where the computer kept pointers to important internal functions. Overwrite the right one of those and the computer could be convinced to jump to a routine in the program that had just loaded without the user needing to type RUN.

So, if you wanted to be i) certain of loading the first program in the directory of ii) the disk in the second slot of iii) a dual-slot drive on the serial bus identifying as device/address 9, and then iv) have the program load at its preferred memory location, you'd need to use LOAD"1:*",9,1

The number of people who found the need to type that command in earnest, even back in the heyday of Commodore, probably numbers in the low tens, but there it is.

How's that for an obscure info dump?

[–] littlewonder@lemmy.world 6 points 12 hours ago (1 children)

You're the person I enjoy talking with at parties.

[–] oozynozh@lemm.ee 2 points 11 hours ago

you little wonder, you

[–] neidu3@sh.itjust.works 5 points 21 hours ago (1 children)

I choose to believe that the * means everything... but what does the 8,1 signify?

[–] Zombiepirate@lemmy.world 6 points 17 hours ago

There's another user who replied to me who answered much better than I could.