[cc65] type conversions again...

Date view Thread view Subject view

From: Shawn Jefferson (sjefferson_at_sd62.bc.ca)
Date: 2002-12-20 00:22:31


*sigh*  I just can't get this to work.  Can somebody help me with this?

char array[40];

I want to assign the address of the array as locations 38 and 39.  I used to have this in my code similiar to the last question I posted (which was working, now doesn't):

array[38] = (unsigned char) &array % 256;
array[39] = (unsigned char) &array / 256;

Help! I've come to the conclusion that I just don't understand these type conversions, or how you are supposed to cast them to get the compiler to do what I want it to.


¯
Shawn


----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-12-20 00:23:04 CET