• Please review our updated Terms and Rules here

My 5150 Matrix Screensaver

tezza

Veteran Member
Joined
Oct 1, 2007
Messages
4,731
Location
New Zealand
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
 
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
 
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.
 
Back
Top