Aw: [stella] 6502 ASM question...

Subject: Aw: [stella] 6502 ASM question...
From: cybergoth@xxxxxxxx
Date: Wed, 11 Jun 2003 19:01:26 +0200 (MEST)
Hi Dennis!

> Does anyone know of a quick math method that would get this combination?
> Right now I'm thinking I'll have to check each bit individually.

Well, the quickest solution is (as always ;-)) - a table.

Imagine a master 256 byte table with the numbers from 0-255. 
These are all possible entries.
Now *just* remove all invalid entries. Regarding your current problem, 
I assume the resulting table would be significantly smaller than 128, since both
alone already reduce half of the allowed numbers, right?

Well, in the end you'd generate a random number between 0 and #_of_results_table_entries-1
And read that indexed value from the results table.


Archives (includes files) at
Unsub & more at

Current Thread