smith_suez
Member level 3
can any one suggest a free RTOS for 8051 based application. This is for educational purpose.
Thanks in advance
Thanks in advance
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
; EXEC is the kernel entry for tasks. The kernel assumes exclusive use
; of registers R6 and R7 in each task register bank. Up to 4 tasks are
; supported by the kernel, as the 8051 has 4 register banks.
; Entry: R6 contains task blocking-time request.
exec:
mov r7,sp ;save task stack state
mov a,psw ;fetch current tsk reg bank ptr
bump_bank:
add a,#8 ; & bump it to next task's bank
anl a,#18h
mov psw,a
jnz bump_task_timer ;branch fwd if not last tsk in list
jnb new_tick,$ ;wait for next realtime tick
clr new_tick ; then reset realtime tick flag
bump_task_timer:
djnz r6,bump_bank
mov sp,r7 ;restore task stack state
ret ; & exit to task