BASIC Programming Language - Programming on a Commodore 64!

preview_player
Показать описание
Part 5 of my series on the Commodore 64!
Please like, comment and subscribe if you like this video and let me know what you think, as well as any suggestions and corrections you have!
Рекомендации по теме
Комментарии
Автор

You don't need to power cycle the C64 to clear BASIC memory. You can simply execute the NEW command to erase what is currently stored. Also there is no need for ( ) in your print statements unless you are doing math that needs an order of operation. When programming with early 8-bit machines, you need to watch your memory usage especially with longer and more complex programs. If you don't, you might run out of space! This video brought back many memories of me spending hours on end programming in BASIC back some 35+ years ago!

jeromekentz
Автор

I'm loving on my black cat Sisko as he is passing away. I'm devastated, and binge watching your calm vids is helping me keep it together. Thank you so much, your stuff is appreciated. :)

queentribble
Автор

Fun fact: The Assembly code that you see in the HUD of the Terminator in the first Terminator movie is simple MOS-6502 code -- which means the Terminator is a Commodore 64 killing machine. Technically, the code you see is for the Apple ][e, but it's the same CPU regardless and can be recomplied to run on the Commodore 64.

telengardforever
Автор

I learned BASIC by sitting on the carpet in front of the family TV typing in programs from magazines on my VIC-20. Often there's typos and trying to fix them teaches BASIC rather well. BASIC 2.0 doesn't reflect well on the capabilities of the Commodore 64, no sound or graphics commands, so programs will often have many peeks and pokes, it serves to familiarize the programmer with the C-64's memory map, it makes the transition to Assembly easier, in my opinion.

delscoville
Автор

thank you.
I can't wait to get my commodore 64 up and running. I have dabbled a little with GW-BASIC for MS-DOS. I have this lovely laptop from 1996 with MS-DOS 6.22 on it :)

Btw. the youtube name Dead Dinosaur is brilliant with the content you're making.

nikolaisandbeck
Автор

Commodore BASIC inspired my career in IT, as I'm sure it did for countless others. It's somewhat paradoxical that thousands of hours spent typing in and debugging programs from magazines (especially sprite data) and developing simple games using PETSCII for graphics, is representative of both a misspent youth and time well invested!

Another great presentation; refreshing, very well structured and wonderfully communicated. Thank you!

Mark-
Автор

You voice is cute, smart and calm
And omg, I was lerning basic for the first time and gave up looking for the loop think after hearing linus talk abt it. I gave up looking. Bingo you sorted it for me!

marshallpreston
Автор

Thanks for the excellent introductory tutorial. Looking forward to any other C64 tutorials you post. I’d especially be interested in some entry level C64 assembly videos. You mentioned you’re not an expert with it, but that may actually be an asset. More people may actually be able to understand your explanations. 😊 I’m trying to learn as well, so it would be interesting to see how another newcomer goes about things.

Thanks again!

stephenjames
Автор

I think your series about the C64 is getting better and better. I wrote my first program in Basic 3.5 on the C116 when I'm 8 year old. A year later I got a C64 and continued writing programs in Basic 2.0. At that point it was already clear that I wanted to become a professional programmer. Since then I have tried a wide variety of programming languages. On an Amiga 500, an Amiga 2000, a SinclairQL, an Atari 1040 and on PCs. But I still have my C64 and still use it for games from time to time. I think that the C64 was the best computer of all time from the fun factor. If you have any questions about the C64, just write to me and I will try to answer your questions. Greetings from germany :)

SeoOderNichtsein
Автор

Interesting video! I see you know "modern" programming well by your description of terms and program structure. It's amusing to see how much of this carried over into BASIC. I only know Commodore BASIC and 6502 assembly, so to me, it's modern code that seems strangely structured and unnecessarily complicated. I had lots of thoughts while watching the video, and many of them were already covered by commenters here, and also yourself as the video went on. Here's a few things no one's touched on yet.

(1) Skipping integer use saves typing % all the time and those illegal quantity errors would be pretty much gone.

(2) Arrays DO need to be defined before first use UNLESS you only need small ones. If you assign a value to an array that wasn't DIMensioned earlier it will automatically set aside memory for indexes 0-10 for you.

(3) Remember the opposite of "IF X < 4 then" would be "IF X >= 4", because if the value equaled the value compared against, both checks would fail if the value was equal.

(4) The INPUT command is pretty weak in that it does not error trap or restrict the user to numeric or text entry. One can CRSR all over the screen and pretty much destroy the layout, or enter 9e99 as a number and overflow everything. A "professional" program might use a custom INPUT routine written in ML. For most purposes though, BASIC's INPUT gets the job done.

MorreskiBear
Автор

The MOS-6502 had a powerful instruction set architecture. If only it evolved into the 16/32/64-bit era... And when I did develop a micro-controller while in graduate school, it was based on the MOS-6502 (with some 16-bit additions) which totally impressed my professors. I guess what is old, is new again? I'm sure the chip I developed could run some very simple Commodore 64/NES/Apple ][ programs without modification.

telengardforever
Автор

First video of yours that i watch. Ty very nice video !!! I started my tech obsession with a commodore 64 back in 82 and i still got a few books for it . I love the machine language for beginners book

visitandolosclasicos
Автор

I thought I'd found all the C64 videos but recently have discovered your channel and been binge watching. Thank you. Please keep the Commodore material coming.

davidgagnon
Автор

Subscribed.. You are going places. Don't stop!

MakersEase
Автор

Thanks for the video! At 18:38 you mention using the Commodore key to change the colours; that does work, but C= + keys 1-8 are the same as colours 8-15. Use the Control key with keys 1-8 to get colours 0-7.

_Bit
Автор

My favorite 8bit computer. I bought mine just after they lowered the price from $595 USD. It was the first computer I had that has a floppy drive instead of depending on tape storage.

DevilsHandyman
Автор

You don't need to cursor to the end of the line when editing a line. Try it. Also control and some C= key combinations can be captured inside " ". But quote mode also introduces some editing issues as things like delete and cursor keys are captured.

delscoville
Автор

I always wanted to program a C64, but never had the attention span to really learn how to do so. But I've absorbed so much of Basic over the years, and lately I've been really keen to actually achieve a near lifelong goal of making a reasonable piece of C64 software in the Basic language. I can't remember many of the commands, but as long as I had a list of them beside me I'd be good to go. I think I'll just try to clone a simple game first, nothing too inventive. Just to get the hang of it. Then try and do something original. It'd just be cool to actually achieve it.

channel
Автор

Very interesting video. Try to learn some Forth programming before assembly, it will blow your mind how fast and simple it is. There's a modern forth language for the C64 "durexforth".

beforth
Автор

Good video. So 54296 is the sid volume/filter register. The volume is the lower 4 bits so max volume is 15. If you poke 16 it's the same as setting it to zero as the lower 4 bits will be zero. This technique is how digital samples are played back on a 64. You can store two samples per byte as the upper nibble is just a left shift 4 bits . But yeh it's a bug in the sid chip that it pops when you set it. They fixed (broke) this on newer sid chips . Hope that made sense.. the c64 basic was really poor, everything had to be done with pokes . Hence todo anything you have to use assemblet and just bang the hardware 🙂

andrewbourhill