EEE Project
EEE Project
16 BIT ADDITION
Ex. No.: 1(b)
Date
Aim
MULTIBYTE ADDITION
MOV RO,#00H
MOV DPTR,#4201H
MOVA,#B2H
ADD A,#96H
MOVX @DPTR.A
INC DPTR
MOV A,#A8H
ADDC A,#BCH
MOVX @DPTR,A
INC DPTR
JNCNEXT
INC RO
No
If C=1
Yes
Increment R0
Stop
9
Procedure
16-BIT SUBTRACTION
Ex. No.: 4
Date
: D4lot/24
Aim
Procedure
Mnemonics
Memory address Op-code
CLRC
Ao0 C3 MOV DPTR,#4201H
Aln0 A2
AD 3 MOV A,#C3H
A10A A
A10 C
SUBB A, #5BH
94
MOVX @DPTR, A
INC DPTR
AB
MOV A,#D6H
14
pb SUBB A,#A9H
210c
MOVX@DPTR,A
AnE HALT 8JMP HALT
A10P 30
4201 H (LSB)
4202 H 2D (MSB)
Proof
Irdr
1010 Io
D
2
here Halt ; HALT SJMP HALT
result MSByte
of the Sto.e @DPTR,A
; MOVX
Acc result
in MBByte
of the Place A,B MOV
address next the Create ; DPTR INC
result LSByte
of the Store @DPTR,A MOVX
address next the Create ; DPTR INC
data tWo Multiply
the ; AB
MUL
Acc in
data next the Get ; DPTR @
MOVX
A,
address next the Create ; DPTR INC
register Bin
data first the Place ; B,A MOV
Acc in
data first the Get DPTR A,@ MOVX
DPTR data
in first address
of the Load DPTR,#4201H
; MOV
Program
-1Microcontroller
kit8051
required Apparatus
4204H. and 4203H tions
loca
memory result
in the store and4202H, and4201H locations memory placed
in
hexadecimal
data numbers
of multiplving
two for ALP execute
an and write To
Aim
Date
No.2: Ex.
MULTIPLICATION BIT 8
11
14
8BIT MULTIPLICATION
Instructions
Memory address Op-code MOVDPTR,#4201H
A\02 MOVXA,@DPTR
Fo
MOV B,A
MOV A,B
MOVX @DPTR,A
AlbE
HALT SJMP HALT
ADE.30FE
Datainput table
|Address Data
4201 H b2
4202 H
4204 H
register Acc result result
data the theregister
in
B data of
in two of Acc
in
placed byte
data second byte B Stop
Start the higher
in
first Multiplylower placed
the the
the the
Place Place Store
Store
Chart
Flow
Procedure
1. Switch ON the microcontroller (8051) kit.
2. Enter the op code of program one by one.
3. Enter the data input.
4. Execute the program.
5. Note its output.
6. Verify its output.
7. Switch OFF the microcontroller kit.
17
Ex. No.: 6
8BIT DIVISION
Date : l/ot/24
Aim:
Procedure
1. Switch ON the microcontroller (8051) kit.
2. Enter the op code of program one by one.
3. Enter the data input.
4. Execute the program.
5. Note its output.
6 Verify its output.
7. Switch FF the microcòntroHer kit,
Resut
The ALP for 8-bit division is executed and its result is verified.
16
8BIT DIVISION
Memory-addrgss Op-code Instructions
MOV DPTR,#4201 H
y 9 o -
MOVX A,@DPTR
ALOA MOV B,A
INC DPTR
MOVX A;@DPTR
DV AB
AlD9Ag,
Ag ING DPTR
AlDA fo MOVX,@DPTR,A
AlDB Ag INCDPTR
MOV A,B
ADD
A10E MOVX @DPTR,A
G
Data input table
|AddresS Data
|4201 H
(Denominator)
4202 H
(Numerator)
Data output table
|A\ddress Data
|4203 H' (Quotient)
4204 H (Re