This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

adding unsupported instructions

Im developping my own version of a 8051 in VHDL. and Im using Keil software to make test programes. I know how to added my own SFR's, but the problem is If I Want to added a special instructions not supported by the original 8051, the only way I know is modifing manually the hex file generated by the compiler .
I want to make the macro assembler or the C compiler supporting my special instruction by specifing the new opcodes . is this possible? please give me your advice I will be very thinkful.

Parents
  • Refer to http://www.keil.com/support/docs/2434.htm for details on adding assembler macros that use your new instructions.

    Note that there is only 1 unused opcode on the 8051. So, if you start replacing existing instructions with new instructions you may render it impossible for the compiler to generate code (since instructions used by the compiler are no longer available).

    If may want to consider using the A5 opcode as an escape prefix for your new instructions. Refer to the Philips 51MX, Dallas 390, and Intel 251 documentation for more information on how those companies added new instructions without upsetting any existing instructions.

    Jon

Reply
  • Refer to http://www.keil.com/support/docs/2434.htm for details on adding assembler macros that use your new instructions.

    Note that there is only 1 unused opcode on the 8051. So, if you start replacing existing instructions with new instructions you may render it impossible for the compiler to generate code (since instructions used by the compiler are no longer available).

    If may want to consider using the A5 opcode as an escape prefix for your new instructions. Refer to the Philips 51MX, Dallas 390, and Intel 251 documentation for more information on how those companies added new instructions without upsetting any existing instructions.

    Jon

Children
No data