<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Thu, 02 Apr 2009 12:26:40 +0100
From   : robert@... (Rob)
Subject: Bug in the BBC Master RNG?

110 DATA -1266,-13288,-11837,-4318,-5250,-42403,-3181,-32046,-37965,-15375,-7507,-5572,0

:-)

Rob


2009/4/1  <me@...>:
> I appear to have found a bug in the BBC Master's Random Number
> Generator. When seeded with multiple particular values, the machine
> crashes in a rather spectacular fashion. (Scared the hell out of me
> the first time it happened.)
>
> Here's part of a BASIC program that causes it to happen, for your
> enjoyment. (The bug doesn't seem to affect the regular BBC Micro.)
>
> 10 ?REPEAT
> 20 ?READ A%
> 30 ?IF A%=0 THEN END
> 40 ?A%=RND(A%)
> 50 ?FOR A%=1 TO 3
> 60 ?A$=CHR$(64+RND(27))
> 70 ?IF A$=CHR$(91) THEN A$=" "
> 80 ?PRINT A$;
> 90 ?NEXT A%
> 100 UNTIL FALSE
> 110 DATA -25146,-13589,-18994,-17877,0
>
> --
> David Glover
> http://www.davidglover.org/
>
>
> _______________________________________________
> bbc-micro mailing list
> bbc-micro@...
> http://lists.cloud9.co.uk/mailman/listinfo/bbc-micro
>
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>