Advertisement Remove all ads

Write an Assembly Language program to transfer a block of memory starting from 1050H to 1059H to a new location starting from 1070H to 1079H. - Computer Science 2

Advertisement Remove all ads
Advertisement Remove all ads
Advertisement Remove all ads

Write an Assembly Language program to transfer a block of memory starting from 1050H to 1059H to a new location starting from 1070H to 1079H.

Advertisement Remove all ads

Solution

Label Mnemonics + Operand Comment
  LXI H, 1050 Load content from 1050 to memory
  LXI D, 1070 Load content from 1070 to D reg.
  MVI C , 0A Set counter to 0A H
     
up : MOV A, M Move content from memory to Acc.
  STAX D Store Acc. content to D Reg
  INX H Increment HL pair by 1
  INX D Increment D pair by 1
  DCR C Decrement counter
  JNZ :up Jump If not zero to label up
  RST 1.0 Restart
Concept: Instruction Set and Programming of 8085
  Is there an error in this question or solution?

APPEARS IN

Advertisement Remove all ads
Share
Notifications

View all notifications


      Forgot password?
View in app×