Parse error: syntax error, unexpected '<' in /home/vintagec/public_html/vcforum/archive/index.php(475) : eval()'d code on line 1
My 5150 Matrix Screensaver [Archive] - The Vintage Computer Forums

PDA

View Full Version : My 5150 Matrix Screensaver


tezza
March 27th, 2008, 02:35 AM
As promised in another forum, here is the code for my 5150 Matrix screensaver. It's pretty basic stuff, if you'll pardon the pun. I have versions of this for all my micros (except for the Macs). Enjoy.

1 REM *** The Matrix for IBM 5150 ***
5 KEY OFF
10 SCREEN 0,1,0,0
20 CLS
30 DIM M(2),I(2)
40 COLOUR 2
50 FOR K=1 TO 2
60 M(K)=(126-32)*RND(1)+32
70 I(K)=INT(M(K))
80 PRINT CHR$(I(K));
90 NEXT K
100 PRINT,
110 GOTO 50

ahm
March 27th, 2008, 06:00 AM
Nice, but why even bother with the 2 matrices?

50 FOR K=1 TO 2
60 M=INT(RND(1)*94+32)
80 PRINT CHR$(M);
90 NEXT K
100 PRINT,
110 GOTO 50

Works nice in MBASIC.

Cheers,
Andy

frozenfire75i
March 27th, 2008, 07:09 AM
Hey Tezza I only get one line of text on the screen. Not the full screen like you showed in the pic!

ahm
March 27th, 2008, 09:47 AM
I only get one line of text on the screen. Not the full screen like you showed in the pic!
Most machines wrap the line when the cursor reaches the right margin. The program takes advantage of that fact.
If your machine doesn't do that, tell us what kind of machine it is and what version of BASIC you're using.

tezza
March 27th, 2008, 10:48 AM
Nice, but why even bother with the 2 matrices?


Hmm..actually they are not needed are they. It's a long time since I programmed in BASIC and I'm guess I'm a tad rusty :)

tezza
March 27th, 2008, 10:53 AM
Hey Tezza I only get one line of text on the screen. Not the full screen like you showed in the pic!

Are you sure you have the comma after the PRINT statement in line 100? That is necessary to tab the numbers across the screen.

frozenfire75i
March 27th, 2008, 05:52 PM
Thanks it works now! Sweet program!

Are you sure you have the comma after the PRINT statement in line 100? That is necessary to tab the numbers across the screen.

vwestlife
May 8th, 2008, 03:26 PM
40 COLOUR 2
Does BASIC use that spelling in countries that use British English? I thought "COLOR" was universal in BASIC.

tezza
May 8th, 2008, 10:13 PM
Does BASIC use that spelling in countries that use British English? I thought "COLOR" was universal in BASIC.

Yes. It's COLOR . When I typed it out I automatically spelt it the way I usually do when typing

Tez