Advertisement Remove all ads

A two byte number is stored at location COOO H and COOl H. Write on Assembly Language Program to rotate this number to left side by 3 places and store the rotated number in BC register pair. - Computer Science 2

Answer in Brief

A two-byte number is stored at location C000 H and C001 H. Write on Assembly Language Program to rotate this number to the left side by 3 places and store the rotated number in the BC register pair.

Advertisement Remove all ads

Solution

Label Mnemonics + Operand Comment
  LHLD C000 ; Load HL pair from C000 memory location
  DAD H ; Add register pair to HL pair
  DAD H ; Add register pair to HL pair
  DAD H ; Add register pair to HL pair
  SHLD BC ; Store HL pair to BC register pair
  RST 1.0 ; Restart                                                              
Concept: Instruction Set and Programming of 8085
  Is there an error in this question or solution?
Advertisement Remove all ads

APPEARS IN

Advertisement Remove all ads
Advertisement Remove all ads
Share
Notifications

View all notifications


      Forgot password?
View in app×