Path: csiph.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: John Ames Newsgroups: comp.sys.apple2.programmer Subject: Re: Linear Feedback Shift Register Date: Thu, 16 Jan 2025 09:36:43 -0800 Organization: A noiseless patient Spider Lines: 16 Message-ID: <20250116093643.000060f3@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Date: Thu, 16 Jan 2025 18:36:47 +0100 (CET) Injection-Info: dont-email.me; posting-host="f76dd331907dd8855f97d22d4ded1c46"; logging-data="3777497"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18GVVSPsheiJtsFp01WpxOLfZxKek2pBlw=" Cancel-Lock: sha1:xzjjoQnP0dSqtJ0nsxbQ0EwCOjY= X-Newsreader: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) Xref: csiph.com comp.sys.apple2.programmer:6322 On Wed, 4 Sep 2024 21:39:53 -0400 Duhast wrote: > Pasted them into a spreadsheet and sorted. It doesn't work. There > are missing numbers, duplicate numbers. What am I doing wrong? Is > there a better method? Punching the assembler snippet into a simulator, it runs as expected, generating a pseudo-random number sequence that doesn't repeat the seed until the 255th byte - so, allowing for the 8192-vs.8196 issue that's already been covered, the problem must be somewhere else. (Interesting notion to pre-generate a table of values and cycle through them; it wouldn't be practical for a larger LFSR size, but for a basic 8-bit one it's certainly a nice way to get fast random numbers!)