Do Keil C51/A51 define the target device somehow? I can't seem to find anything in the docco. I was thinking there should exist something like __DEVICE__ as a predfined macro.
"Do Keil C51/A51 define the target device somehow?" No, they don't. ALL the SFRs, etc, are defined by include files. There is nothing special or magic about these headers - you can write your own, if you wish. There are some device-specific options (eg, for extended addressing modes) - see the Manuals for these
Thanks. I have set up my own device header files, so I'm aware of this. I have a situation where I'm targetting two different devices, with the same source file built for two different uv2 targets in the same project. I can do this by passing in a define, but I'm surprised that the compiler doesn't have something.