Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Regarding: Working of DB directive in 8051 microcontroller

Status
Not open for further replies.

snel

Newbie level 5
Newbie level 5
Joined
Jul 20, 2012
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,365
Hi all,

To introduce myself: I am just a fresher in the field of electronics with computer background


Presently I am studying about 8051 series from Mazidi.

But i am stuck at the concept of DB directive.
Below is the example snippet from the book at which i am stuck

<<
Count EQU 30
... ...
MOV R4,#COUNT ;R4=1EH
MOV DPTR,#MYDATA ;DPTR=200H

ORG 200H
MYDATA: DB “America”
>>


In the above code, the comment section shows the value. Like value of R4 would be 30 or 1E .
Similarly the value of DPTR would be 200


Now my problem is how could the value of DPTR be 200 when MYDATA points to "America" below ?

Since "America" signifies a value other than 200 in either HEX or any other conversion.

Would really appreciate if someone could let me know how come the value of DPTR comes out to 200.
 

200H is the starting address of the string "America"
 
  • Like
Reactions: snel

    snel

    Points: 2
    Helpful Answer Positive Rating
200H is the starting address of the string "America"

Thanks Dilraj for the help.

Also since I am very new to this field of Electronics

So could you suggest me some book on electronics which could help me to gain some knowledge about "the concepts as to when and where to use various electronic components"
like (transistors, capacitor, variable/preset resistor, crystal etc)
 

Well thanks again...for the help

Let me purchase and read these books...to gain some more knowledge.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top