We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
hai all,
i am doing small programs for how do we accessing and manipulating external variable data from assembler file(A51 file). i have declared one external variable in another file like extern unsigned char data1 (in file.c) but i need to move the value to data1 variable from A51 file. please anyone helpme. thanks in advance.. regards, J.Raj
go here and see
http://www.keil.com/support/man/docs/c51/c51_ap_globalvars.htm
thanks for reply.. what is the difference between Xdata declaration and data declaration.... EXTRN DATA EXTRN XDATA
Different memory region. Different set of instructions to access the variable.
i didnt understand(diffrence between data memory region).....please give some brief explanation.. thanks raj.
if you dont, then dig out the "getting started guide" and "the bible" and get going. You need to understand the basics before you start anything. Do not 'read' the "getting started guide" work the examples.
Erik
the "getting started guide" is on your Keil CD and here are the links to "the bible" Chapter 1 - 80C51 Family Architecture: www.nxp.com/.../80C51_FAM_ARCH_1.pdf
Chapter 2 - 80C51 Family Programmer’s Guide and Instruction Set: www.nxp.com/.../80C51_FAM_PROG_GUIDE_1.pdf
Chapter 3 - 80C51 Family Hardware Description: www.nxp.com/.../80C51_FAM_HARDWARE_1.pdf
"i didnt understand (diffrence between data memory region)"
As Erik says, this is absolutely fundamental to doing anything on an 8051!
Especially in assembler!
In addition to the so-called "bible", here's a tutorial: www.8052.com/tutorial.phtml
And some books: http://www.keil.com/books/8051books.asp www.8052.com/books.phtml