vinodstanur
Advanced Member level 3
- Joined
- Oct 31, 2009
- Messages
- 751
- Helped
- 114
- Reputation
- 234
- Reaction score
- 114
- Trophy points
- 1,333
- Location
- Kerala (INDIA)
- Activity points
- 7,054
in a HTC compiler, how can I shift the bits of a port ,say PORTB , to left?
now I follow ;
int a;
(a=1);
PORTB=a*2;
but I think, the above procedure will not work when 8-bit PORTB value exceeds 255 (decimal).
so, as in 8086 instruction set, there is SHL,SHR,ROR etc, how could i use similar instructions in C (for HTC compiler).
now I follow ;
int a;
(a=1);
PORTB=a*2;
but I think, the above procedure will not work when 8-bit PORTB value exceeds 255 (decimal).
so, as in 8086 instruction set, there is SHL,SHR,ROR etc, how could i use similar instructions in C (for HTC compiler).