Date : Fri, 03 Apr 2009 14:50:27 +0100
From : dominic@... (Dominic Beesley)
Subject: Bug in the BBC Master RNG?
Ha, well done both, though I was a day late, a good waste of quarter of an
hour of my time ;)
-----Original Message-----
From: bbc-micro-bounces+dominic=brahms.demon.co.uk@...
[mailto:bbc-micro-bounces+dominic=brahms.demon.co.uk@...] On
Behalf Of Rob
Sent: 02 April 2009 12:27
To: BBC micro mailing list
Subject: Re: [BBC-Micro] Bug in the BBC Master RNG?
110 DATA
-1266,-13288,-11837,-4318,-5250,-42403,-3181,-32046,-37965,-15375,-7507,-557
2,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
>
_______________________________________________
bbc-micro mailing list
bbc-micro@...
http://lists.cloud9.co.uk/mailman/listinfo/bbc-micro