1 ;* Copyright 2004 Develer S.r.l. (http://www.develer.com/)
2 ;* Copyright 1999,2000,2001 Bernie Innocenti <bernie@codewiz.org>
3 ;* This file is part of DevLib - See devlib/README for information.
6 ;* \author Bernie Innocenti <bernie@codewiz.org>
10 ;* Revision 1.2 2004/06/06 16:14:12 bernie
11 ;* Add DevLib license information.
13 ;* Revision 1.1 2004/05/23 17:27:00 bernie
14 ;* Import kern/ subdirectory.
18 !!!!!! THIS FILE HAS NOT BEEN REVISED FOR THE NEW SCHEDULER API !!!!!!
27 PUBLIC AsmSwitchContext
28 PUBLIC AsmReplaceContext
31 ;* Perform low-level process context switching
33 ;* void AsmSwitchContext(cpustack_t *new_sp, cpustack_t **save_sp)
36 ;* Replace current context with new process
38 ;* void AsmReplaceContext(cpustack_t *new_sp, cpustack_t **dummy)
44 ; pop 2nd parameter from the stack
64 st SP,[?GR+2] ; save old stack pointer
68 ld SP,?GR+0 ; load new stack pointer
70 ; restore all registers
88 ; restore execution in new context