Micro processor Lab Manual / subtraction of two 8-bit numbers without using SUB/SBB

Program Name

Write a Assembly Language Program for subtraction of two 8-bit numbers without using SUB/SBB.
Theory
Instruction Mnemonic Operand Comments
MVI A,05 Move the 1st input of subtraction into accumulator
CMA Compliment the content of accumulator
INR A Increment the content of accumulator
MVI B,08 Move the 2nd input of subtraction into register B
ADD B Add the content of register B with accumulator and store in it
STA 8200 Store the content of accumulator i.e. result in 8200
HLT Stop
Program Code


Online compiler for 8085 Microprocess Compiler


Home     Back