Atari Basic internals

I’ve linked to the middle, the meat, of How Atari BASIC Works.  I really like the way that they crammed a pretty decent BASIC interpreter into 8K or 10K (depending on how you count) of ROM.

In comparison, the first BASIC interpreter that I saw that was written in C was a bloated, over-implemented disaster.  (What’s “over implemented”?  It’s when someone decides that “bullet point” features are more important than memory usage, or interpreter efficiency, or usability.  For instance, you wind up with thirteen ways of opening files, or Format statements that output Roman numerals, but the built-in editor stinks and the floating point arithmetic is glacial).

I’m not saying “Go back to assembly.”  I’m saying, “Pay attention.”  To pick some technologies at random: There’s something that makes burning cycles making SOAP or X-Windows faster that’s evil, while the same cycles used to make SmallTalk and maybe Ruby better should be spent with glee.

 

This entry was posted in Rantage. Bookmark the permalink.

10 Responses to Atari Basic internals

  1. Marcin says:

    Landon, thanks so much for next excellent blog entry!
    Currently I am trying to refresh my 8-bit Atari assembler skills. It is better than puzzle, reversi, sudoku or something like that. The only problem is time… In the past, time was not a problem but lack of documentation, books (especially here in Poland) and good examples. Nowadays… there is much more than you need. It can crush you.
    I hope I find the right way to play with cpu 6502, antic and gtia again 😉

    Sorry, shame on me, but I do not understand what you are saying in following words:
    “There’s something that makes burning cycles making SOAP or X-Windows faster that’s evil, while the same cycles used to make SmallTalk and maybe Ruby better should be spent with glee.”
    My English is not enough here. Could you or a reader explain me or express it in other words?

    Greetings and thanks,
    Marcin

  2. Oisín says:

    It’s a fun read due to it being commented source, which is hugely different from uncommented, symbol-stripped disassembly:

    lda pstat,x ; in die-state?
    cmp #BSDIE
    beq :1 ; yes, so just die

    lda ccstat ; are we dead?
    bmi :2 ; nope…just hit by the hammer….

    lda alivep ; Pt alive?
    bpl :1 ; yes, unequivocally

    There’s a few Pink Floyd/etc quotes in there too.

  3. Oisín says:

    Oops, I posted on the wrong entry!
    *coughs*

  4. landon says:

    @Marcin: I’m trying to say that spending cycles making bad stuff better, without addressing its fundamental problems, is bad, while spending cycles making fun stuff fun is good.

    I’m not actually very deep, nor very clear.

  5. Marcin says:

    @Landon: I got you. Thanks.

  6. John says:

    I love your blog. You bring me back to one of the best times in my life where I could totally be swallowed up in computers. Not that I don’t have my fair share of them being a developer for a living but it’s not quite the same experience.

    I broke out my TRS-80 Model 4D the other day to play with it. Soon my Atari 800XL will get the same treatment.

  7. William Mayo says:

    @ {I’m trying to say that spending cycles making bad stuff better, without addressing its fundamental problems, is bad, while spending cycles making fun stuff fun is good.}

    Hey… the X Windows system isn’t so…. well, it’s getting bett…. well…. It networks real… something.

    In all seriousness, I do think the XOrg people are finally starting to hit some of the evil out of it. And no inadvertent breakage of Ubuntu for night on a year now!

  8. landon says:

    @William: A joke I heard a long time ago …

    Two hackers are talking at the 1988 Usenix conference:

    Hacker 1: “Well, I think that Mach is the worst case of intellectual fraud that I’ve seen here this year.”

    Hacker 2: “What about X Windows?”

    Hacker 1: “I said *intellectual* fraud.”

    X always seemed to me to be architected around stuff I didn’t care about at all (its networking aspect), with poor tools, poorer design sense, and miserable UI guidelines. All the wrong stuff in one pot. Linux could do worse than to do something else (maybe — well, probably — some projects *have*, and it’s just that X is ingrained and inseperable now).

  9. geoff says:

    “or Format statements that output Roman numerals”

    Is that a cheap shot at Common Lisp? 🙂

  10. landon says:

    What’s cheap about it?

    (I happen to like Common Lisp. I figure the committee got enough stuff right that they earned the karma for some silly or busted features).

Leave a Reply to Oisín Cancel reply

Your email address will not be published. Required fields are marked *