4 * Copyright 2004 Develer S.r.l. (http://www.develer.com/)
5 * Copyright 1999,2000,2001 Bernardo Innocenti <bernie@develer.com>
6 * This file is part of DevLib - See devlib/README for information.
9 * \brief i386 context switch for WIN32
13 * \author Bernardo Innocenti <bernie@develer.com>
16 !!!!!! THIS FILE HAS NOT BEEN REVISED FOR THE NEW SCHEDULER API !!!!!!
18 __declspec(naked) void AsmSwitchContext(void * new_sp, void ** save_sp)
29 mov ebp,dword ptr [esp+24h] ; ebp <- save_sp
30 mov dword ptr [ebp],esp ; *save_sp = esp
31 mov esp,dword ptr [esp+20h] ; new_sp
43 __declspec(naked) void AsmReplaceContext(void * new_sp, void ** dummy)
47 mov esp,dword ptr [esp + 4] ; new_sp