Purpose: To visualize complete data fl ow along with data processing.
Problem
Assume that memory locations, 04H and 05H, contain two unsigned 8-bit numbers. Write a program to add
these two numbers and store it in memory location 30H. Assume that register bank #0 is selected.
Solution
Locations 04H and 05H become R4 and R5 of the current bank, respectively. erefore, following steps may
be planned:
Step 1: Copy one operand, say R4, in the accumulator.
Step 2: Add the accumulator with the other operand, that is R5.
Step 3: Copy the result in the accumulator to location 30H.
Following instructions are necessar ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.