Add Two 8 Bit Number
Sunny Bhaskar
11/6/20241 min read
Algorithm
Load the first number (04H) into the accumulator.
Add the second number (02H) to the contents of the accumulator.
Store the result in a specified memory location (e.g., 2050H).
Halt the program.
Program
MVI A, 04H ; Load 04H into accumulator A
ADI 02H ; Add 02H to A
STA 2050H ; Store the result (06H) at memory location 2050H
HLT ; Halt the program