Documente Academic
Documente Profesional
Documente Cultură
EVD16I001:-
EXERCISE-3:
Aim: To perform mul plica on and division of two 8-bit,16-bit numbers, addi on
of two matrices and finding the square of a number by using 8086
microprocessors.
REQUIREMENTS:
THEORY:
The following are the instruc ons that I had used in my code:
● 1.MOV
Syntax: operand1 MOV operand2
The MOV instruction copies operand2 into operand1. In this program,
it is used to copy the data at a specific memory location into a
register, and the data in a register into a specific memory location.
2.INC
Syntax: INC operand
The INC instruction increments operand, so that operand = operand
+1. In this program, it operates on the memory location. It is used to
move to the next memory location after storing an integer, in order to
store the next one.
3.ADD
Syntax: operand1 ADD operand2
The ADD instruction adds the values of operand1 and operand2, and
stores the result in the place of operand1. In this program, the
operands are the values stored in the registers.
4.MUL:
Syntax: MUL multiplier
There are two instructions for multiplying binary data. The MUL
(Multiply) instruction handles
unsigned data and the IMUL (Integer Multiply) handles signed data.
Both instructions affect the
Carry and Overflow flag.
5.DIV:
Syntax: DIV divisor
This instruction is used to divide an unsigned 8-bit or 16-bit number.
The dividend should be stored
at AX. The divisor can be in a register or a memory location. After the
division ,AL will contain the 8-
bit quotient, and AH will contain the 8-bit remainder, AX will contain
the quotient, and DX will
contain the remainder for a 16-bit division.
1.GO Address of the program will execute the program that hold the
address
2.U with address of the program next to it helps the user to see the code
which has
3.A with address of the instruc on next to it helps the user to edit the
instruc on
in the program.
4.SW with address next to it takes a 16-bit input and SB with address next
to it
CODING
INSTRUCTION OPCODE
Program Address-1700
INC SI 46
MUL BL F6E3
HLT
Calculations:
02
+0 3
-----------
05
-----------
INSTRUCTION OPCODE
Program Address-2200
INC SI 46
INC SI 46
DIV BL F4E3
HLT F4
Calculations:
0010
/0 0 0 2
-----------
0005
-----------
INSTRUCTION OPCODE
Program Address-2700