17.02.2015 Views

CCS C Compiler Manual PCB / PCM / PCH

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

except it is done with a single byte move.<br />

Availability:<br />

Requires:<br />

All devices<br />

Nothing<br />

Examples:<br />

int32 x;<br />

int y;<br />

y = make8(x,3); // Gets MSB of x<br />

Example Files:<br />

Also See:<br />

None<br />

make16(), make32()<br />

make16( )<br />

Syntax:<br />

Parameters:<br />

Returns:<br />

Function:<br />

Availability:<br />

Requires:<br />

i16 = MAKE16(varhigh, varlow)<br />

varhigh and varlow are 8 bit integers.<br />

A 16 bit integer<br />

Makes a 16 bit number out of two 8 bit numbers. If either parameter is 16 or<br />

32 bits only the lsb is used. Same as: i16 =<br />

(int16)(varhigh&0xff)*0x100+(varlow&0xff) except it is done with two byte<br />

moves.<br />

All devices<br />

Nothing<br />

Examples:<br />

long x;<br />

int hi,lo;<br />

x = make16(hi,lo);<br />

Example Files:<br />

Also See:<br />

ltc1298.c<br />

make8(), make32()<br />

218

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!