OBJECT:Write a program to add two 16 bit hexadecimal numbers without carry. INSTRUMENT REQUIRED:8086 Microprocessor Trainer Kit. PROGRAM:
To solve the given objective, we have taken two hexadecimal numbers in the memory locations of 0200H and 0202H and added them and stored the result in the memory location of 0204H. To solve the given objective, we have taken the following steps:
Move the source index register (SI) pointer to the location of the first number.
Store the first number in the AX register using SI.
Double increment the SI pointer to point to the memory location of the second number.
Store the second number in the BX register using SI.
Now apply ADD operation to add the numbers in the registers AX and BX and store the result in AX.
Move the destination index (DI) pointer to point to the memory location where the result is to be stored.
Finally move the result from the AX register to the destination using DI 8. HLT to Halt or End the program.
RESULT: The addition of the two hexadecimal numbers 3A1CH and 2B1CH yielded 652CH
1. MOV SI, 0200H:
16 bit data can be moved using immediate addressing . 0200 is moved to source index.
ADD AX, BX: contents in the accumulator and the
base register are
3. INC SI: The content of a specified 8-bit or 16-bit register or memory location(s) is incremented by one by this instruction.
4. HLT: This instruction stops program execution. The processor stops fetching and executing instructions.