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

View all notifications
Books Shortlist
Your shortlist is empty

Write a Assembly Language Program to copy a block of data having starting address 4500 H to new location starting from 4600 H. The length of block is stored at memory location 44FF H. - HSC Science (Computer Science) 12th Board Exam - Computer Science 2

Login
Create free account


      Forgot password?

Question

Write a Assembly Language Program to copy a block of data having starting address 4500 H to new location starting from 4600 H. The length of block is stored at memory location 44FF H.

Solution

Label Mnemonics Comments
  LXI H, 44FFH ; Load HL pair with 44FFH
  LXI D, 4600H ; starting address of destination
  MOV C, M ; Move count in Reg. C
  INX H ; Increment HL Pair
LOOP : MOV A, M ; Transfer memory to Acc.
  STAX D ; Store Acc. to new location
  INX H ; Increment HL pair
  INX D ; Increment DE pair
  DCR C ; Decrement count
  JNZ LOOP ; Jump to LOOP if count is not zero
  RST 1.0 ; Restart
  Is there an error in this question or solution?

APPEARS IN

 2016-2017 (March) (with solutions)
Question 5.1.1 | 5.00 marks
Solution Write a Assembly Language Program to copy a block of data having starting address 4500 H to new location starting from 4600 H. The length of block is stored at memory location 44FF H. Concept: Instruction Set and Programming of 8085.
S
View in app×