Article View: comp.os.xinu
Article #100Re: ctxsw routine for M68000
From: Serge Rouveyrol
Date: Fri, 09 Oct 1992 07:27
Date: Fri, 09 Oct 1992 07:27
41 lines
1221 bytes
1221 bytes
In article <1992Oct2.195944.772@nntpd2.cxo.dec.com> kgibsonkgibson@cxcad%decwrl.dec.com (Ken Gibson) writes:
>
> Can someone post an M68000 version of the assembly language context switch
>routine _ctxsw for Xinu?
>
>Many Thanks
*
* ctxsw(OldSp,NewSp)
* int *OldSp, *NewSp;
*
NBREGS EQU 15
ADRRET EQU 15*4
OLDSP EQU ADRRET+4
NEWSP EQU OLDSP+4
xdef _ctxsw
_ctxsw:
*
* sauvegarde des registres du processus courant dans sa pile
*
movem.l d0-a6,-(a7)
*
* l'instant magique (eucharistique meme) : on fait l'echange des piles
*
move.l OLDSP(a7),a0
move.l sp,(a0)
move.l NEWSP(a7),a0
move.l (a0),a7
*
* rechargement des registres du nouveau processus a partir de sa pile
*
movem.l (a7)+,a6-d0
*
* bye!
*
rts
--
serge@imag.fr
Technical Details
Message-ID:
<41383@imag.imag.fr>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!corton!babbage!imag!sergeReferences:
<1992Oct2.195944.772@nntpd2.cxo.dec.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!corton!babbage!imag!serge From: serge@imag.fr (Serge Rouveyrol) Newsgroups: comp.os.xinu Subject: Re: ctxsw routine for M68000 Message-ID: <41383@imag.imag.fr> Date: 9 Oct 92 07:27:42 GMT References: <1992Oct2.195944.772@nntpd2.cxo.dec.com> Organization: IMAG Institute, University of Grenoble, France Lines: 41