| ??? 08/03/03 18:43 Read: times |
#52018 - RE: Function starting address in sdcc Responding to: ???'s previous message |
Suggestion Number 1. Stop. 8051s are lousey processors to attempt multi-tasking via context switching.
Suggestion Number 2. Stop. It is clear that you are quite new to this type of thing. Questioning how to know the entry points of a task subroutine in C is pretty basic stuff!! Suggestion Number 3. Stop. It is not sufficient to try to just dispatch the entry point of each alternate task at the timer overflow time. It is also necessary to store the current place the last task was executing and what its complete register context was. Upon resumption of that task that context must be restored. Why don't you instead build your self a very simple polled system. Design function 1 as a subroutine that runs to completion and returns. The same for function 2. Design them so that they complete in less than one timer interrupt period and have each contain state variables that keep track of what is going on in that function. The main routine can then just manage the timer interrupt overflows and alternately call the two functions in turn. when the called function returns then just poll till the timer overflows. I posted code here a while back that shows many points of a system like I am describing. Please see this link... http://www.8052.com/forum/read.phtml?id=47505 Michael Karas |
| Topic | Author | Date |
| Function starting address in sdcc | 01/01/70 00:00 | |
RE: Function starting address in sdcc | 01/01/70 00:00 |



