We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
What makes the function SHL ???
Pardon? What is "the function SHL?" - it's not a standard C51 thing (not in the Library Reference). Could you re-phrase/expand the question?
SHL? Do you mean Shift-Bit Left? If so, there is no function; it is a C operator that is implemented using the RLC assembler instruction. The 8051 has no shift instruction. To shift:
unsigned char var = 0x01; unsigned int bigVar = 0x8000; char <<= 1; // shift var left by one. bigVar >>= 4; // shift bigVar right by 4.
A51 has a SHL operator which does a shift-left. It's not a function.
That's for the pre-processor, it is not for generating instructions. Ex:
MOV R6,#1 OR (MSK SHL 4)