Write a program to perform the subtraction of two 16 bit numbers.

 Experiment 3 : Write a program to perform the subtraction of two 16 bit numbers.


Program:

MVI A,50H;

STA 8820H;

MVI A,40H;

STA 8821H;

MVI A,30H;

STA 8822H;

MVI A,20H;

STA 8823H;

LHLD 8820H;

XCHG;

LHLD 8822H;

MVI C,00H;

MOV A,E;

SUB L;

STA 8824H;

MOV A,D;

SBB H;

STA 8825H;

HLT;


Output: 





Comments