OBJECT: Write a program to add two 16 bit hexadecimal numbers with carry.
INSTRUMENT REQUIRED: 8086 Microprocessor Trainer Kit.
|MEMORY LOCATION||MACHINE CODE||OPCODE||OPERAND|
|020A||BE 00 02||MOV||SI,0200H|
|0215||73 02||JNC L1|
|0219||BF 04 02||L1 : MOV||DI,0204H|
To solve the given objective, we have taken two hexadecimal numbers in the memory locations of 0200H and 0203H and added them and stored the result in the memory location of 0204H, we have also stored the carry in the memory location 0206H
To solve the given objective, we have taken the following steps:
- Initialize the counter register CL to 0.
- 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.
- Jump instruction is used that increments the carry counter if there is no carry else increments the carry counter.
- Move the destination index (DI) pointer to point to the memory location where the result is to be stored.
- Move the result from the AX register to the destination using DI.
- Finally increment the DI to point to the location to store the carry bit and move the carry bit to the destination before halting.
|0207H||00 or Return Garbej Value|
RESULT:The addition of the two hexadecimal numbers FFFFh and FFFFh yields FFFEh as the sum and 0001 as the carry.
1. MOV SI,0200H: 16 bit data can be moved using immediate addressing . 0200 is moved to source index.
2. ADD AX,BX: Contents in the accumulator and the base register are added.
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.
Most Important Question for Exam
General purpose register
Data without on the output
Coprocessor is interfaced in MIN mode
Odd bank memory
All the above
Signed numbers go out of their range
All x86 Processor
An Interrupt that can be turned off by the programmer
The Interrupt is Masked or not
Set Interrupt Mask.
Because 8085 Processor has 8 bit ALU.
RST7.5 is a raising edge-trigging interrupt.
RST6.5 & RST5.5
B & C
B & C
None of the above
- 8086 Instruction Hex Code
- Write a program to two add 16 bit Hexadecimal numbers without carry.
- Write a program to two add 16 bit Hexadecimal numbers with carry.
- Write a program to find the greatest number from an array of 10 numbers.
- Write a program to calculate the factorial of a number.
- Write a program to multiply two 16-bit numbers result should be greater than 16 bit.
- Write a program to input 5 numbers and arrange them in descending order.
- Write a program to convert the string data it’s Two’s complement form.
- Write a program to read 8 bit data from Port B. Complement this data & send it back to Port A of
- Write a program to move a block of data from one memory location to another. Input Value
- Write a program to find Gray code equivalent of a Binary number using Lookup Table.
- Microprocessor 8086 Video Play List