Pumpkin, Inc.

Pumpkin User Forums

Use reuse single label in a task multiple times

If you can't make Salvo do what you want it to do, post it here.

Use reuse single label in a task multiple times

Postby aek » Wed Sep 28, 2005 2:54 am

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 ...


Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: Use reuse single label in a task multiple times

Postby Lo_Vaquero » Wed Sep 28, 2005 8:26 am

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...

Posts: 9
Joined: Tue Sep 27, 2005 11:00 pm

Return to Coding

Who is online

Users browsing this forum: No registered users and 1 guest