Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/05/01 14:15
Read: times


 
#12202 - RE: Keil C : read two byte?
Hi Andi,

now I test it:

<pre>
#pragma cd
#include<reg51.h>

typedef unsigned int uint;

uint in_p0_p1( void )
{
return P0 | (uint)P1 * 256;
}
the cast (uint) should be used for one operand, if both are char and the result may exceed the size of char. On the Keil it works also without it, but other compilers can generate not the expected code. Peter P.S.: "<pre>", "" seems not working :-(

List of 18 messages in thread
TopicAuthorDate
Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      
RE: Keil C : read two byte?            01/01/70 00:00      

Back to Subject List