Explanation: There is an optional switch for OSCreateTask() that is passed in the prio parameter. It's done this way because Salvo supports 16 distinct priorities in queue (normal) mode, and therefore the upper 4 bits of the priority parameter are unused. Instead of creating another parameter for OSCreateTask(), which would unnecessarily take up extra RAM and ROM, this extra information (don't start the task) is passed to OSCreateTask() in one of the upper bits of the prio parameter.

If you simply specify a priority that's greater than 15 and does not conflict with this extra bit, then OSCreateTask() will change the priority you specify to 15.

Thank you for your reply. I understand that you pass only bits to the kernel, but as I know before passing tha parameters the compiler calculates the value and after then it passes to the function. So, if I do:- 0x40 | 0x08- 0x48

in both cases it will return the same value.

So, if I set a number of priority that is not legal, but will imitate operation <| val> the kernel will not understand and will take it just like I tried to create a stopped task.