141474Smckusick /* 241474Smckusick * Copyright (c) 1982, 1986 Regents of the University of California. 341474Smckusick * All rights reserved. 441474Smckusick * 541474Smckusick * %sccs.include.redist.c% 641474Smckusick * 7*49137Skarels * @(#)psl.h 7.2 (Berkeley) 05/04/91 841474Smckusick */ 941474Smckusick 10*49137Skarels #ifndef PSL_C 1141474Smckusick /* 1241474Smckusick * MC68000 program status word 1341474Smckusick */ 1441474Smckusick 1541474Smckusick #define PSL_C 0x0001 /* carry bit */ 1641474Smckusick #define PSL_V 0x0002 /* overflow bit */ 1741474Smckusick #define PSL_Z 0x0004 /* zero bit */ 1841474Smckusick #define PSL_N 0x0008 /* negative bit */ 1941474Smckusick #define PSL_X 0x0010 /* extend bit */ 2041474Smckusick #define PSL_ALLCC 0x001F /* all cc bits - unlikely */ 2141474Smckusick #define PSL_IPL0 0x0000 /* interrupt priority level 0 */ 2241474Smckusick #define PSL_IPL1 0x0100 /* interrupt priority level 1 */ 2341474Smckusick #define PSL_IPL2 0x0200 /* interrupt priority level 2 */ 2441474Smckusick #define PSL_IPL3 0x0300 /* interrupt priority level 3 */ 2541474Smckusick #define PSL_IPL4 0x0400 /* interrupt priority level 4 */ 2641474Smckusick #define PSL_IPL5 0x0500 /* interrupt priority level 5 */ 2741474Smckusick #define PSL_IPL6 0x0600 /* interrupt priority level 6 */ 2841474Smckusick #define PSL_IPL7 0x0700 /* interrupt priority level 7 */ 2941474Smckusick #define PSL_S 0x2000 /* supervisor enable bit */ 3041474Smckusick #define PSL_T 0x8000 /* trace enable bit */ 3141474Smckusick 3241474Smckusick #define PSL_LOWIPL (PSL_S) 3341474Smckusick #define PSL_HIGHIPL (PSL_S | PSL_IPL7) 3441474Smckusick #define PSL_IPL (PSL_IPL7) 3541474Smckusick #define PSL_USER (0) 3641474Smckusick 3741474Smckusick #define PSL_MBZ 0x58E0 /* must be zero bits */ 3841474Smckusick 3941474Smckusick #define PSL_USERSET (0) 4041474Smckusick #define PSL_USERCLR (PSL_S | PSL_IPL7 | PSL_MBZ) 41*49137Skarels 42*49137Skarels /* 43*49137Skarels * Macros to decode processor status word. 44*49137Skarels */ 45*49137Skarels #define USERMODE(ps) (((ps) & PSL_S) == 0) 46*49137Skarels #define BASEPRI(ps) (((ps) & PSL_IPL7) == 0) 47*49137Skarels #endif 48