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
what i understand is above 007F in internal data memory if my SFR occupies x no of bytes of memory ,then same memory location(numerical) i can use for user defined variables in different addr space i.e IDATA
DO read 'the bible'
while your statement abobe is basically correct there is no such thing as my SFR and no SFR "occupies x no of bytes", they all 'occupy' ONE.
I do appreciate, that your expressions may be due to 'language', but if you had (as you MUST) studied 'the bible' I am sure that the language woul have been clearer.
Erik
"there is no such thing as my SFR"
True for a standard chip, but (possibly) not if you're using a softcore, or something like the old Triscend...
" no SFR 'occupies x no of bytes', they all 'occupy' ONE."
The so-called "bible" refers to the (TH0+TL0) and (TH1+TL1) pairs as "16-bit registers"
DPTR is also a 16-bit register (thought also accessible as DPH and DPL)
There maybe others specific to particular derivatives?