Advertisement Remove all ads

Write an Assembly Language Program to fill the memory locations 4500H to 4504 with the Hexadecimal numbers 09 H to ODH respectively. - Computer Science 2

Write an Assembly Language Program to fill the memory locations 4500H to 4504 with the Hexadecimal numbers 09 H to ODH respectively.

Advertisement Remove all ads

Solution

Label Mnemonics Comments
  LXI H, 4500 ; Initialize HL pa ir with starting add ress
  MVI A, 09H ; A = 09H
  MVI B, 05H ; Count in reg. B
UP: MOV M, A ; Copy data 09H in 4500 H
  INX H ; Increment HL pair
  INR A ; Increment content in A by 1
  DCR B ; Decrement count
  JNZ UP ; Jump to label UP if count in not zero
  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×