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.
crust said:As a demonstration, I have a piece of 68K and 6811 assembly that implements a very simple round robin scheduler for some products that I've designed. If there is some interest, I can post them ... I think they are each 10 or so lines of assembly.
StupidDum said:crust said:As a demonstration, I have a piece of 68K and 6811 assembly that implements a very simple round robin scheduler for some products that I've designed. If there is some interest, I can post them ... I think they are each 10 or so lines of assembly.
that would be great!
_scheduler_task_suspend:
movem.l a0-a6/d0-d7,-(a7) ;* save the registers
movea.l _thread_queue,a3 ;* get the current thread
move.l a7,stackp(a3) ;* save the stack pointer
movea.l nexttask(a3),a4 ;* save the next task in a4
move.l #$0,nexttask(a3) ;* null the next pointer
jmp skip_null ;* normally start next thread
;* unneeded code deleted
skip_null:
move.w pid(a4),d0 ;* check if this is null task
bne new_task ;* not the null task, so execute
movea.l nexttask(a4),a4 ;* load the next task (might be null)
new_task:
move.l a4,_thread_queue ;* set the current thread ptr
move.l stackp(a4),a7 ;* restore the stack pointer
movem.l (a7)+,d0-d7/a0-a6 ;* restore registers
rte ;* kickstart new thread