title: What do bitshift operations in Intel 8085 assembly do?
body: <p>I am trying to explain to myself the following 8085 assembly code</p>
  
  <p>I have this code that asks for two numbers (from a virtual keyboard within the IDE) and displays them on LEDs 7 and 8:</p>
  
  <pre><code>.ORG 0000
  
  CALL DATA
  MOV C,A
  CALL PRNT
  
  CALL DATA
  MOV E,A
  CALL PRNT
  
  MVI D,00H
  MOV L,E
  MVI H,00H
  
  MOV A,C
  DCR A
  JUMP:
  DAD D
  DCR A
  JNZ JUMP
  
  MOV A,L
  DAA
  JMP IMPR
  
  RET
  
  DATA:
  MVI A,00000000B
  OUT 00H
  IN 00H
  RLC
  RLC
  RLC
  RLC
  ANI F0H
  MOV B,A
  MVI A,00000000B
  OUT 00H
  IN 00H
  ANI 0FH
  ORA B
  RET
  
  IMPR:
  MOV B,A
  
  ANI F0H
  RLC
  RLC
  RLC
  RLC
  CALL NUMZ
  OUT 06H
  MOV A,B
  ANI 0FH
  CALL NUMZ
  OUT 07H
  RET
  
  NUMZ:
  CPI 00H
  JNZ ONE
  MVI A,01110111B
  JMP EXIT
  
  ONE:
  CPI 01H
  JNZ TWO
  MVI A,01000100B
  JMP EXIT
  
  TWO:
  CPI 02H
  JNZ THREE
  MVI A,00111110B
  JMP EXIT
  
  THREE:
  CPI 03H
  JNZ FOUR
  MVI A,01101110B
  JMP EXIT
  
  FOUR:
  CPI 04H
  JNZ FIVE
  MVI A,01001101B
  JMP EXIT
  
  FIVE:
  CPI 05H
  JNZ SIX
  MVI A,01101011B
  JMP EXIT
  
  SIX:
  CPI 06H
  JNZ SEVEN
  MVI A,01111011B
  JMP EXIT
  
  SEVEN:
  CPI 07H
  JNZ EIGHT
  MVI A,01000110B
  JMP EXIT
  
  EIGHT:
  CPI 08H
  JNZ NINE
  MVI A,01111111B
  JMP EXIT
  
  NINE:
  CPI 09H
  JNZ SAL
  MVI A,01001111B
  JMP EXIT
  
  EXIT:
  RET
  </code></pre>
  
  <p>I'm not including <code>PRNT</code> because it's not important for my question.</p>
  
  <p>I understand <code>.ORG 0000</code> which is the start of the program - it's like <code>BEGIN</code> in Pascal.</p>
  
  <p><code>CALL DATA</code> is a subroutine which fills the Accumulator with binary zeros and shows them (?) in port 0 (00H in hex), then it gets (from the virtual keyboard) a number and <em>then</em> it's rotated left in a bit shift operation.</p>
  
  <p>My question is why ? What's the point in doing so ? What's the benefit ? I have read about it in Wikipedia but I still don't get it. What does it do in this code and why is it needed ?</p>