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.
Dear Sir,
I m in beginning phase of 8051 with C. i have compiled my c file and i found in .m51 file that one of the SFR and a user defined variable share the same memory space(0080H) .How it's possible.Could you pls explain me. .M51 lists ....
------- MODULE func1
D:0080H PUBLIC PORT0 I:0080H PUBLIC variabl1
Kindly help with reference to above.
regards, Arup
Although they might look as if they're in the same location, they are not.
Each one is in a different 'address space' and just happen to have the same offset.
I suggest you look at the bible for details:
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