Commodore 64 Part 2: Intro to 6502 Machine Language

2024 ж. 20 Мам.
34 106 Рет қаралды

Using the MOS 6502 and Commodore 64 BASIC as our starting point, I give an overview of how the CPU interprets instructions and how to give the most basic example of writing a value to memory to change the border color with machine language.

Пікірлер
  • This is crazy. One of the best explanations in the world. And only so few pay attention to these three videos. I thank you very much for your effort. I hope you would bring more to the table.

    @Infinitesap@Infinitesap5 жыл бұрын
  • This explanation was so great. Assembly is not an easy thing to understand, and you made it very clear. Nicely done!!!

    @gc1418@gc1418 Жыл бұрын
  • Thanks for the video. I would sit in front of my c64 for hours writting programs from books and magazines and never knew what I was really doing at time. I always wanted make better programs, but never knew how and information wasn't available like it is now. Just got my C64 back out the other day and trying to get my 1541 back up and running. I also got some parts to build the X1541 cable so good times are ahead.

    @Kevin_KC0SHO@Kevin_KC0SHO6 жыл бұрын
  • Excellent! I could have really used these videos back in the 80's!

    @tach409@tach4092 жыл бұрын
  • i just found your channel today and im absolutely loving it! thank you for your concise explanations for someone just getting into this stuff. You are easy to listen to and follow!

    @thebootrex5609@thebootrex56096 жыл бұрын
  • Compute Magazine had a small program that you could enter and save to your floppy or tape... You’d run that program before typing in one of the programs in their magazine. Each line of the program in the magazine ended in a colon and a 5 digit number. It was a checksum (I know that now - didn’t know that then). The small program you ran before typing in one of their programs would replace a tiny part of the C64 BASIC screen-editor, and would use the checksum number at the end of the line to ensure you entered that line correctly. It would let you know, via a very displeasing “buzz” sound, that you had entered the line incorrectly, so you knew immediately to check that line and correct your mistake. It made entering programs a *lot* easier - and whoever came up with that idea deserved a big pay-raise! Really made my life a lot easier, back in the day.

    @LMacNeill@LMacNeill6 жыл бұрын
  • Love the shout-out to Real Genius! As someone who grew up on the C64, Atari 400, and Atari 2600, I often have been given to wonder why we don't have 64 bit versions of the 6502 today, perhaps a WDC W65C864. The answer is probably, "because Steve Jobs", thinking of his war against the Apple II gs in favor of the Mac. I've mused about having a 64 bit 6502 descendent and Adrien Kohlbecker, W65C816 maven, has commented in response: it would be in a DIP-40 and they'd make us time demultiplex the 64 bits off the address/data pins.

    @AlanCanon2222@AlanCanon22222 жыл бұрын
  • Wish I had these videos 40 years ago.

    @chrisnorth4320@chrisnorth4320 Жыл бұрын
  • I learned much more watching this one video than I ever did poring through those issues of COMPUTE! magazine and typing random examples into my VIC-20.

    @Zefrem23@Zefrem235 жыл бұрын
  • Nice video. The two so far as well as a machine code book ive been reading have really helped me. Cheers

    @1stacbats@1stacbats5 жыл бұрын
  • This series has been great! Keep going, I've learned so much!

    @ryan_chapelle9489@ryan_chapelle94898 жыл бұрын
    • Oh of course! I've liked every video simply on how great they are!

      @ryan_chapelle9489@ryan_chapelle94898 жыл бұрын
    • RYAN_CHAPELLE dude your handle is the guy off 24

      @Havanacuba1985@Havanacuba19854 жыл бұрын
  • Nice. I can relate to pretty much everything you´re saying regarding deduction and the complexities of machine language!

    @RetroMarkyRM@RetroMarkyRM7 жыл бұрын
  • Great video. This really takes me back to my youth. I had a program published in a magazine when I was a teenager. It also was just a page of data statements. Helped me buy more computer bits :)

    @adrianpurser@adrianpurser3 жыл бұрын
  • The C64 used the 6510 whose instruction set was almost identical to the 6502.

    @zaferaydogan1516@zaferaydogan15167 жыл бұрын
  • Fun channel :) I grew up on Commodore boxes too. This video perfectly explains how I wrote my first assembler programs, manually converting every single bit. I would also type in those magazine programs and in a retro fit a cpl years ago I dug one out and reimplemented Eliza for Android. Not that it hadn't been done before, but hey...

    @AndreasStenmark@AndreasStenmark7 жыл бұрын
  • Verry interesting. Keep up with good work 😊

    @ProGaming-we6hh@ProGaming-we6hh6 жыл бұрын
  • really nice tutorial. i wished i would have understood all that back then when i was a kid.

    @AxelWerner@AxelWerner7 жыл бұрын
    • Same here :)

      @BriansManCave@BriansManCave7 жыл бұрын
    • I actually did. I used to play around with machine language a lot when I was about 12.

      @Jeff-xy7fv@Jeff-xy7fv6 жыл бұрын
    • Jeff Yea, I quickly found BASIC to be very limiting. Even today I still find assembly programming to be quite enjoyable coding for pic16 MCUs. There is an element of code craft and artistry that is lost writing in higher level languages.

      @timharig@timharig5 жыл бұрын
    • Axel Werner I think it depended a lot on your location. If there weren’t kids around in your home city that could introduce you into that stuff, you were fucked. I also would’ve liked to know more about this. Could have bought a book or so. But didn’t have enough passion, I guess.

      @bierundkippen720@bierundkippen7204 жыл бұрын
  • It can be fun to revisit the past for the nostalgia but I'm glad we no longer have to compile assembly code by hand lol

    @rationalraven8956@rationalraven89563 жыл бұрын
  • The C=64 has a glitch in the Kernel where if you type 350800 into basic, as if to remove that line from a basic program, the computer jumps to the RESTORE mode. Can anyone please explain this, I've been wondering for the last 35 years.

    @JesusisJesus@JesusisJesus6 жыл бұрын
  • awesome, thank you very much :-)

    @Mr_ToR@Mr_ToR6 жыл бұрын
  • I'd love to see a similar video about the Apple IIe.

    @nicholasmaude6906@nicholasmaude69064 жыл бұрын
  • Computes Gazette was what I used!

    @BriansManCave@BriansManCave7 жыл бұрын
    • I used to subscribe to that!!

      @Jeff-xy7fv@Jeff-xy7fv6 жыл бұрын
  • What I never understood back then is why was the main text printed nice and clear but the code in the magazines and books was always printed poorly.

    @TheStevenWhiting@TheStevenWhiting Жыл бұрын
    • My guess is: more expensive paper for the pages that more expensive ads appear on

      @Fill_In_The_Blank_Programmer@Fill_In_The_Blank_Programmer Жыл бұрын
  • Compute! was a favorite of mine. It had more IBM/PC stuff (which I had because that's what my parents bought).

    @BitwiseMobile@BitwiseMobile4 жыл бұрын
  • I cannot really recall how I ended up programming 6510... I think I just went into the machine code monitor in the Action Replay mk V and got a little interested in what I saw. Never really had any books help me, just the games I took apart... also never had an assembler, just the ARmkV.... man keeping all the JSR routine locations on paper was fun and refactoring to make space was... interesting.

    @Meow_YT@Meow_YT6 жыл бұрын
    • Did the Commodore 64 have a built-in assembly monitor like the Apple II did?

      @gregorymalchuk272@gregorymalchuk2723 жыл бұрын
    • @@gregorymalchuk272 no. Had to use extra tools.

      @Meow_YT@Meow_YT3 жыл бұрын
    • @@Meow_YT Which ones? TurboMacroPro?

      @gregorymalchuk272@gregorymalchuk2723 жыл бұрын
    • I used a cartridge based assembler, I think it was called Mikro Assembler. It would let you write assembler like a basic program with line numbers and it added commands to assemble it.

      @adrianpurser@adrianpurser3 жыл бұрын
    • @@gregorymalchuk272 Like I said. I didn't have anything other than the Action Replay machine code monitor. I didn't know of any other tools until later and I really didn't learn much about them until I was writing on other machines, like the Acorn. All I really had was pieces of paper to write down my routine locations and remembering the important addresses on the C64 myself, mostly in hex.

      @Meow_YT@Meow_YT3 жыл бұрын
  • Ah yes typing in programs in the basement every weekend for hours.

    @tenminutetokyo2643@tenminutetokyo26432 жыл бұрын
    • For them to fail due to a typo! :)

      @Testacabeza@Testacabeza2 жыл бұрын
  • Is this commodore basic or assembly language. Assembly comes with instructions like Lda, sta etc

    @stana1980@stana19803 жыл бұрын
  • The $ means it’s a hexadecimal number.

    @tenminutetokyo2643@tenminutetokyo26432 жыл бұрын
  • Great video, I've been messing about with computers for over 30 years but never really understand what the DATA and READ commands did. Watching this video makes it all clearer :-) Really enjoying the series so far, although I'm trying to learn Z80 I'm guessing the basics are fairly similar regardless of what machine you use. Times like this I wish I had KZhead back in the 80s to explain this stuff to me :-)

    @TrevorKevorson@TrevorKevorson6 жыл бұрын
    • Rob Beard There are commonalities between most the assembly language of most processors but there are sometimes very different paradigms in how the processor architecture is set up -- especially with how memory addressing works. That said, Z80 assembly is almost like a superset of 6502 assembly. The big difference is that you have some general purpose registers to work with so you don't have to be so dependent on constantly loading addresses into the index registers every time that you need to work with a value.

      @timharig@timharig5 жыл бұрын
  • Just finding your videos now, these are great. Do you still check this channel? Would love to see more. Subbed.

    @unity6926@unity69263 жыл бұрын
    • I do! I posted a new episode not that long ago, actually. I have a long series planned and am slowly putting it together now.

      @Fill_In_The_Blank_Programmer@Fill_In_The_Blank_Programmer3 жыл бұрын
  • c64 keyboard was horrible, did exactly this hundreds (perhaps thousands) of times: 14:25 LIT ?SYNTAX ERROR READY.

    @ericmullins7990@ericmullins79907 жыл бұрын
    • I loved it. ☺️

      @bierundkippen720@bierundkippen7204 жыл бұрын
  • 6:50 "Enjoy the silence" - Lolol

    @andreranulfo-dev8607@andreranulfo-dev86074 жыл бұрын
  • What's the point of this video? You go back and forth with cursors keys and you type a few lines like a snail. We can look up Wikipedia on our own

    @user-hx9gu5nh9p@user-hx9gu5nh9p5 жыл бұрын
KZhead