Keil™, An ARM® Company

Discussion Forum

adding unsupported instructions

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
mlika oussama
Posted
29-Sep-2002 17:21
Toolset
C51
New! 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.
Read-Only
Author
Eric VAN OLDEN
Posted
30-Sep-2002 02:36
Toolset
C51
New! RE: adding unsupported instructions
You can use macro
Read-Only
Author
Andrew Neil
Posted
30-Sep-2002 07:15
Toolset
C51
New! RE: adding unsupported instructions
"You can use macro"

Possibly for the assembler, but how could that work for the C51 Compiler??
Read-Only
Author
Eric VAN OLDEN
Posted
30-Sep-2002 07:56
Toolset
C51
New! RE: adding unsupported instructions
If you want to use your new instructions, you must use assembler. Compiler can't use instructions when it generate code if it doesn't know that this instructions exist.
Read-Only
Author
Erik Malund
Posted
3-Oct-2002 06:09
Toolset
C51
New! RE: adding unsupported instructions
http://www.archelon.com advertise with the heading "Need to build a C compiler", try them. Evidently they are advertising for people making new processors.

Erik
Read-Only
Author
Jon Ward
Posted
3-Oct-2002 08:24
Toolset
C51
New! RE: adding unsupported instructions
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

Next Thread | Thread List | Previous Thread Start a Thread | Settings