I tried many times to get the full program for this in assembly language:
X = | ((A*B) – (C*D)) | / E
When I multiply A with B and save the resul
Use the sbb command, subtract-with-borrow. It has effect of subtracting its two operands (like sub does), then subtracting one more if the carry flag is set. The carry flag, in turn, should be set (or not set) by the preceeding subtraction from the lower portion registers.
sub ax, cx
sbb bx, dx
Now bx:ax has the result.
Also, modern Intel CPUs have 32-bit registers and arithmetic even in 16-bit mode. The assembler, however, might not support it.