Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/03/03 12:10
Read: times


 
#35508 - getting called the main of lib first.
Hello All,
I am Anand Chaudhari. I have written some code in 8051 c language. I use Keil c51 and a51 Version 2.23. Actually the situation is that I have created a lib file containing main function in it and in that I have called a function that is to be impleted in another project. I.e.

Void main()
{
func1();
}
I have generated the lib file and included it in another project. Now the func1 is defined in new project and the lib is included. Now how can I execute it? I want the main to be executed first ( from the lib file) and then the control to be transferred to the func1(). Is it possible?

I have tried the
#pragma asm
cseg at 0
jump main
#pragma endasm
In the new proj. but it doesn't get the main.And also I know this is not the right solution to the problem. I have also tried with the startup.a51 file. But it is not helpful to me in this context.
If there is any other ways round to this problem please mail me.

Anand.

P.S. : The one thing I want to tell is that, I have seen the RTX51Tiny lib file and a sample project of that. In that, there is no main (I mean in the actual project) Just the user writes the "void func1 _task_ 0" and the control transfers to that (obviously after all calculations of the rtx tiny OS). Can we do like that I mean similar to that? But I don’t want the _task_ keyword to be used. I want to develop the functionality on my own.


List of 4 messages in thread
TopicAuthorDate
getting called the main of lib first.            01/01/70 00:00      
RE: getting called the main of lib first.            01/01/70 00:00      
RE: getting called the main of lib first            01/01/70 00:00      
RE: getting called the main of lib first            01/01/70 00:00      

Back to Subject List