How would I locate a structure to coincide with the beginning of SFR space for the 8051? address 0x80 of directly assessible data memory.
We are using a core8051 (inside an FPGA), and the core8051 lets us map external events to SFR space. So it would be very convienent to define a structure which allows us to more easily access all of SFR space. (we take care not to "stomp" on already defined SFR registers.
How can I do that?
Thanks
Not using structs because your are using an 8051? I guess to each his own.
Of course not. If you heard what i thought I said it is: "Not using structs to describe I/O because your are using an 8051".
There is nothing against using structs (I do) but for I/O where time often is an issue (pointers to) structs can really slow you down.
Erik
Erik-
Sorry, I apologize, I misread what you were saying. Thanks for the clarification.
Eddie
"for I/O where time often is an issue (pointers to) structs can really slow you down"
One more time:
accessing a structure field as, eg, a.b.c has no more run time overhead than a direct variable access.
The runtime overhead only comes when you start using pointers; eg, pA->pB->pC