This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SHL ??

What makes the function SHL ???

Parents
  • 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.
    - Mark

Reply
  • 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.
    - Mark

Children
No data