Routines 
Prev: $2500  Up: Map  Next: $2552 
Used by the routine at $2241.


$253E  STX $E3  Store the minimum value (m) at $E3.  
$2540  INY  Store 1+Mm at $E4.  
$2541  TYA  
$2542  SEC  
$2543  SBC $E3  
$2545  STA $E4  
$2547  LDA $D41B  Generate a random value (R) in A.  
$254A  SEC  Now A=Rm (if R>=m) or 256m+R (if R<m).  
$254B  SBC $E3  
$254D  CMP $E4  Is 0<=A<=Mm (i.e. m<=R<=M)?  
$254F  BCS $2547  Branch back to generate another random value if not.  
$2551  RTS  Return without first adding m back to A to get R. (This is a bug.) 
Prev: $2500  Up: Map  Next: $2552 