HSC Science (Computer Science) 12th Board ExamMaharashtra State Board
Share
Notifications

View all notifications
Books Shortlist
Your shortlist is empty

Write an Assembly Language Program to exchange the nibbles of 8-bit number stored in memory location 4500H. Store the result at memory location 4501H. - HSC Science (Computer Science) 12th Board Exam - Computer Science 2

Login
Create free account


      Forgot password?

Question

Write an Assembly Language Program to exchange the nibbles of 8-bit number stored in memory location 4500H. Store the result at memory location 4501H.

Solution

Label  Mnemonics  Comments
  LXI, 4500 H ; Set H-L pointe r to 4500 H
  MOV A, M ; take no. in  accumulator
  RRC ; with 4 RRC instructions
  RRC ; Interchange the digits of the no.
  RRC  
  RRC  
  INX H ; Increment HL pair by 1
  MOV M, A ; store the exchanged no. in 4501 H
  RST 1.0 ; Restart
  Is there an error in this question or solution?

APPEARS IN

 2016-2017 (March) (with solutions)
Question 5.2.1 | 5.00 marks
Solution Write an Assembly Language Program to exchange the nibbles of 8-bit number stored in memory location 4500H. Store the result at memory location 4501H. Concept: Instruction Set and Programming of 8085.
S
View in app×