C128 Basic 100x faster? - Fast like a Flash: the Basic Microcompiler - RLE decoding on the C128

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

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

  • @televisedfeedback6660
    @televisedfeedback6660 Год назад +2

    I'm still learning about Basic and older computers in general. Fast compilers are definitely fascinating and very very welcome.

    • @the8bittheory
      @the8bittheory  Год назад

      Yes they are. That concept was fascinating to me at first sight :-)

  • @adrianbye830
    @adrianbye830 11 месяцев назад +1

    Great video!

  • @TheStuffMade
    @TheStuffMade Год назад +1

    Enjoying your C128 content 👍 I've mostly been using mine in C64 mode. While I understand the intent to demonstrate the compiler, I think it would be overall easier to just write the RLE routine in assembly language from scratch🙂

    • @the8bittheory
      @the8bittheory  Год назад +1

      Pure assembly language is definitely superior.
      Thanks for the good feedback!

  • @fradd182
    @fradd182 Год назад +2

    Just out of curiosity, what happens when RLE needs to encode FE byte? I guess it does something like this: FE 01 FE, 3 bytes instead of 1?

    • @the8bittheory
      @the8bittheory  Год назад +1

      In this specific case FE is not a number that‘s within the valid range. But yes, your suggestion is one way to do it. In general there‘s multiple ways to do this - also more efficient ones.
      Totally valid question, thanks for that

    • @benholroyd5221
      @benholroyd5221 Год назад

      It depends on the nature of the data.
      You could just do FE FE. And not allow FE repeats.
      Or you could swap respeat and literal. So you can have FE repeats.
      So you could do FE 09 05 to repeat 9 five times.
      Or FE FE FE FE to repeat FE FE times.
      If it's text then the high bit won't be set so you could set the high bit for the literal and follow it with the repeat, instead of having a reserved byte
      Have a read about lz compression also, despite being patent encumbered in the 80s it is very straight forward.
      That just basically adds a pointer back to the already decompressed stream.
      So you could do this
      "So you c[back 4: repeat 2]ld d[back 12: repeat 2]this"

  • @AnnatarTheMaia
    @AnnatarTheMaia Год назад

    With so many restrictions, this micro compiler doesn't really bring any advantages to just writing the code in assembler, for example in Turbo Macro Pro and targeting the C=128. It's basically in the same class as the cc65 C compiler, which does not have the basic float and double data types, and therefore cannot do floating point arithmetic, and doesn't come with libc, which pretty much defeats the purpose of writing software for the C=64 in C, or compiling existing body of C software for the C=64. These pieces of software are the antithesis to core UNIX software design principles.

    • @the8bittheory
      @the8bittheory  Год назад

      From today's perspective that's completely right.
      Back then, the micro compiler was a type-in program. It basically came for free (well, the price of the magazine), which was one of the main benefits, I guess.
      All the restrictions only make it useful for targeting very specific tasks, not for writing full programs. Any probably only for people who aren't familiar with assembly language.

  • @AnnatarTheMaia
    @AnnatarTheMaia Год назад +1

    By the by, "variable" in English is pronounced the same way as in German, the only difference being that the "a" in "va" is short, not long. Pronounced "Weriable".

    • @the8bittheory
      @the8bittheory  Год назад

      I'll keep that in mind, thanks! Highly appreciate your feedback :-)

    • @AnnatarTheMaia
      @AnnatarTheMaia 11 месяцев назад +1

      @@the8bittheory ...and I appreciate how much you go into detail, and also that you've decided to do a series of videos on the C=128, because it's not a well documented, well understood system, and there should be more (modern) software for it to exploit its full capabilities in comparison to the C=64.

  • @kodiak64
    @kodiak64 Год назад +2

    aAARGHHHHHHHHHH! I know I am being a horrible pedant here, but "assembler" is a program that assembles assembly language. Please call the code itself "assembly language" or "6502" or "assembly".

    • @the8bittheory
      @the8bittheory  Год назад

      I‘ll try :-)

    • @MartinGoodwell
      @MartinGoodwell 4 месяца назад

      As an explanation why I used the term „assembler“ incorrectly here: in german (my native language) the term is actually also used to describe the language. So, I didn‘t think that this could be different in english. Thanks a lot for making me aware! Highly appreciated!

  • @MultiSteve1978
    @MultiSteve1978 Год назад

    Did you try cc65?

    • @the8bittheory
      @the8bittheory  Год назад +3

      Not for this task, but I'm familiar with it.
      The reason I stick with Basic in these videos is that I want to show how easy the VDC-chip is to work with. Of course, all the concepts are applicable to Assembler and C just as well.
      Thanks for your comment :-)

    • @MultiSteve1978
      @MultiSteve1978 Год назад +1

      @@the8bittheory Yes I understand. Might be an interesting video… 😂