Algorithm and flowcharts for Practicals
Algorithm and flowcharts for Practicals
numbers
4. Load the Starting Address of the Block 6. Store the Count of Occurrences
5. Start the Loop to Search for Data Store the value of A into memory
location D000.
Repeat the following steps until the Instruction: STA D000
counter in the B register becomes 0:
7. Stop the Program
a. Load the Data from Memory
End the program execution.
o Move the memory data at the location Instruction: HLT
pointed by HL into the B register.
o Instruction: MOV B, M
b. Compare with AD H
4. Compare Values
The B register, which stores the length Decrement B (outer loop counter) and
of the block, is decremented by 1 for repeat the sorting process for the
loop control. next pass.
Instruction: DCR B
9. End of Sorting