1 ;* Copyright 2004 Develer S.r.l. (http://www.develer.com/)
2 ;* Copyright 1999,2000,2001 Bernardo Innocenti <bernie@develer.com>
3 ;* This file is part of DevLib - See devlib/README for information.
7 ;* \author Bernardo Innocenti <bernie@develer.com>
11 ;* Revision 1.2 2004/06/06 16:14:12 bernie
12 ;* Add DevLib license information.
14 ;* Revision 1.1 2004/05/23 17:27:00 bernie
15 ;* Import kern/ subdirectory.
19 !!!!!! THIS FILE HAS NOT BEEN REVISED FOR THE NEW SCHEDULER API !!!!!!
28 PUBLIC AsmSwitchContext
29 PUBLIC AsmReplaceContext
32 ;* Perform low-level process context switching
34 ;* void AsmSwitchContext(cpustack_t *new_sp, cpustack_t **save_sp)
37 ;* Replace current context with new process
39 ;* void AsmReplaceContext(cpustack_t *new_sp, cpustack_t **dummy)
45 ; pop 2nd parameter from the stack
65 st SP,[?GR+2] ; save old stack pointer
69 ld SP,?GR+0 ; load new stack pointer
71 ; restore all registers
89 ; restore execution in new context