: Use interrupts to simulate the multitasking and don't forget that the multitaskting is taken care of by a program not the hardware.
Thank you for the above advice. But I would be designing my own microcontroller, so I want the hardware to take care of the multitasking...............
I have thought of designing the microcontroller in such a way that it automatically starts executing the 1st task then after a fixed time (determined by a count down timer)a task switch occurs. My microcontroller should thus be able to carry out multitasking without any actual Operating System.