6809 Assembly ain't any harder than basic. Well OK, it might be but maybe not as hard as you think

Поделиться
HTML-код
  • Опубликовано: 25 дек 2024

Комментарии • 41

  • @8bitsinthebasement
    @8bitsinthebasement  Месяц назад

    Thanks so much for watching. I'd just like to make one or two quick corrections.
    At 17:00 I said that the command LEAX stood for "long extended address X", it don't, it in fact stands for "load effective address X" but it still works just as I described ;)
    One other thing, RTS stands for "return from subroutine" and in this case it will return you to basic after the program has finished.
    I really wish you a whole lot of fun if you decide to play around with assembly.
    And remember, if you find that it's hard going at first, don't be discouraged, it gets easier and easier the more you fool around with it. Truly, it can really be fantastic fun. I know very well that it doesn't always feel like fun in the beginning, but, that's a small price to pay for unlimited power...

  • @LordmonkeyTRM
    @LordmonkeyTRM Месяц назад +2

    Possibly the best video on an introduction to assembly I have ever watched.
    I got it all. Bravo.

  • @thomo5
    @thomo5 Месяц назад +3

    Génial, très bonne vidéo!

    • @8bitsinthebasement
      @8bitsinthebasement  Месяц назад

      Merci, je pense que la comparaison entre ASM et basic rend l'ASM beaucoup moins effrayant ;)

    • @thomo5
      @thomo5 Месяц назад

      @@8bitsinthebasement Oui, tu as vraiment fait une bonne initiation à l'ASM et la comparaison est juste génial.

  • @lawrencemanning
    @lawrencemanning Месяц назад +4

    Just be glad you’re not coding 6502 assembly. 😂 The 6809 is a dream to program in comparison.

    • @8bitsinthebasement
      @8bitsinthebasement  Месяц назад +3

      I'm getting ready to jump to another processor soon. I wanted to write a game in 6809 then convert it to another 6809 platform to see first hand what that took. The conversion's almost done and I was thinking that I might like to dip my toe into the ol' Vic 20 next. But I may regret that yet ey? :)

    • @lawrencemanning
      @lawrencemanning Месяц назад

      @@8bitsinthebasement it’s about what you are used to I suppose. The 6809 is more 16 bit then 8 bit in my view; instructions like LEAX basically let you do 16 bit arithmetic. It’s also highly, though not completely, orthogonal. The post increment makes 16 bit long arrays easy. For fun, I wrote a fairly complete multitasking OS with a dynamic memory allocation and other “complex” stuff. I wouldn’t like to have written the same for the 6502, though it obviously can be done.

    • @BenScarboro
      @BenScarboro Месяц назад +1

      Been thinking about some 6502 learnings for the C64... Now I'm worried ;)

  • @CocoTownRetro
    @CocoTownRetro Месяц назад +1

    I like your approach of comparing with basic, and showing the assembly and basic side by side. A very nice introduction for those already familiar with basic. I don't think I've seen this before.

    • @8bitsinthebasement
      @8bitsinthebasement  Месяц назад +1

      Thank you, I'm a little apprehensive about making any videos on ASM as there are so many out there that are really good with people who know exactly what they are talking about. I made this one as it was truly the kind of video I searched for and never found when I started.

  • @stevanr_
    @stevanr_ Месяц назад +1

    I was about to start learning assembly 6809 on the Thomson MO5 computer... Your video will certainly be helpful. Thank you !

    • @8bitsinthebasement
      @8bitsinthebasement  Месяц назад

      I wish you luck with it. Read and watch all you can about 6809 assembly and don't let yourself get too overwhelmed by the command list. You can do quite a lot with just the load, store and compare commands. It can be hard going at first, but once you've managed to get one or two programs working the way you want them to you'll find that it starts getting easier and easier. Also you'll find a whole bunch of books about assembly on the MO5 here dcmoto.free.fr/index.html I found " MO5 Programmation en assembleur" par Fagot-Barraly to be really helpful.

  • @CyberhugTechnologies
    @CyberhugTechnologies Месяц назад +1

    Surely very well explained and interesting Peter! Very nice video!
    Brought back so many memories from the times i was trying to get to it but never been able to be any good at it! Cheers my friend!

    • @8bitsinthebasement
      @8bitsinthebasement  Месяц назад +1

      Thanks, I started with it a year or so ago and it was hard going at first, but once you figure out how things work with it, it gets easier and easier.

  • @chadlung4353
    @chadlung4353 Месяц назад

    Great video. I appreciate your Batari and Assembly videos and the time it takes to put these together.

    • @8bitsinthebasement
      @8bitsinthebasement  Месяц назад

      Thank you very much, it's nice to know that the effort is appreciated :)

  • @shanehebert396
    @shanehebert396 Месяц назад +1

    The 6809 has a great ISA. I like the 680x0 family a little better for obvious reasons, but the 6809 is a really nice processor.

    • @8bitsinthebasement
      @8bitsinthebasement  Месяц назад

      For the moment the 6809 is the only processor I know. I choose it as I was advised that it was the easiest and best to begin with and I think that I would have to agree, it's been fun and not too hard 75% of the time ;) I have my sights set on the 6502 or Z80 next, I've still not decided which. Any advice?

  • @tomerikgundersen8574
    @tomerikgundersen8574 Месяц назад

    Thank you

  • @RudysRetroIntel
    @RudysRetroIntel Месяц назад

    Excellent video and explanation of assmebly! Hopefully, you will make more videos on assemby. Thanks for sharing

    • @8bitsinthebasement
      @8bitsinthebasement  Месяц назад +1

      Thanks Rudy, we'll see if I manage to put any more together in the future. Assembly is easy to learn in small steps but it's not an easy subject to make interesting in a video. In any case thank you for watching buddy :)

  • @Etcher
    @Etcher Месяц назад

    This is great Pete! I always had a soft spot for assembly in college but I've never used it in any real application - until now! I optimised your code slightly which worked for me with a little bit of tinkering.
    ldx #0 ; Initialise X to 0
    lda #255 ; Load A with 255
    loop:
    sta, x+ ; Store A at address X and post-increment X
    cpx #7999 ; Compare X with 7999
    blo loop ; Branch if X is lower (continue looping)
    end:
    rts ; Return from subroutine
    I'll come back to you when I have converted Bob and the Alien Fireflies to 6809 assembly (which I think you've done already actually!)

    • @Etcher
      @Etcher Месяц назад

      ps: I wouldn't hold your breath though ;-)

    • @8bitsinthebasement
      @8bitsinthebasement  Месяц назад

      Hey Etcher, how are you keeping? T'was yourself that first told me about the existence of assembly way, way back in 1988. We played the heck out of Nemesis on the C64 that summer and you filled me in on the reason that it was so different than the "10 print" basic stuff we were fooling around with. That was fun :)
      The code you listed is more optimised than mine, using the BLO to get around branching to the RTS I see what you did there ;). That's 6502 assembly though isn't it? I had to look up the CPX command you used, I'd not seen it before. I'll try either 6502 or Z80 assembly next. Fooling around with a Vic 20 or ZX Spectrum would be a lot of fun ;)
      Oh, If you want to play Bob in 6809 assembly without all the downloading and configuring stuff head on over to www.6809.org.uk/xroar/online/ and choose Bob from the "games" dropdown menu.
      I wrote Bob for the Coco 2 first and changed a few things to make it work for the Dragon 32 and Ciaran Anscomb was kind enough to add it to the games list on his online Dragon emulator. Since then I've been working on a Thomson Mo5 version (again 6809) I wanted to see how much difference there was between two systems that use the same processor (turns out that they can be exactly the same and hugely different at the same time).
      Anyway, thanks for dropping by, take care and tell everyone I said hello :)

    • @Etcher
      @Etcher Месяц назад +1

      ​@@8bitsinthebasement Hey Pete, haha I remember playing that game and Erebus if you remember? We got pretty far in both those games! It was around that time you told me all about the C64 approach to sprites (I think you were doing a dev course back then - I was well jealous!) I'd say we were filling in a lot of blanks and pretending to each other we knew what we were talking about :)
      The cpx instruction is available in both 6502 and 6809 assembly as far as I know. Actually, this video has inspired me to have a tinker around with Z80 assembly. There's still a strong ZX Spectrum demo scene on RUclips and you should see some of the insane things people are doing with the processor in terms of assembly tricks and hacks to get it to do stuff that would have blown our minds when we were kids.
      I'll check out Bob now, that's great that its online on Ciaran's website! I've often wondered about the difference between systems even though the processor is the same. That would be a very interesting video actually, perhaps you could explore that one day?

  • @BenScarboro
    @BenScarboro Месяц назад +1

    Told ya, you've caught the programming bug :)

    • @8bitsinthebasement
      @8bitsinthebasement  Месяц назад +1

      No I haven't, I don't have a problem. Anyway I can give up any time I want, I just don't want right now is all. Now I got to get back to more pro... doin' stuff
      You were right Ben, it does start to become a bit of an obsession after a bit :)

    • @BenScarboro
      @BenScarboro Месяц назад

      @@8bitsinthebasement But it is SO much fun, seeing the results of what you type, on screen... And having people use and enjoy it!
      (and if you the physcial route, interefacing with the REAL World too! :) )

  • @Chris94-t2m
    @Chris94-t2m Месяц назад

    It"s a nice intro to the Thomson MO5 and the 6809 assembly language. This microprocessor is very powerful and very efficient, compared to the Z80 for example. Are you going to do the same on the Coco? And Btw, did you enjoy the sources of Evil Dungeons 2? If you still wonder how I made a fast dungeon on this machine, I may give you a few explanations by email.

    • @8bitsinthebasement
      @8bitsinthebasement  Месяц назад

      Thank you very much. I'm still pouring through the sources of Evil Dungeons 2 and although I would be lying if I said that I understood much of how it works, I've already learned quite a lot from it. Mostly as regards displaying text on screen on the MO5 as well as displaying accents on letters. I really was blown away by what you all achieved with Evil Dungeons 2 and I've spent a good few hours playing it so far. I'll surly have a few questions for you as I progress in my understanding of assembly but for the moment I really am just a beginner and still figuring out just how the basics work. Keep up the fantastic work and I hope that you might give my MO5 game a try and let me know what you think when I've finished it. Or maybe you would be willing to beta test it for me before release ;)

    • @Chris94-t2m
      @Chris94-t2m Месяц назад +1

      @@8bitsinthebasement Sure! As soon as you've got a beta, send it to Thom MO5 and he will forward it to me. He may also give you my email, if you like.

  • @mattmyers9351
    @mattmyers9351 Месяц назад

    Cool video Peter, this is all Greek to me 😅

    • @8bitsinthebasement
      @8bitsinthebasement  Месяц назад

      Thanks for watching Matt. It was Greek to me just a little over a year ago, fun to learn though :)

  • @ilmestdavisque5391
    @ilmestdavisque5391 Месяц назад +1

    (hmm, it reminds me of memories from so far back... )
    Really interesting; it is good (and not so simple) to make "popularization" that works:)
    (...vous n'auriez pas les mêmes, en français ? on n'est pas forcément trop polyglottes, non plus, ici ;) )

    • @8bitsinthebasement
      @8bitsinthebasement  Месяц назад +1

      Thank you, I've not made any videos in French... yet.
      pour être honnête, elles sont déjà assez difficiles à faire en anglais :) mais peut-être dans la nouvelle année. Thanks for watching

  • @user-yr1uq1qe6y
    @user-yr1uq1qe6y Месяц назад +1

    That cursor blink is going to give me a seizure. Is the real hardware like that?

    • @8bitsinthebasement
      @8bitsinthebasement  Месяц назад +2

      It is, to be honest I didn't really notice it was as fast as it is until I read your comment. I set it up to check. Strange that they set it to blink so wildly. I'm sure that there is a poke to set the blink speed but little good that is without hacking the rom. Sorry about that ;)

    • @user-yr1uq1qe6y
      @user-yr1uq1qe6y Месяц назад

      @@8bitsinthebasement I'm pretty sure I've seen it on non-Thomson computers too. Maybe us old Commodore guys are just used to the almost lethargic blink speed of the C64 :)

    • @8bitsinthebasement
      @8bitsinthebasement  Месяц назад +2

      You may well be right, but I'm inclined to agree with you that the slow blink or even a solid bar as a cursor in my opinion is by far better. Maybe it's just our old weary eyes :)