??? 06/02/08 08:59 Read: times |
#155379 - Ok lets leave aside the issue of different compile Responding to: ???'s previous message |
Erik said:
Some compilers push variables on the stack, some put them in registers a throrough analysis of the two compilers will be required (e.g. what is the compilers 'rule' for registers preserved when a function is called) Michael said:
The common method used is to compile the various modules with their individual compilers into a common relocatable object format. Then a linker that is compatible with said object format links all the objects together into a final single executable.
In this process there is a very strong need to make sure that the calling interface conventions are the same for all the compilers. This includes the way parameters are passed and results are returned. Jerson , its not DLL issue here , they work under an operating system which makes life easier. Thanks , I could see it is not worth making info exchange between two different compilers. Lets leave aside the issue of different language and different compilers. How about this with same compiler , say Keil . I have in my mind that the main program should jump to some memorylocations as service routines where user should be allowed to load their program . say if we have a function in our main program int getadcval(int ch) <----- user could read the adc value now when user does this: int fetch_val; //adc value int ch; //channel ch=1; fetch_val = getadcval(ch); how can this getadcval(ch) be referenced between the dead listings ? . Is it if we keep the variable names the same and when the PC goes to the user hex memory location it automatically executes that code? . Is there a role of interupts here to save system from crashing?. Regards/ |