Assembly program to find subtraction of two signed 8bit numbers 8051
Answers
Answered by
8
16-BIT SUBTRACTION
AIM
To perform 16-bit Subtraction of two 16-bit data using immediate addressing and store the result in memory.
THEORY
Using the accumulator, subtraction is performed and the result is stored. Immediate addressing is employed. The SUBB instruction writes the result in the accumulator.
EXAMPLE:
8600 - MSB of first operand 8601 - MSB of second operand 8602 - LSB of first operand 8603 - LSB of second operand Result 8700 – MSB 8701 – LSB
ASSEMBLY PROGRAM TO SUBTRACT TWO 16 B
AIM
To perform 16-bit Subtraction of two 16-bit data using immediate addressing and store the result in memory.
THEORY
Using the accumulator, subtraction is performed and the result is stored. Immediate addressing is employed. The SUBB instruction writes the result in the accumulator.
EXAMPLE:
8600 - MSB of first operand 8601 - MSB of second operand 8602 - LSB of first operand 8603 - LSB of second operand Result 8700 – MSB 8701 – LSB
ASSEMBLY PROGRAM TO SUBTRACT TWO 16 B
Similar questions