Re: [cc65] Possible bug in cc65

From: Johan Kotlinski <kotlinski1gmail.com>
Date: 2012-03-26 18:45:48
> the same two bugs; 1. cputsxy() displays garbage text and; 2. the output for
> rand() is too regular.  I have the code here:
> ... rand()&1); ...

About rand being too regular... I am not looking at the implementation
now, but I would assume it is a linear congruential generator. In that
case, you will get better results by taking the most significant bit.
I.e. rand() & 0x8000u instead of rand() & 1...

Johan
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Mar 26 18:46:22 2012

This archive was generated by hypermail 2.1.8 : 2012-03-26 18:46:25 CEST