Page 1 of 1

Use reuse single label in a task multiple times

PostPosted: Wed Sep 28, 2005 2:54 am
by aek
Unfortunately, no.

ImageCraft's Code Compressor places all the indirect function calls in a table (func_lit, IIRC) that must be referenced when doing call-by-pointer (which is how context switches occur). The only way for the Salvo context switcher to find the address is via a unique label.

Maybe you could use a macro ...?

Note also that if the tasks have the exact same form, you can define just a single task function and use it in 5 different tasks. You can use OStID() inside the task to figure out which task it is (#1, #2, etc.) and drive task-specific actions based on that ...

------------------


Re: Use reuse single label in a task multiple times

PostPosted: Wed Sep 28, 2005 8:26 am
by Lo_Vaquero
Is it possible to use the same label multiple times in the same task? I have tried doing so with the Imagecraft ICCAVR (v7.01) compiler, but I get redifintion errors.

I have multiple tasks that needs to delay multiple times each. It would be much easier to only have to declate one label per task rather than the 4-6 per task that I would have to do otherwise.

The end result would be 5 tasks v. 27...