Sunday, July 19, 2009

BASIC Program

This is my 80th post. YEAH! To celebrate, I decided to post about a recent endeavor, trying to type BASIC programs into my old Atari 800 computer. I realize this is very geeky. Oh well.

This is a little test program. It is a looping program that prints a number, starting with 1, then that number to the 2nd power, then that number to the 3rd power, then the number to the 4th power. To calculate these exponential numbers, the little microprocessor of the Atari 800 is really maxing itself out, at least with the 4th power.

Here we go:

10 FOR INDEX = 1 TO 10000
20 PRINT "=================="
30 PRINT INDEX
40 PRINT INDEX^2
50 PRINT INDEX^3
60 PRINT INDEX^4
70 PRINT
80 PRINT CHR$(128), CHR$(164), CHR$(123)
90 NEXT INDEX
100 END


Now give yourself 1,000 Geek Points if you can actually understand this code. HINT: it's known as BASIC. Personally, I have never encountered anything basic about writing a computer program. It's all hard to figure out.

No comments: