The "C" standard requires that operations execute "as if" they were expanded to 'int' width. In many cases compilers can optimize away a lot of code by recognizing that the high order bytes cannot affect the result. Also, the standard requires that 'int' is at least 16 bits. Any compiler that makes an 'int' eight bits is not compliant. The correct type to use in most small systems is 'char', 'signed char' or 'unsigned char' to get an eight bit value. Also, many small system compilers create a non-standard 'bit' type which can take on only a zero or one. Bob Ammerman RAm Systems ----- Original Message ----- From: "William Chops Westfield" To: Sent: Sunday, August 22, 2004 5:07 PM Subject: Re: [EE]: Zilog Circuit Cellar Kit > On Aug 22, 2004, at 11:34 AM, Herbert Graf wrote: > > > Weird how you have to prod the compiler to generate something it should > > have inferred fro the PA_DR register which is only 8 bits. > > > Not really. Standard C rules, you know - stuff frequently is converted > to data types bigger than they need to be. I'm not sure whether it's > considered a bug in an expression like this, but probably not... > > Also, it's clear that the ez80 stuff is aimed at "bigger machine source > compatibility"; presumably they decided it was less important to use > short and efficient data types, so that random tcp/ip applications > would be more likely to work with little effort... > > BillW > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body