I have completed the simple version of the slot machine for the C64. But while programming this, I have learned that although it was the #1 selling computer of all time, it really was not as good as the computers that came out at the time. I have started documenting these short comings of the C64 BASIC.
First lets talk about variables. C64 could only have 2 character variables. I was stumped by this. This is a horrible flaw.
Here is a very simple demo with Atari XE computer and the TI-99/4A


Very simple and what one would expect. Here is the same code on the C64.

See what is going on here? All three variables are the same on the C64
So, if I make three variables; SB1, SB2, and SB3... to the C64, they are all the same variable - SB.
I can't believe this was OK for back in 1984. But in all fairness, Apple II computers had the same issue.
That said, I always hated programming on the Apple II back in the day and I don't remember this issue either.
The next issue was the limitation of the CHR$(X) that could be used on a single print line. this could be quite helpful with old BASIC. More than 5 on the C64, and the line would not PRINT. Luckily there is a work around for this. End that line with a ";" and then continue with another PRINT statement .

Above is a screen shot of Atari 8-bit computer showing that it can string along beyond what the C64 can.
My third beef with the C64 BASIC is that you can not add remarks on a DATA statement. I'm pretty sure any other command that I found you can, but not on the DATA. This is the one statement that could really use such a feature.
120 DATA 00,255,255,14,14,28,56,56
work around is just adding a REM on the line above. But the whole idea of adding one cat'ed on the end is to make useful notes for each line that might need a comment.
In all fairness the TI-99/4A will not allow REM at the end of the line
No comments:
Post a Comment