Hi all. I'm using a modified 8051 cpu, and it don't have some instructions (in this case MUL). In Keil IDE, when I do some like: foo = bar << 1; Compiler translate as: MUL AB And it produce a reset of the software. My question is very simple: how I do to indicate the compiler that not to use that instruction? Thanks.
"I'm using a modified 8051 cpu, and it don't have some instructions (in this case MUL)"
And you didn't think to consider, before choosing this CPU, what tools would be able to support that?
Perhaps you should reconsider the decision - is the saving of a few instructions really worth the the pain that it causes...?
"how I do to indicate the compiler that not to use that instruction?"
You study the compiler manual very carefully to see if there is an option to support this derivative - or one that has the same (or sufficiently similar) limitations.
You could contact Keil to see if they would be prepared to add support - though I think you'd need to make a very compelling case indeed.
You could check other compilers.
You could take an open-source compiler such as SDCC and modify it to your requirements.
You just write in assembler.