2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 /*****************************************************************************
10 AROS_LH2(ULONG, SetSR,
13 AROS_LHA(ULONG, newSR, D0),
14 AROS_LHA(ULONG, mask, D1),
17 struct ExecBase *, SysBase, 24, Exec)
20 Read/Modify the CPU status register in an easy way. Only the bits set in
21 the mask parameter will be changed.
24 newSR - New contents of sr.
25 mask - Bits to change.
42 ******************************************************************************/
48 .globl AROS_SLIB_ENTRY(SetSR,Exec)
49 .type AROS_SLIB_ENTRY(SetSR,Exec),@function
50 AROS_SLIB_ENTRY
(SetSR
,Exec
):
51 /* Do the real work in supervisor mode
52 Preserve a5 in a0 (faster than stack space)
61 /* The old value of sr now lies on the top of the stack.
62 d1 = (mask & newSR) | (~mask & SR)
73 /* Set new sr value */