Atari 6502 Assembly - Auto Starting Assembly Programs

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

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

  • @STN-t5k
    @STN-t5k 21 день назад +2

    Hi Ellyse, this series is a lot of fun, thanks for making it! I know the 6502 reasonably well but don't know that much about the Atari computers so I'm looking forward to learning more. I think you mentioned a couple of times not being too sure what the D flag is for. I assume this will be covered by Atari Roots on a later chapter but maybe this can clarify things a bit in the meantime.
    When the D flag is set, ADC and SBC will interpret values as BCD instead of binary, so a number like $19 is interpreted as 19 decimal, not 25 decimal like it would be when the flag is clear. So if you add 1 to it, for instance, the result will be $20, which is interpreted as 20 decimal, instead of $1A which would be 26 decimal with the flag clear.
    This is a very convenient representation for quantities that you want to display on the screen, since a byte can now be interpreted as two nibbles ranging from 0 to 9. Displaying numbers is something you will normally do on a videogame for things like score, time, lives, etc, so this representation allows you to do it with the least amount of work. If the 6502 didn't have a decimal arithmetic mode of operation, you would need to convert the number from binary to BCD on your own before displaying it or implement your own decimal arithmetic addition and subtraction routines.

    • @ellyse7777
      @ellyse7777  21 день назад

      OMG That is so useful to know, and super clear. I guess I totally take for granted that modern languages can just set a prefix and it just knows what to do with it in terms of translations, to binary and also any "to string" representation. Thanks! Is it limited to a nibble?

    • @STN-t5k
      @STN-t5k 20 дней назад +1

      @@ellyse7777 Yes, only nibbles, the 6502 only understands binary and packed BCD numbers (two decimal digits per byte). These are enough to easily print values in base 2, 4, 8, 10 and 16. If you wanted to display numbers in other bases, then you have to come up with a software solution for it.

  • @mawu4511
    @mawu4511 24 дня назад +1

    Was this session live ? I missed the notification : (

    • @ellyse7777
      @ellyse7777  24 дня назад +1

      @@mawu4511 haha it was live a while ago but often I pull the part where I actually do something and make it a video so people can more easily find it later. You didn’t miss it, just really late posting this one ! I’m out most of today so not sure about streaming 😭

    • @mawu4511
      @mawu4511 24 дня назад +1

      @@ellyse7777 OK great. 😅 Yeah, streaming can definitely be exhausting

    • @ellyse7777
      @ellyse7777  23 дня назад +1

      @@mawu4511 actually its not exhausting at all for me, i love doing it! i just was busy today haha but as you know i got a little time in :)