I want to use A5 for extened instructions,such as dec dptr,how to use, thank you!
Do you mean you want to create a new 8051-derivative, and you want it to have these "extened instructions"?
Or, do you mean you have some 8051-derivative with these "extened instructions", and you want to know how to use them with the Keil tools?
I want to creat it
Create what?
Such a your terse, over-abbreviated post is really unhelpful!
You need to describe your requirement carefully, completely, and in detail.
He seems to have noted that the 0xA5 value isn't defined as an opcode.
But a hole in the opcodes does not mean that a end-user application can get new magic features. In some processors, the processor has an invalid-instruction exception. This can be used to catch invalid opcodes and possibly emulate new magic features (at a greatly reduced speed).
If you implement the processor core in an ASIC, you are of course free to define this opcode yourself, but you will still not get any existing compilers to know about it and to use it.
for using 0xa5 the logical way to do so would be to build a '251 (which I would never do, the XA is a much more intelligent 'expansion' of the '51). The '251 actually uses the 0xa5 to execute '51 instructions in '251 mode and vv.
anyhow there are ever so many that (try to) use a '51 beyond its intended use and when getting in trouble for that reason start "I need to expand the '51" or "how do I make the '51 do this" instead of "OK I chose the wrong processor" or "I will change my app to fit the '51", not to mention "Instead of trying to blame the '51 I will blame myself".
If you implement the processor core in an ASIC, you are of course free to define this opcode yourself, but you will still not get any existing compilers to know about it and to use it. I recall a post: "how do I make the Keil compiler recognice my new and exciting '51 with new and exciting instructions". Oh how many take the first step without thinking of step2.
Erik
for example philips 51MX core,there are some extened instructions such as ERET,EMOV and so on.Their encoding are A5.I want to have similar extened instructions.But I don't know how can I do?
You are very unclear about what you want. Please me more verbose.
Are you a chip designer and want to design a new derivate, or are you asking how you can get the Kiel compiler to use the already existing extra instructions for a specific chip?
"I want to have similar extened instructions"
Then you will have to design your own processor, and design-in those instructions.
This forum is for Keil tools; not processor or instruction set design - so you really need to find a more appropriate forum.
Of course, once you've redesigned the instruction set, it will no longer be supported by the Keil tools - or, in fact, any standard 8051 tools. So, again, you will have to find another forum to discuss tools & programming for your new processor.
...it will no longer be supported by the Keil tools - or, in fact, any standard 8051 tools.
Yes it will - it's just that the extended instructions will not be used. Hopefully, the chip would be a strict super-set.
Yes, of course - thus rendering the whole operation pointless!
;-)