spectrum_cmbrot

changeset 4:3ac0c33742cf tip

changed to 8bit arithmetic for the outer loop
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 17 Feb 2014 20:33:39 +0200
parents 8e7f17958dbb
children
files mbrot.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line diff
     1.1 --- a/mbrot.c	Mon Feb 17 18:54:17 2014 +0200
     1.2 +++ b/mbrot.c	Mon Feb 17 20:33:39 2014 +0200
     1.3 @@ -6,7 +6,7 @@
     1.4  
     1.5  int main()
     1.6  {
     1.7 -	unsigned int i, j, k, start;
     1.8 +	unsigned char i, j, k, start;
     1.9  
    1.10  	/* turn the border black */
    1.11  #asm
    1.12 @@ -19,10 +19,10 @@
    1.13  		start = 0;
    1.14  
    1.15  		for(i=0; i<192; i++) {
    1.16 -			unsigned int banky = i & 0x3f;
    1.17 -			unsigned int cell = banky >> 3;
    1.18 -			unsigned int cline = banky & 0x7;
    1.19 -			unsigned int y = (cline << 3) + cell + start;
    1.20 +			unsigned char banky = i & 0x3f;
    1.21 +			unsigned char cell = banky >> 3;
    1.22 +			unsigned char cline = banky & 0x7;
    1.23 +			unsigned char y = (cline << 3) + cell + start;
    1.24  
    1.25  			/*unsigned char *ptr = FB_ADDR | ((i & 0xc0) << 5) |
    1.26  				((i & 0x38) << 2) | ((i & 7) << 8);*/