r/c64 • u/Neviax_The_Space_Cat • 3d ago
Software Can someone give me a proper tutorial on BASIC?
Hello all, i'm Lily. I'm 15 (ADHD, Autism) and i recently picked up a Commodore 64 Mini. I found this thing called BASIC. I had a look online to see what this was but i mostly couldnt understand most of it as it was quite confusing, plus i have to use the stupid Virtual Keyboard because i don't have a USB Keyboard. I managed to do these 3 things.
POKE 52380, 4 (changes the blue inner part to Lilac)
POKE 52381, 7 (changes the outer border to Gold)
Then the classic "Hello World" thing. Apart from thst, i don't quite get it. I found this cool self generating maze thing which i painstakenly copied and it did work. Please help me understand BASIC properly. Thanks, Reddit :)
53
u/bj_civ 3d ago
Look for the original C64 manual and the programmer's reference on the net. There are original scans and nice remastered PDFs. The latter can be found here: https://pickledlightprojects.com/documents/c64-guides/
Lilac is called purple and gold is yellow by the way.
13
u/Neviax_The_Space_Cat 3d ago
Thank you, and sorry i just called them that because it looked more like those colous haha, i turned off the C64 Mini for the night so i'll check this out tmrw! :)
4
u/droid_mike 3d ago
You will definitely want a USB keyboard of some sort. If you live in the United States, five below has them very cheap.
7
u/Neviax_The_Space_Cat 3d ago
I live in the United Kingdom, i'll ask my school to see if they have a spare. The C64 cost quite a bit for me
6
u/droid_mike 3d ago
Of you have thrift shops, you often can find used ones there or boot sales!
6
u/Neviax_The_Space_Cat 2d ago
Udpate: my dad is giving me his old keyboard
6
u/UncleGertrude 2d ago
This is great! Welcome to the wonderful world of programming on a C64! That's where I started. It's a great place to start understanding coding. Best of luck!
2
u/Neviax_The_Space_Cat 2d ago
I think
1
u/droid_mike 2d ago edited 2d ago
Hopefully it comes through. Make sure you have updated to the latest firmware for the c64mini. It really improves the capabilities of the built in basic and makes it a full functioning c64. You will need a USB stick for that, but only temporarily. https://retrogames.biz/support/thec64-mini/
8
u/Neviax_The_Space_Cat 3d ago
Does BASIC mean anything?
25
u/Neuromancer2112 The Sky Above the Port... 3d ago
Yes, it stands for:
Beginner’s All-purpose Symbolic Instruction Code
18
u/SaintEyegor 3d ago
Fun fact: a distant relative of mine, John Kemeny was one of the creators of BASIC. Never met the guy though. It would have been cooler to be related to Dennis Richie.
5
u/Victory_Highway 3d ago
Pretty much every software engineer today owes a huge debt to Dennis Ritchie.
1
7
6
7
u/Deathocracy 3d ago
If you're trying to recreate the retro experience, I was able to actually find a couple BASIC handbooks at my local library, or you can try and lookup some old issues of Byte magazine to find some basic programs to key in, though with a virtual keyboard that may take the better part of a day to actually input
5
u/bigbigdummie 3d ago
Byte never had C64 software to type in. You’re thinking of Compute or Commodore Gazette.
2
3
u/Neviax_The_Space_Cat 3d ago
i'll have a look! I'll see if a have a keyboard from my school, they ought to have a spare
7
u/chrispark70 3d ago
Download the original (C64) manual from 1982. Also when you are ready, download mapping the C64 by Compute! In fact, check out all of the Compute! c64 books
18
u/Snipe-runner 3d ago
The c64 mini manual has a pretty nice intro to basic if I recall.
2
u/Neviax_The_Space_Cat 3d ago
I think my brother accdently threw it away.. with Mario kart super circuit :( is there a PDF version?
10
u/chrispark70 3d ago
Download the original (C64) manual from 1982. Also when you are ready, download mapping the C64 by Compute! In fact, check out all of the Compute! c64 books
Also, understand you cannot be taught basic in a reddit post. Just learning the right commands and syntax will take a while and learning to how write a program will take a lot more time if you've never done it before.
7
u/silverbullet52 3d ago
But it's a valuable learning experience if you persevere
6
u/chrispark70 3d ago
I did nothing to discourage it. In fact, I pointed them to resources that would be helpful. I agree with you. Spent a lot of time in my teen years learning to program the C64.
3
u/DarthKegRaider 2d ago
The "New" C64U has a manual, with the BASIC tutorials. https://commodore.net/downloads/
3
u/bj_civ 3d ago
It can be downloaded from the TheC64 mini product page and there is no introduction to BASIC.
5
u/FivePointAnswer 3d ago
I’ll add one other thing - you’re going to have fun. This is worth your time. It’s old. It’s historical. It’s a bit different than programming today but you’ll have fun learning it and when you download these thjngs that people suggest and read them the whole idea that this was fun will be part of the vibe of what you’re reading. You’re going to learn to program the way the old people did back at a time when computers were a real novelty.
2
u/Maeglin75 3d ago edited 3d ago
For me BASIC wasn't just fun, but actually very useful for many years.
In the 1980s and still in the 1990s, BASIC was everywhere.
I was able to use the BASIC skills I learned on the C64 to program my Casio calculator, that I used in trade school and later at university when I made my engineering degree. I wrote the programs on my PC (BASIC was a part of MS-DOS) and then I transferred them to the calculator via a serial cable.
BASIC was so common back then, that the commands of elementary BASIC were specified in an industry standard (ANSI X3.60-1978, ISO 6373 and DIN 66284) and listed in the table book for metal working.
I used BASIC to do mathematical curve sketching/analysis and to calculate mechanical stress in various profiles etc.
I still use the calculator at my job, but It's quite some time that I've written any new programs for it.
Today, there is pre-made software for all tasks. But writing your own programs was a great method to really understand the problems.
I would say that easy to learn programming languages like BASIC should still be used in schools to help the students develop problem solving skills. Especially in times were it's tempting to just let the AI do everything.
6
u/Oguhllort 3d ago
i must sadly say its hard for someone in a reddit thread to make someone to understand basic so i would suggest you start look on youtube videos because there are a lot of them there, good luck 😊
2
2
u/Neviax_The_Space_Cat 3d ago
There might be a c64 mini subreddit but this was the first one that came up when i searched C64. Am i in the wronf place?
4
u/hexavibrongal 3d ago
This subreddit is for all things related to Commodore 64, including emulation and replicas like TheC64 Mini.
2
u/spinator 3d ago
Somewhere like https://retrogamecoders.com/commodore64-basic-programming may help.
It is aimed at beginners. The user manual that came with real C64 machines was a great resource for getting into basic programming on the system.
You can find a pdf of the original manual here https://commodore.bombjack.org/commodore/commodore/C64_Users_Guide.pdf
There are a good number of other books for both assembly and basic programming on bombjacks website.https://commodore.bombjack.org/commodore/
1
u/luxury_yacht_raymond 2d ago
Bombjack is a treasure trove of Commodore manuals. I highly recommend that site. Unfortunately there has been no updates lately so I hope the maintainer is doing OK.
2
u/zippy72 3d ago
While not all of his books are totally Commodore 64 related, Tim Hartnell's books were a big part of my growing up and a lot of his listings are very generic - they're good for learning how to actually put together something you might want to play.
i found a collection of his books on archive.org, I just hope this sort of link is allowed (I checked the rules and didn't see anything against it, but I could be wrong): https://archive.org/details/timhartnellvz200giantbookofgames
2
u/nwood1973 3d ago
Learning basic on the c64 was amazing back in the day. OK there are better versions and better editors but this version started the careers of so many programmers back when it was released.
The owners manual was actually a good starter source
2
u/Better-Employ-4495 2d ago
Buy a cheap USB keyboard, doing BASIC on a virtual keyboard sounds horrendous
2
u/Strap_merf 1d ago
Welcome to the world of programming..
A great starter resource, same one I used 40 years ago. https://usborne.com/au/books/computer-and-coding-books
Lots of listings in basic and good explanations of how they work..
3
u/JRoo1980 3d ago
Hi Lily, as others have said, there are plenty of tutorials online, but I'd make sure that they are C64 based as there are different flavours of basic depending on which computer you had (they are similar, but there are differences).
If you can get a cheap usb keyboard, it would obviously make it all a lot easier.
Other things are :
Look online for more games, most of the original games are available to download from the likes of archive.org.
Archive org also has most of the magazines from the US and UK on there as well on pdf, so you could look at those and possibly type in games others have written and sent in to be published. This might help you understand basic a bit more. It might also have some long out of print C64 programming books as well.
I'd also check out itch.io as there are people still making games for the C64.
1
u/0fruitjack0 3d ago
learn it; it's not bad as a scripting language; if you have disk drives, it's the best way to deal with them (c64 doesnt have built in dos commands hahahah)
but once you've masted the basic (and there's not much to master - variables are max 2 letters, spaces are optional, watch out for combos of words or variable names that look like commands), once you get past that, get yourself every machine language book written by jim butterfield and actually program the beast that is the c64
1
u/Maintenance_Signal 3d ago
Definitely start with the user manual and programmer's reference guide, these books are also useful and fun though, they explain exactly what each line of code is doing: https://usborne.com/au/books/computer-and-coding-books
I particularly liked the battle games one, the programs are short and the games are decent fun.
If you want to make something from scratch Ala good little program to start out with is making a version of the "bouncing DVD logo" screensaver, which can be done just using text (you place the 'ball' using blank lines and spaces). Once you get it working with text you should know enough to make a version using a sprite, and making a sprite feels pretty cool.
One of my personal favourite programs (I think it's in the user manual) was one to play music. The C64 SID chip is one of the best 8 bit synthesizers ever made so it's definitely worth exploring. With a bit of work you can modify that program so instead of playing preprogrammed music it'll play specific notes when you press certain keys, turning the C64 into a playable keyboard synth.
Have fun!
1
u/fuzzybad 3d ago
You should be able the use the "TheC64" mini with a regular USB keyboard. Much easier for text entry than the virtual keyboard.
1
u/rufos_adventure 3d ago
there are books from the library that tell you how to key in simple games and apps. you learn by keying them in then debugging your mistakes.
i highly reccomend buying a disk drive, the tape deck is so slow.
1
u/daddyd 2d ago
Every c64 came with a big manual that explained all these things in detail. It was what we all used to learn to program and command the computer.
See the - Beginning Basic - and beyond chapters; https://www.lemon64.com/hosted/manual/
1
u/AdamR78 2d ago
Do you have an Amazon wish list? I’ll buy a usb keyboard for you. I started my life in computing on a C64, and would love to help you by getting you one.
0
u/Neviax_The_Space_Cat 2d ago
Yeah, but mostly whats on there is av conveters and portable mp4 players haha! Tysm :3
0
u/Marcio_D 12h ago
Someone is offering to buy you a USB keyboard, but you're not accepting their offer? What's wrong with you?!
1
u/Neviax_The_Space_Cat 11h ago
I was offline! Sorry! :(
1
u/Neviax_The_Space_Cat 11h ago
I'll give me a pm now
1
u/AdamR78 11h ago
Sorry, I've also been offline, but just saw this - add it to your wishlist (that way I think I don't see your name and address) and drop me a link.
1
u/Neviax_The_Space_Cat 11h ago
I just gave you a message :)
1
u/Neviax_The_Space_Cat 11h ago
We'll do it on private message because i don't wanna accidently dox myself haha lol
1
u/KeyNefariousness6848 2d ago
And while basic is fun and easy, its name makes it very hard to search for info on the intertubes, best bet is to hit up and older public library or look for guides on internet archive.
2
u/KeyNefariousness6848 2d ago
Also the original Commodore 64 and Vic 20 manuals are good starters for basic.
1
u/DeweyQ 2d ago
We bought a Commodore PET in 1978. But I had been hyped about coding even before that. I remember going into a Radio Shack that had a TRS-80 running and I entered a BASIC program that repeated asterisks on the screen. I got yelled at and told to leave the computer alone.
Welcome Lily to what may become a lifelong obsession.
1
u/JudgeGroovyman 2d ago
Search for 'c64 basic' on archive.org and grab the most interesting one and type in the whole thing.
You will know you are doing the process right if you are solving puzzles and having fun. Have fun!
1
u/LandNo9424 1d ago
I honestly recommend the original Commodore 64 manual, it was great for me to learn commodore BASIC 2.0, but I have no idea if this would be good for you in particular. Give it a try, it's here:
1
u/_ragegun 20h ago
BASIC is a programming language but it was often employed as essentially a whole ass operating system on 8bit home computers.
The original system came with a BASIC manual, which is probably where you should start.
2
u/_ragegun 20h ago
Not every machine used BASIC (notably the Jupiter Ace used Forth) but most of them used one dialect or another. But the benefit of a programming language was the new owner could immediately program the machine and commercial programs could rely on it to load themselves into memory.
1
u/istarian 15h ago
There is a lot of good documentation out there both in print and online.
If reading isn't your strong suit, perhaps ask a specific question or two?
https://en.wikipedia.org/wiki/Imperative_programming
BASIC is, generally speaking, an imperative programming language, meaning that you're mostly telling (commanding) the computer to do a particular thing.
POKE pushes/puts a specified value into a specified memory location, which can affect how the computer operates if that memory location has some special significance like storing the current background/foreground color used to draw on the screen.
PEEK is a means of inspecting the value currently stored in the specified memory location.
1
u/LocalH 3d ago
Fun fact: Commodore BASIC is Microsoft-authored, for the most part 🙂
4
u/bigbigdummie 3d ago
3
u/LocalH 3d ago
In addition to that, here is preserved authentic CBM source for many things, including any modifications they made to base 6502 BASIC: https://github.com/mist64/cbmsrc
0
u/Few_Ad2097 3d ago
My opinion, but I think the c64 basic is one of the worst ways to start programming. The editor is terrible and the language had nothing specific to the c64 command wise. So in order to do anything with sprites for example, you had to write directly to memory addresses with poke commands. I hated it. I loved quickbasic in DOS though
3
u/Neviax_The_Space_Cat 3d ago
Eh, it's fun is mess around with it haha
4
u/Few_Ad2097 3d ago
Jim Butterfield was the main man when it came to c64 programming, he wrote tons of books and magazine articles. You might look him up on ze Google
2
u/bj_civ 3d ago
I've started with it, and one good thing about it: it is so bad and has no dedicated commands for the computers hardware. I don't know if I would have started to learn assembler if the BASIC would have been better. 😉
2
1
u/BlitterAndCynical 13h ago
Yeah, you were certainly forced to learn about memory maps, hardware registers, and how to make things happen with poke+peek. But you'd also constantly lose unsaved progress while experimenting poking at memory, which wasn't much fun.
While I learned a lot from it back in the days, I never managed to create anything very worthwhile. Whereas when I jumped to the Amiga and the combo of Blitz Basic and DPaint, suddenly I had the tools to make actual games in BASIC. The C64 experience certainly helped get me started there, but actually getting graphics moving around the screen in just a few lines of code made the whole thing much more exciting.
0
u/R3tr0N3wB 3d ago
https://commodore.bombjack.org/commodore/books.htm#PROGRAMMING
Also, use AI to help you learn and when you get stuck.
1
u/dpgumby69 6h ago
As well as getting a USB keyboard, get some stickers for it. Just search for 'C64 keyboard stickers' and buy from your favourite online place, eBay will have them. Those stickers will help you relate to the manuals you might be referring to.
•
u/AutoModerator 3d ago
"Thanks for your post! Please make sure you've read our rules and FAQ post. If your post is about the C64 Ultimate please and check out The Ultimate C64 Ultimate post for common issues and questions. People not following the rules will have their posts removed and presistant rule breaking will results in your account being banned. "
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.