so i explain. the application is very conplicated. atm it got 223 tasks but it will get more. ride51 has the code compresser. does uvision? i mean i want each task uncompress when it runs. how? wait for the reply now.
how do you plan to fit 223 'tasks' in the 64k memory of a '51?
Erik
Maybe, just maybe, the word "task" here is used about functions. So the code has 223 functions.
Because 223 actual tasks is more in the line of a running Linux system with mail server, web server, database server, ...
And 223 tasks, would mean a significant amount of stack space, even if only 10 % of the tasks are started at any one point in time.
Besides - the 8051 is one of the worlds worst processors to use with tasks/threads, because of the limitations in memory indexing, stack management, ...
In the end, something is very wrong here - either in use of terminology, or in expected capabilities of the processor.
Because 223 actual tasks is more in the line of a running Linux system with mail server, web server, database server, ... it has been posted in one of the fora (and not joking) "how do I implement Linux on a '51"
i do know what a function is and i know what a task is and i know what linux is. when i sayed 223 tasks i mean i have 223 tasks. what is rediculous? they dont all run at the same time. i know only one runs at a time. do you know it? no. when i finish this i will put my code on google and you can see. you just answer a question i did not ask and think i am wrong.
If only one task at a time runs, you are wrong.
Tasks are for (semi)concurrent execution. So no tasks are needed if only one runs at a time...
i give you lesson. yu dont know that the c51 only can execute one instruction at a time. it can only execute one task at a time. only one task can run at a time. it is a very complex program and needs a lot of tasks. i think you have never written a big complex program like mine. when i finish the code i will put it on google and you can learn.
it is a very complex program and needs a lot of tasks
Why is that necessary? Come on, tell us. We want to learn.
The following code have an even larger complexity - 1947 "tasks". But since only one can run at a time, each task has become a function to call. So zero task support needed. No extra task stacks needed. Just 1947 functions for the specific "tasks" to perform.
Now how is that for complexity?
int main() { initialize(); for (;;) { switch (find_out_what_to_to()) { case TASK_1: do_task_1(); break; case TASK_2: do_task_2(); break; ... case TASK_1947: do_task_1947(); break; default: oops_repair(); } } }
The days are ticking - when can we expect this master-class lecture on the writing of advanced, complicated, applications using 223 threads but with only one thread "runnable" (as separate from "running") at any one time?
Can we also expect a nice diagram showing the timing and sequence interaction between the 223 threads, so we can be awed at the exquisite handover mechanisms and state machine designs used to get the data pumping around in the system in a deterministic way?
so you should be careful. you show you are very fast to mock and even faster to judge. and you still mislead with things i not say. i am busy. you waste my time with nonsense. be patient and open your mind.
So have you spent some time considering my posted code about a state machine calling functions depending on what current task to do? Zero impact on the stack, and produces excellent code for the 8051 processor.
Remember that a concept with threads means that all 223 threads are execution root objects, making it impossible for the compiler to find how to overlay variables.
But what do I know. A state machine must be nonsense since so many people are using them.
so i did waste some time with your suggestions. but it is obviously no good for my project. i said first it is very conplicated. you probably cannot understand.
dont waste any more of my time to answering the distractions. i see you want to show you are better. but wait.
Go, go away. Please. __SNIFF__
Yes, I'll eagerly wait for the 223 code-compressed threads to run in the marvelous 8051 processor some companies uses as keyboard or mouse controller.
you better use the acme ACM8051 which comes in a rubber case.
PS what Raisonance cals "code compressor" Keil calls "optimize"
but it is obviously no good for my project
There's absolutely nothing obvious about that. That's because a) you haven't told us nearly enough about the actual project for anyone to know what could possibly be obvious about it, and b) your assessment of your own work is most probably wrong.
i said first it is very conplicated. you probably cannot understand.
Or maybe we simply refuse to believe you, because there's no particular reason we should. There are two reasonably likely possiblities at this point: either
1) you really don't know what you're talking about, or
2) a '51 is entirely the wrong choice of platform for your project
dont waste any more of my time to answering the distractions.
The only person who can waste any of your time is you. And given you insisted you were so terribly busy, you're certainly doing an awful lot of that.