Shop OBEX P1 Docs P2 Docs Learn Events
SETMAP instruction question — Parallax Forums

SETMAP instruction question

ozpropdevozpropdev Posts: 2,792
edited 2013-05-16 20:36 in Propeller 2
Hi All.
In the multi-tasking example in the unofficial docs the following is shown


setmap #%1_010_010 'remap registers by task, 4 sets, 4 registers each

Does this mean that sets are limited to 8 registers?
As you only can have 4 tasks, the middle bit pattern seems to represent 8 sets as well?l?

Cheers

Comments

  • cgraceycgracey Posts: 14,151
    edited 2013-05-16 19:34
    Those two 3-bit sub-fields can be %000..%111 to represent 1/2/4/8/16/32/64/128 sets or registers. For task-switched remapping, it makes sense to have 4 sets (bits 5..3 = %010), but the set size (number of registers in a set, selected by bits 2..0) can be any power of 2 you'd like, up to 128.
  • ozpropdevozpropdev Posts: 2,792
    edited 2013-05-16 20:36
    Thanks Chip for clearing that up!
    Regards
Sign In or Register to comment.