Re: [stella] ASM comparison question

Subject: Re: [stella] ASM comparison question
From: eeid@xxxxxxxxx
Date: Wed, 25 May 2005 10:23:31 -0400
It's been a _long_ time since I looked closely at assembly code, so I 
might be off a bit.  :)

Here's what I observed...

First, if the value generated is below 9, then you are adding 9 to the 
number.  Won't this cause some numbers - particularly 9 through 17 (0+9 
through 8+9) - to be favored more than others, since there'd be two ways 
("natural" and by addition) to generate them?  It might be better to 
generate a number between 0 and 140, then add 9 to the result.  (Plus, 
this way you don't have to check if the number is higher than a low limit!)

Second, after the sbc #149 statement, you have a bcs to .checkLowerRange.  
However, the very first statement in .checkLowerRange is a bcs 
to .checkUpperRange.  Was this intentional?  Unless the carry flag is 
cleared automatically upon the branch, then you miss out on the adc #9 

Hope this helps!

- Erik

This message was sent using Endymion MailMan.

Archives (includes files) at
Unsub & more at

Current Thread