Shop OBEX P1 Docs P2 Docs Learn Events
Pre-Emptive Multi-Threading / Tasking Demo - won't assemble HELP! Please — Parallax Forums

Pre-Emptive Multi-Threading / Tasking Demo - won't assemble HELP! Please

Trying to write a simple pre-emptive multi-thread/task switched. However, PNut complains "Register cannot exceed $1ff". I can not see how task_time exceeds $1ff, there are only a two screenfuls of lines of code and a few declarations. Please, can anyone see where I have gone wrong?

Is the label prefix "task" special in some way?

Comments

  • You have a constant with the same name as a label.
  • ElectrodudeElectrodude Posts: 1,657
    edited 2015-10-30 18:48
    Your task_time res line is reserving 0 longs. Don't you want it to reserve 1 long?

    "res 0" should really generate a compiler warning. It's caused so many problems for me and others.


    EDIT: Also, shouldn't your coginit line have "##@cog_start" and not just "#@cog_start"?
  • Seairth wrote: »
    You have a constant with the same name as a label.
    Thank you, Seairth. I coul not see that nor the one Electrodude has spotted. :)
  • Your task_time res line is reserving 0 longs. Don't you want it to reserve 1 long?

    "res 0" should really generate a compiler warning. It's caused so many problems for me and others.


    EDIT: Also, shouldn't your coginit line have "##@cog_start" and not just "#@cog_start"?

    Electrodude, you are quite correct on both counts, where as I seem to be having trouble with counts today :) Thank you very much, to you and Seairth for your very prompt help. Now to debugging.
Sign In or Register to comment.