Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Compiller neutral code

2006-04-18 by jk jlkj

Hi Firends,
   
  The other day i was reading a message in this group, about writing code which does not use any of the compiler specific extended keywords like __arm, __nested, __irq etc. 
  Does any one have any sample code or any documentation or articles on how this can be done. 
  Because, i think that this is an important step towards writing code that is not compiler specific and would compile with very little or no changes between compilers.
   
  I think that such code would definitely require a little bit of assembly language.
   
  What i would like to know and do is 
  a. List down all the compiler specfic instructions which are very commonly used.
  b. Write code which would replace these compiler specific intructions.
   
  Well the (a) part of my job seems to be easier, so i am listing down the commonly used IAR ewarm compiler specific instructions here .
   
  __irq, __fiq, __arm, __thumb, __nested, __swi
   
  For the (b) part of my question i would need some serious help from some of the experts in this group. By help i do not expect any one to give me the entire code. All i need is some guidance and hints, i will try and compile the code. However, if some one has already done this exercise, then please share it with us.
   
  Regards,
  Jerome

				
---------------------------------
 Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

[Non-text portions of this message have been removed]

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.