Writing an application as two or more tasks is often an easier way of writing control logic than trying to code it as part of a single 'super loop'. The design of the Enhanced Mid-Range devices incorporates a bigger stack, 16 levels deep compared to the normal 8 and a software accessible stack pointer. These features make it easy to create two separate tasks that can be switched with very few instructions.





