Addressing Modes in 8051 Microcontroller

 
Addressing Modes
in
8051 MC
 
S. Lourduraj
Asst. Prof. of Physics
St. Joseph’s College.
 
A
ddre
s
s
i
ng 
M
ode 
M
C 8051
Method of specifying  the data to be operated by the instruction
CPU can access the data in various ways.
   
-- 
data could be in reg./Memory/immediate value.
 
I
s
 
a
 
w
a
y
 
th
e
 
M
C
 
t
o
 
acces
s
 
d
at
a
 
/ op
eran
d
 
f
r
om
 
i
n
terna
l
m
e
m
o
r
y
 /
external memory (or)Register 
spe
cific Ports
.
 
 
Th
e
 
us
e
 
of
 
e
f
f
i
c
i
en
t
 
m
od
e
s
 
of
 
a p
r
og
ra
m
 
(
a
dd
ress
i
n
g
m
od
e
)
 
w
i
l
l 
i
ncreas
e
 
th
e
 
p
r
o
cess
i
n
g
 
s
p
ee
d
 
of
 
CP
U 
a
s
 
we
l
l
a
s
 
p
r
o
cess
i
n
g
 
ti
m
e
 
ca
n
 
be 
sh
o
rtene
d.
 
Types of Addressing Modes
 
1.
Register Addressing Mode
2.
Direct Addressing Mode
3.
Register indirect Addressing Mode
4.
Immediate Addressing Mode
5.
Indexed Addressing mode
 
 
Type of Addressing Mode MC 8051
 
1. Reg
i
st
er 
A
ddre
ss
i
n
g 
m
ode
-  
Instruction will specify the name of the Reg. in which data is available
This 
addre
ssi
ng
 
i
n
s
t
ru
c
t
io
n
 
i
n
volv
es 
i
nf
o
r
m
a
ti
o
n
 
tran
s
f
er
 
bet
w
e
en
reg
is
t
ers
  
(
at 
l
ea
s
t
 
o
ne
 
o
f
 
the
 
R
0
-
R7
 
reg
i
s
ter
 
i
n
vo
l
v
ed)
i)
Source & Destination reg.’s match in Size:
   
Eg:
 
MOV A, R0                MOV R2, A  
  
  ADD  A, R5
   
Eg:   
MOV  R4, R5
     (Invalid Instruction)
ii)
Size of  Source & Destination will vary:
   
Eg:    MOV   DPTR, A     (Error)         MOV  DPTR, #12A3H
         
MOV  R2, DPL
         
MOV   R1, DPH
 
1. Reg
i
st
er 
A
ddre
ss
i
n
g 
m
ode
 
 
E
x
a
m
p
l
e
:
A
DD
 
A
,
 
R7
 
  
          
;
 
ad
d
 
co
nt
e
nt
 
o
f
 
A
 
w
i
th
 
the
 
co
n
t
e
nt
 
o
f
 
R7
M
OV
 
R
0
,
#0
0
         
 
;
 
mo
v
e
 
da
ta
 
0
0
 
to
 
t
he
 
r
eg
i
s
t
e
r
 
R0
D
J
NZ 
 
R
3
,
 
L
O
O
P           
;
 
D
ec
r
eme
nt
 
co
n
t
e
nt
 
o
f
 
R3
 
a
nd
      
J
u
m
p
 
if N
o
t
 
L
OOP
M
OV
 
R
0
,
 
A
                  
;
 
The
 
i
n
s
t
r
u
c
ti
o
n
 
t
r
a
n
s
f
e
r
s
 
the
 
co
nt
e
nt
 
o
f
    
     
a
c
c
u
m
ul
a
t
o
r
 
A
 
i
nto
 
the
 
R0
 
r
eg
i
s
t
e
r
.
 
2. D
i
r
e
c
t 
A
ddre
ss
i
ng
 
m
ode
 
 
The Address of the data is directly specified in the instruction
 
The entire 128 bytes of  RAM can be accessed with memory locations 30H to 7FH
Eg:
 
 
 
 
 
Eg:
M
O
V 
 
A,
 
P
3     
 
 
; 
Tr
an
s
f
e
r
 
t
he
 
c
on
te
n
t
s
 
of
 
P
o
r
t
 
3
 
t
o 
t
he a
cc
umu
l
a
t
or
M
O
V 
 
A,
 
020
H
 
 
; 
Tr
an
s
f
e
r
 
t
he
 
c
on
t
e
n
t
s
 
o
f
 
RAM
 
l
o
c
a
ti
on
 
2
0
H 
t
o 
t
he
    
a
cc
um
u
l
a
t
or
M
O
V
  P
1, A
A H  
 
 
;
 
Tr
an
s
f
e
r
 
t
he
 
c
on
te
n
t
s
 
of
 
A
 
t
o
 
P
o
r
t
 
1
M
O
V
  
2
0
H,
 
4
0H
 
;
 
Tr
a
n
s
f
e
r
 
t
he
 
c
on
te
n
t
s
 
of
 
t
he
 
a
d
dr
es
s
 
4
0
H
 
t
o 
t
he
 
a
ddr
ess 
2
0
H
ADD
  
A,
 
55
H     
 
;
  
A
d
d 
 
t
h
e
 
c
on
te
n
t
s
 
of
 
A
 
wit
h
 
t
he
 
c
on
te
n
t
s
 
of 
t
he
 
a
ddr
es
s
 
 
5
5
H
 
MOV  A, 7
OR
MOV A, R7  (OR)   MOV   A, 7
 
MOV R0, 40H
MOV R4, 7FH
 MOV  40H, A
 
MOV R2, #5
                           R2=05H
MOV  B, 2
 
MOV  4, 2    
(OR)  
MOV  R4, R2
 
Valid memory Address for Direct
Addressing Mode
 
 
 
 
P1(80H),
P1(90H),
P2(A0H),
P3(B0H) &
PSW(D0H)
PSW(D0H)
 
A
d
d
r
e
s
s
a
b
l
e
 
m
e
m
o
r
y
 
u
s
e
d
 
b
y
 
d
i
r
e
c
t
 
a
d
d
r
e
s
s
i
n
g
 
m
o
d
e
f
r
o
m
 
0
0
 
t
o
 
7
F
 
a
n
d
 
a
l
s
o
 
a
d
d
r
e
s
s
 
s
p
e
c
i
f
i
e
d
 
b
y
 
s
p
e
c
i
a
l
 
r
e
g
i
s
t
e
r
 
3. Register 
I
nd
i
re
c
t 
A
ddre
ss
i
ng
 
m
ode
 
    
A
 
reg
i
st
e
r
 
i
s
 
u
s
e
d
 
to
 
h
o
l
d the
 
e
ff
e
ct
i
ve
 
addre
s
s
 
o
f
 
t
he
 
oper
a
n
d
.
    
Th
i
s
 
reg
i
st
e
r
,
 
w
h
i
ch
 
h
o
l
d
s
 
t
he
 
add
r
e
s
s
,
 
i
s
 
c
a
ll
e
d
 
t
he
     
Po
in
t
e
r  
reg
i
st
e
r
 
a
nd
 
i
s
 
s
a
i
d
 
to
 
p
o
i
nt
 
to
 
t
he
 
opera
n
d
.
    
O
n
l
y
 
reg
i
st
e
r
s
 
R0
,
 
R
1
 
a
nd
 
D
PTR
 
c
a
n
 
b
e
 
us
e
d
 
a
s
 
po
i
n
t
e
r
         
 
reg
i
st
er
s.
R
0
 
a
nd
 
R
1
 
r
eg
i
st
er
s
 
c
a
n
 
h
o
l
d
 
a
n
 
8
-
b
i
t
 
addre
ss
 
w
h
er
e 
a
s
 
D
PTR
 
c
a
n
 
h
o
l
d
 
a
 
16
-
b
i
t
 
addre
s
s.
 
   
D
PTR
 
i
s
 
u
s
e
f
ul
 
i
n
 
a
c
c
e
s
s
i
ng
 
opera
n
d
s
 
w
h
i
ch
 
ar
e
 
i
n
 
t
he
 
         
e
xt
er
n
a
l
 
m
e
m
or
y.
 
3
. 
I
nd
i
r
e
c
t 
A
dd
r
e
ss
i
n
g 
m
od
e (
c
o
n
t’
d
)
 
E
x
a
m
p
l
e
s:
MO
V
 
@ 
R0
, 
A
   
;
S
t
ore
 
t
he
 
c
on
te
nt
 
of
 
a
cc
u
mu
l
a
t
o
r
 
i
n
t
o
 
t
he m
e
mory
 
l
o
c
a
t
i
on
 
p
o
i
n
te
d
                          
 
 t
o
 
b
y 
 
t
he
 
c
on
t
e
n
t
s
 
of
 
r
e
g
i
s
t
e
r 
R0
.
 
R
0
 
c
ou
l
d
 
have
 
an
 8-
b
i
t
   
a
d
d
r
ess
,
 
s
u
c
h
 
as
 
6
0
H.
 
 
 
 
 
 
 
 
MO
V
 
A
,
 
@
R
0
 
 
;
 
move
 
t
he
 
c
on
te
n
t
s
 
of 
RA
M
 
at
 
l
o
c
a
t
i
o
n 
d
es
i
g
na
t
e
d
 
b
y 
 
R
0 
 
i
n
t
o
  
   
  
 
a
cc
umu
l
a
t
o
r
 
A
 
Eg:
 
MOV  P1, #0xFF H
   
Let  P1: 0000 0100b    (OR)  04 H
 
MOV   A, P1
    
A = 04H
 
MOV  R0, # 050H
   
R0 = 50 H
 
MOV  @R0, A
   
Add. of Memory
        
0050 H =  ------
 
MOV    A,  @R0
   
A = ---H
 
MO
V
X
   
A
,  @ 
D
P
T
R
   
; 
T
ran
s
f
e
r
 
t
he
 
c
on
te
n
t
s
 
f
rom
 
t
he
 
m
e
mory 
l
o
c
a
t
i
o
n
 
p
o
i
n
te
d
 
t
o
 
b
y
   
    
 
DPT
R
 
i
n
t
o
 
t
he a
cc
umu
l
a
t
or
.
    
D
PT
R 
c
ou
l
d
 
have
 
a
 
1
6-
b
i
t 
a
dd
r
es
s
,
 
s
u
c
h
 
as
 
1
23
4 
H
.
IN
C
 
@
R
1
  
 
a
d
d
 
one
 
i
n
t
o
 
t
he
 
c
on
te
nt
 
d
es
i
g
na
t
e
d
 
b
y 
 
t
he
 
R
1
 
MOV  A, #55H
   
A= 55h
MOV  R0, 40H
   
R0         40H= ( 
xx
 )
MOV   @R0, A
   
40H =  --- H
INC  R0
    
R0 =  41 H
 
MOV  @R0, A
   
41 H = ---H
INC  R0
    
R0 = 42H
 
MOV  @R0,A
   
42H = ----H
INC   R0
    
R0 = 43H
MOV  @R0, A
   
43 H= ----H
 
Example
 
Advantages of reg. Indirect addressing Mode:
    
Looping is most efficient  &  Block data transfer
Limitations:  need to access the external RAM
 
3
.
 
I
n
d
i
r
e
c
t
 
A
d
d
r
e
s
s
i
n
g
 
m
o
d
e
 
(
c
o
n
t
d
)
 
4. 
Im
m
ed
i
a
t
e
 
A
ddre
s
s
i
ng 
m
ode
 T
h
i
s
 
mo
d
e
 
of
 
a
d
dr
es
s
i
n
g
 
u
se
s
 
e
i
t
h
e
r
 
an
 
8
-
 
or
 
16
-
b
i
t 
c
on
st
ant
 
v
a
l
ue
 
as
 
t
 
he
 
s
ou
r
c
e
 
o
p
er
a
n
d
  T
h
i
s
 
c
on
st
a
n
t
 
i
s
 
s
p
e
c
i
fi
e
d
 
i
n
 
t
he
 
i
n
s
t
r
u
c
t
i
on
,
 
r
a
t
h
e
r
 
t
han 
i
n
 
a
 
re
g
i
st
e
r
 
or
 
a
 
m
e
mo
r
y
 
l
o
c
a
ti
on
 T
h
e
 
d
es
t
i
na
t
i
on
 
r
e
g
i
st
e
r
 
s
hou
l
d
 
ho
l
d
 
t
he
 
s
a
m
e
 
d
a
t
a
 
si
z
e 
w
h
ic
h
 
i
s
 
sp
e
ci
fi
e
d
 
b
y
 
t
he
 
s
ou
rc
e
 
o
p
e
r
and
 
E
x
a
m
p
l
e
s
:
 
ADD
 
A
, # 
030
H
 
 
;A
d
d
 
8
-
b
i
t
 
v
a
l
ue
 
of
 
3
0
H
 
t
o
 
t
he a
cc
umu
l
a
t
or
 
r
e
g
i
s
t
e
r
   
  (
w
h
ic
h
 
i
s
 
an
 
8
-
b
i
t
 
r
e
g
is
t
e
r
).
 
M
O
V 
 
D
P
T
R
, 
#0
F
E
0
0 
H
   
;
M
o
v
e
 
1
6
-
bi
t
 
d
a
t
a
 
c
on
st
ant FE
0
0
H
 
i
n
t
o
 
t
he
   
            
1
6
-
b
i
t
 
Da
t
a
 
P
o
i
n
t
e
r
 
Re
g
i
s
t
e
r
.
 
Examples:
 
        
MOV A, # A0H
  
   
; data A0H transfer to the A
    
ADD A, # 4EH 
  
   
; add the contents of A with the data 4E H
   
   
     
&
 
store
 
in Acc. A
    CJNE   A, # 20H, LOOP   
;   compare  the data  20H with content
     
   
of  Acc (A),
      
jump to LOOP if the
      
     
value not equal to zero.
 
 
 
4. Immediate Addressing mode (cont’d)
 
5. I
nde
x
ed 
A
d
dre
ss
i
n
g 
m
ode
 
On-Chip ROM access
 
 
 
T
he
 
I
nde
x
ed
 
addre
ssi
ng
 
i
s
 
u
s
eful
 
w
h
en
 
there 
i
s
 
a
    
need
 
to
 
retr
i
e
v
e
 
data
 
fr
o
m
 
a
 
loo
k
-
up tab
l
e
 
  
A
 
1
6
-
b
i
t
 
reg
is
ter
 
(
d
ata
 
p
oi
n
t
e
r
/
pr
o
gram 
co
unter
 
 
D
P
T
R
/PC
)
  
h
o
l
ds
 
t
h
e
 
ba
s
e
 
addre
s
s and the
 
a
cc
u
m
u
l
a
t
o
r
 
h
ol
ds
 
an
 
8
-
b
i
t
  
d
is
p
l
a
c
e
m
e
n
t
 
o
r
 
i
ndex
 
v
a
l
u
e
 
 
 
T
he
 
s
u
m
 
o
f
 
the
s
e
 
t
w
o
 
reg
is
t
ers
 
f
o
r
m
s
 
the effe
c
t
iv
e
 
addre
s
s
 
f
o
r
 
a
 
J
M
P
 
o
r
 
M
O
V
C 
i
n
s
tru
c
t
i
o
n
 
I
n
d
e
x
e
d
 
A
d
d
r
e
s
s
i
n
g
 
m
o
d
e
 
(
c
o
n
t
d
)
E
x
a
m
p
l
e
:
 
M
OV
  
A, 
#08
H
    
  
    
; 
O
f
f
se
t
 
f
r
o
m
 
t
ab
le
 
s
t
a
r
t
 
M
OV
  
D
P
TR
, 
#01
F0
0
H
       
; 
T
ab
le
 
s
t
a
r
t
 
add
re
s
s
 
M
O
V
C  
 
A
, 
@ 
A
+
D
P
TR
     
; 
G
e
ts
 
t
a
r
ge
t
 
v
a
lue
 
fr
o
m
 
t
he
 
t
ab
le
  
   
  
        
s
t
a
r
t
 
add
re
s
s
 
+
 
o
ff
se
t
 
a
nd
 
p
uts
 
it
 
in
 
A
.
         
(Contents of A are added to the 16 bit reg. DPTR to form the 16 bit address of need data )
 
(A)      { (A=00) + (Add. Of content) }
A
fter
 
the
 
e
x
e
c
ut
io
n
 
o
f
 
the
 
ab
ov
e
 
i
n
s
t
r
u
c
t
i
o
n
s
, the
 
pr
o
gram
 
wi
l
l
 
b
ran
c
h
 
to
 
addre
s
s
1F
08
H 
(
1
F
0
0H+
08
H
)
 
and
 
tran
s
fer
 
i
nto
 
the a
cc
u
m
u
l
a
t
o
r
 
the
 
data
 
b
y
te
 
retr
i
e
v
ed
fr
o
m
 
that 
loc
at
i
o
n
 
(
fr
o
m
 
the
 
look
-
u
p
 
t
ab
l
e)
 
 
ORG  0000
 
MOV  DPTR, #200H
 
CLR  A
 
MOVC  A, @A+DPTR
 
MOV  R0,A
 
INC  DPTR
 
CLR   A
 
MOVC  A,@A+DPTR
 
MOV  R1, A
 
INCR  DPTR
 
CLR   A
 
MOVC  A,@A+DPTR
 
MOV  R2, A
HERE:
 
SJMP  HERE
 
  
  ORG   0200H
MY DATA:   DB  “ SLR”
                    END.
 
 
ORG  0000
 
MOV  DPTR, #300H
 
MOV  A, #0FFH
 
MOV  P1, A
BACK:
 
MOV  A, P1
 
MOVC  A, @A+DPTR
 
MOV  P2 ,A
 
SJMP  BACK
 
 
           ORG  300H
SQR_Table:  DB 0, 1, 4, 9, 16, 25, 36, 49, 64, 81
  
END.
 
Program to understand the concept of LOOK –UP table    with   INDEXED ADDRESSING MODE
 
Thank You
Slide Note
Embed
Share

Addressing modes in the 8051 microcontroller play a crucial role in specifying how data is accessed and operated by instructions. They include register addressing, direct addressing, register indirect addressing, immediate addressing, and indexed addressing modes. Each mode offers unique ways to handle data efficiently, enhancing CPU processing speed and reducing processing time. With specific examples and explanations, this guide delves into the diverse addressing modes of the 8051 MC.

  • Addressing modes
  • 8051 microcontroller
  • CPU processing
  • Instruction handling

Uploaded on Aug 08, 2024 | 3 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Addressing Modes Addressing Modes in in 8051 MC 8051 MC S. Lourduraj Asst. Prof. of Physics St. Joseph s College.

  2. Addressing Mode MC 8051 Method of specifying the data to be operated by the instruction CPU can access the data in various ways. -- data could be in reg./Memory/immediate value. Is a way the MC to access data / operand from internal memory /external memory (or)Register specific Ports. The use of efficient modes of a program (addressing mode) will increase the processing speed of CPU as well as processing time can be shortened.

  3. Types of Addressing Modes 1.Register Addressing Mode 2.Direct Addressing Mode 3.Register indirect Addressing Mode 4.Immediate Addressing Mode 5.Indexed Addressing mode

  4. Type of Addressing Mode MC 8051

  5. 1. Register Addressing mode - Instruction will specify the name of the Reg. in which data is available This addressing instruction involves information transfer between registers (at least one of the R0-R7 register involved) i) Source & Destination reg. s match in Size: MOV A, R0 MOV R2, A ADD A, R5 Eg: Eg: MOV R4, R5 (Invalid Instruction) ii) Size of Source & Destination will vary: Eg: MOV DPTR, A (Error) MOV DPTR, #12A3H MOV R2, DPL MOV R1, DPH

  6. 1. Register Addressing mode Example: ADD A, R7 ; add content of A with the content of R7 MOV R0,#00 ; move data 00 to the register R0 DJNZ R3, LOOP ; Decrement content of R3 and Jump if Not LOOP MOV R0, A ; The instruction transfers the content of accumulator A into the R0 register.

  7. 2. Direct Addressing mode The Address of the data is directly specified in the instruction The entire 128 bytes of RAM can be accessed with memory locations 30H to 7FH Eg: MOV R2, #5 R2=05H MOV B, 2 MOV R0, 40H MOV R4, 7FH MOV 40H, A MOV A, 7 OR MOV A, R7 (OR) MOV A, 7 MOV 4, 2 (OR) MOV R4, R2 Eg: MOV A, P3 MOV A, 020H MOV P1, AA H ; Transfer the contents of A to Port 1 MOV 20H, 40H ; Transfer the contents of the address 40H to the address 20H ADD A, 55H ; Add the contents of A with the contents of the address 55H ; Transfer the contents of Port 3 to the accumulator ; Transfer the contents of RAM location 20H to the accumulator

  8. Addressable memory used by direct addressing mode from 00 to 7F and also address specified by special register Valid memory Address for Direct Addressing Mode P1(80H), P1(90H), P2(A0H), P3(B0H) & PSW(D0H) PSW(D0H)

  9. 3. Register Indirect Addressing mode A register is used to hold the effective address of the operand. This register, which holds the address, is called the Pointer register and is said to point to the operand. Only registers R0, R1 and DPTR can be used as pointer registers. R0 and R1 registers can hold an 8-bit address where as DPTR can hold a 16-bit address. DPTR is useful in accessing operands which are in the external memory.

  10. 3. Indirect Addressing mode (contd) Examples: MOV @ R0, A ;Store the content of accumulator into the memory location pointed to by the contents of register R0. R0 could have an 8-bit address, such as 60H. Eg: MOV P1, #0xFF H MOV A, P1 MOV R0, # 050H MOV @R0, A MOV A, @R0 Let P1: 0000 0100b (OR) 04 H A = 04H R0 = 50 H Add. of Memory 0050 H = ------ A = ---H MOV A, @R0 ; move the contents of RAM at location designated by R0 into accumulator A

  11. MOVX A, @ DPTR ; Transfer the contents from the memory location pointed to by DPTR into the accumulator. DPTR could have a 16-bit address, such as 1234 H. INC @R1 add one into the content designated by the R1

  12. Example MOV A, #55H MOV R0, 40H MOV @R0, A INC R0 A= 55h R0 40H= ( xx ) 40H = --- H R0 = 41 H MOV @R0, A INC R0 41 H = ---H R0 = 42H MOV @R0,A INC R0 MOV @R0, A 42H = ----H R0 = 43H 43 H= ----H Advantages of reg. Indirect addressing Mode: Limitations: need to access the external RAM Looping is most efficient & Block data transfer

  13. 3. Indirect Addressing mode (contd)

  14. 4. Immediate Addressing mode This mode of addressing uses either an 8- or 16-bit constant value as t he source operand This constant is specified in the instruction, rather than in a register or a memory location The destination register should hold the same data size which is specified by the source operand Examples: ADD A, # 030H ;Add 8-bit value of 30H to the accumulator register (which is an 8-bit register). MOV DPTR, #0FE00 H ;Move 16-bit data constant FE00H into the 16-bit Data Pointer Register.

  15. 4. Immediate Addressing mode (contd) Examples: MOV A, # A0H ADD A, # 4EH CJNE A, # 20H, LOOP ; compare the data 20H with content of Acc (A), ; data A0H transfer to the A ; add the contents of A with the data 4E H & store in Acc. A jump to LOOP if the value not equal to zero.

  16. 5. Indexed Addressing mode On-Chip ROM access The Indexed addressing is useful when there is a need to retrieve data from a look-up table A 16-bit register (data pointer/program counter DPTR/PC) holds the base address and the accumulator holds an 8-bit displacement or index value The sum of these two registers forms the effective address for a JMP or MOVC instruction

  17. Indexed Addressing mode (contd) Example: MOV A, #08H ; Offset from table start MOV DPTR, #01F00H ; Table start address MOVC A, @ A+DPTR ; Gets target value from the table start address + offset and puts it in A. (Contents of A are added to the 16 bit reg. DPTR to form the 16 bit address of need data ) After the execution of the above instructions, the program will branch to address 1F08H (1F00H+08H) and transfer into the accumulator the data byte retrieved from that location (from the look-up table) (A) { (A=00) + (Add. Of content) }

  18. ORG 0000 MOV DPTR, #200H CLR A MOVC A, @A+DPTR MOV R0,A HERE: ORG 0200H MY DATA: DB SLR END. INC DPTR CLR A MOVC A,@A+DPTR MOV R1, A INCR DPTR CLR A MOVC A,@A+DPTR MOV R2, A SJMP HERE

  19. Program to understand the concept of LOOK UP table with INDEXED ADDRESSING MODE ORG 0000 MOV DPTR, #300H MOV A, #0FFH MOV P1, A BACK: MEMORY LOCATIONS IN ROM 307CONTENTS 300 00 301 01 MOV A, P1 MOVC A, @A+DPTR MOV P2 ,A SJMP BACK 302 04 303 09 304 10 Equivalent to 16 305 19 Equivalent to 25 306 24 Equivalent to 36 SQR_Table: DB 0, 1, 4, 9, 16, 25, 36, 49, 64, 81 END. ORG 300H 307 31 Equivalent to 49 308 40 Equivalent to 64 309 51 Equivalent to 81

  20. Thank You

More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#