Write a subroutine to fill the memory location 2500H to 2509H with values
of FF H.
Answers
Answer:
Algorithm –
Load register pair H-L with the address 2500H
Load register pair D-E with the address 2600H
Move the content at memory location into accumulator
Store the content of accumulator into memory pointed by D-E
Increment value of register pair H-L and D-E by 1
Decrements value of register C by 1
If zero flag not equal to 1, go to step 3
Stop
Explanation:
Answer:
We need to follow the following algorithm:
Step 1: Load register pair H-L with address 2500H.
Step 2: Load register pair D-E with the address 2600H.
Step 3: Move the content at memory location into accumulator.
Step 4: Store the content of accumulator into memory pointed by D-E.
Step 5: Increment value of register pair H-L and D-E by 1.
Step 6: Decrements value of register C by 1.
Step 7: If zero flag not equal to 1, go to step 3.
Step 8: Stop.