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

one question

when i add startup.a51 ,init.a51 and C51S.LIB to my project.the link result as below:

INPUT MODULES INCLUDED: test.obj (TEST) aa.obj (AA) .\STARTUP.obj (?C_STARTUP) .\INIT_TNY.obj (?C_INIT) C:\Keil\C51\LIB\C51S.LIB (?C?COPY)

?c_init segment is not the last segment in the link process, is that right?

when i delet startup.a51 and init.a51 from project ,then rebuild it ,the segment of ?c_init is linked at the last step showed below;

INPUT MODULES INCLUDED: test.obj (TEST) aa.obj (AA) C:\Keil\C51\LIB\C51S.LIB (?C_STARTUP) C:\Keil\C51\LIB\C51S.LIB (?C?COPY) C:\Keil\C51\LIB\C51S.LIB (?C_INIT)

i think the send link is right, how about the first link step, is it right?

thanks you!

Parents
  • I don't think there are many (any?) of the pundits on this forum who would ever advocate inline assembly as a good idea at all

    You're right about this here forum. But obviously those evangelists of inline assembly must exist somewhere out there. How else to explain that so many Keil newbies come here firmly believing inline assembly is the be-all and end-all of efficient programming in C?

Reply
  • I don't think there are many (any?) of the pundits on this forum who would ever advocate inline assembly as a good idea at all

    You're right about this here forum. But obviously those evangelists of inline assembly must exist somewhere out there. How else to explain that so many Keil newbies come here firmly believing inline assembly is the be-all and end-all of efficient programming in C?

Children
  • But obviously those evangelists of inline assembly must exist somewhere out there. How else to explain that so many Keil newbies come here firmly believing inline assembly is the be-all and end-all of efficient programming in C?

    I have, on occasion seen C51 horrible code based on the philosophy that "C is C". If you do not know the difference between a PC and a '51 that is what you get.

    An example would be that some complain about efficiency while using the large model (I can not be bothered by memory spaces, by the way, what is that?). Another would be looking at 'blinky' and asking "where is the OS?".

    Fortunately, the want ads for "a programmer" for a micro without requiring micro experience are slowly waning. However it is still often seen as 'desired' rather than 'required'

    Erik

  • You may be right.

    :-(

    But, to me, it seems more likely that the vast majority of inline assembly usage is pure naivety of novice programmers who see that the faclity is present and, therefore, assume that it must be good to use...

  • But, to me, it seems more likely that the vast majority of inline assembly usage is pure naivety of novice programmers who see that the faclity is present and, therefore, assume that it must be good to use...

    .... that they are used to assembler and so 'novice' in C, that if they do not know the appropiate C construct then "just do it in assembler'.

    Erik

  • Yes, there is certainly a lot of that!

    :-(

    I was thinking of that as an example of "naivety of novice [C51] programmers"

  • Thanks your advice and dicuss about that.

    The solution to link the ?C_initseg at the last setp is very easy.

    I just want to know about that link procetrue is right or safe? Maybe it is a keil's bug.

    After I check ,it is safe.

    anyway thanks

  • No - it is your mis-use (and/or misunderstanding) of the tools that is causing the problem!

    The solution is to fix the basic problem in your project structure - not to try to workaround the fallout from it!