HSC Science (Computer Science) 12th Board ExamMaharashtra State Board
Account
It's free!

User


Login
Create free account


      Forgot password?
Share
Notifications

View all notifications
Books Shortlist
Your shortlist is empty

Solution - Write an Assembly Language Program to Multiply a Number Stored At Location 1050 with a Nunber at Location 1051. Result is 2-byte. Store Result at Locations 1052 and 1053. - HSC Science (Computer Science) 12th Board Exam - Computer Science 2

Question

Write an Assembly Language Program to multiply a number stored at location 1050 with a nunber at location 1051. Result is 2-byte. Store result at locations 1052 and 1053.

Solution

Label Mnemonics Comments
  SUB A clear the accumulator
  MOV D, A clear the D register
  LXI H, 1050H load immediately 1050 to HL pair
  MOV B, M move memory to B reg.
  INX H increment HL pair
  MOV C, M move memory to C reg
BACK: ADD B add B with accumulator
  JNC NEXT jump if not carry to NEXT
  INR D increment D reg.
NEXT : DCR C Decrement C reg.
  JNZ BACK jump if not zero to BACK
  INX H increment HL pair
  MOV M, A move accumulator to memory
  INX H increment HL pair
  MOV M, D move D reg. to memory
  RST 1.0 Restart
  Is there an error in this question or solution?

APPEARS IN

 2015-2016 (March) (with solutions)
Question 4.2.1 | 4 marks
 2015-2016 (March) (with solutions)
Question 5.1.1 | 5 marks
Solution for question: Write an Assembly Language Program to Multiply a Number Stored At Location 1050 with a Nunber at Location 1051. Result is 2-byte. Store Result at Locations 1052 and 1053. concept: Instruction Set and Programming of 8085. For the course HSC Science (Computer Science)
S