SETPSR(2) (For 88k Systems Only) SETPSR(2)
NAME
setpsr, getpsr - set/get Processor Status Register
SYNOPSIS
#include <sys/m88kbcs.h>
unsigned setpsr (psr);
unsigned psr;
unsigned getpsr ();
DESCRIPTION
setpsr sets certain bits in the Processor Status Register
(PSR) of the calling process. The precise effects of these
bits are defined in the Motorola MC8810 User's Manual.
Setting the C bit (PSR_C) sets the carry bit; clearing it
will reset the carry bit.
Setting the MXM bit (PSR_MXM) will disable misaligned access
exceptions. With the bit clear, a misaligned access will
cause a SIGBUS signal to be delivered to the process.
Setting the BO bit (PSR_BO) will select Little-Endian byte
order. Clearing this bit will select Big-Endian, which is
the normal mode is Big-Endian. All interfaces to the system
must always be in Big-Endian byte order.
Setting the SER bit (PSR_SER) will select serial operation.
Clearing this bit will select concurrent operation, which is
the normal mode.
The psr value may be formed by the OR of the following:
PSR_C 0x20000000
PSR_MXM 0x10000000
PSR_BO 0x00000004
PSR_SER 0x40000000
Page 1 May 1989
SETPSR(2) (For 88k Systems Only) SETPSR(2)
RETURN VALUE
setpsr() returns the previous value of the Processor Status
Register.
getpsr() returns the current value of the Processor Status
Register.
Page 2 May 1989