For MCS51, I was wondering if there is anyway to specify a __code variable that is in non-default code bank. Here is what I could like to do...
__code __at (0x1FFF8) u8_t ieee_flash_addr[8]; The flash programmer will initialize address 0x1FFF8 - 0x1FFFF to the IEEE address for this chip and this will be retained through code reprogramming. Currently I have to directly twiddle the FMAP bank control register: u8_t orig_fmap; u8_t ii; /* Copy IEEE/Serialization Address from 0x1FFF8 (highest bytes in BANK3) */ orig_fmap = FMAP; FMAP=3; for (ii=0; ii<8; ii++) { mac_address[ii] = flash_ieee_addr[ii]; } FMAP=orig_fmap; It would be cleaner if the compiler could take care of the FMAP change. Of course this only works in nonbanked code. thanks! a* ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user