Commodore 64 BASIC and KERNAL on Atari 8-bit hardware
github.com
github.com
https://twitter.com/OldTechAdverts
I've been posting those amazing old tech adverts out of magazines 90s, 80s and older. Looking at adverts for retro games, retro electronics and others. Hope to see you there.
>Doing business with Gates was decent, Tramiel said. "He came to see me, tried to sell me Basic, and he told me that I don't have to give him any money, all I had to give him was $3 per unit. I told him I was already married," Tramiel said.
>Tramiel instead told Gates he'd pay a flat fee of $25,000, rejecting the idea of paying $3 for each Commodore 64 sold. "In about six weeks [Gates] came and took that $25,000. Since then he did not speak to me," Tramiel said.
https://www.computerworld.com/article/2813900/innovators-rem...
There are many things that are unfortunate about the way the C64 was shipped. For Commodore, the entire point of the C64 was to slap it together and shove it out the door as quickly and cheaply as possible, to try and capitalize on the unexpected success of the VIC-20, which was itself slapped together when the VIC graphics chip didn't sell.
What's fascinating about the C64 is just how right that "slap it together and shove it out the door" strategy was.
Market price and timing were absolutely key to the C64's early success. All those bugs and missing features? The 3rd party developers would quickly take care of that.
The products that Commodore tried to make good, better than "shove it out the door" quality, like the Plus/4 and C128, were complete duds. Much better design, much better software, and irrelevant.
It might also have contributed to the success of C64 by "encouraging" early use of machine language. BASIC is great, but to truly make C64 shine you do need assembly language.
Notably, it was also pretty trivial to expand BASIC capabilities. A lot of utilities did just that, like adding graphics commands and sprite extensions. Simons' BASIC is probably the most comprehensive example, and it also came as a cartridge.
https://archive.org/details/ataribooks-the-atari-basic-sourc...
See appendix B, memmove() was broken.
There were several derivations. The original authors of Atari Basic produced BASIC XL and BASIC XE on cartridge, each with additional language features. There's also the really cool Altirra BASIC (see https://virtualdub.org/downloads/Altirra%20BASIC%20Reference...) which ships with the Altirra emulator as a tokenized-code compatible, but faster and more featureful, implementation. A version of that was included in the ROM for the new 576NUC+ all-in-one Atari-compatible.
CBM BASIC was a Microsoft product and I think more or less what all the Microsoft BASICs did was convert everything to floats internally--even when not really needed. For example the index in a FOR I=1 to 10 was dealt with internally (and slowly) as a float--including the operation to increment it by 1 or the STEP value.
If Atari BASIC didn't do that it would have made things faster in many situations. Apple's Integer BASIC was faster because it didn't support floats at all, if you could deal with the almost C-style strings IIRC.
It's true there was very little performance gain to using BASIC integer variables, since they'd be converted to floats internally almost always. The one real advantage of integers is that a DIMed array of ints was more compact than an array of floats.
Basically, the web page had a text field next to each movie, and you could type in numbers, then submit a form, and it would reorder your queue.
The obvious thing to do was swap "1" and "2" to flip the order of the top two items. But you could just set the second one to "0.5" and leave the first at "1". When you submitted the form, it would renumber them all with integers.
I think I remember there was a Renumber command that would reset any inserted numbers too?
10 TI$="000000":J=.:FORI=0TO900:J=J+1:NEXT:PRINTTI
20 TI$="000000":J%=.:FORI=0TO900:J%=J%+1:NEXT:PRINTTI
I get, on VICE in PAL mode, 212 jiffies and 256 jiffies respectively.
The reason for this nonsense is that Commodore BASIC does the math in floating point, and converts it to integer after the fact. You can speed this up with
20 TI$="000000":J%=.:K%=1:FORI=0TO900:J%=J%+K%:NEXT:PRINTTI
which gives me 244 jiffies, but still slower, because even though K% is now already an integer and it costs "less" since it is now in a variable instead of being converted from BASIC text, it still requires a roundtrip to the floating point accumulator.
Bottom line: always benchmark.
The 6502 running at 2MHz also helped a lot.
If Apple decided to do an Apple IV (kind of an apology for making the Apple ///) with that, it'd easily smoke an early 386...