1: /* 2: * Copyright (c) 1987 Regents of the University of California. 3: * All rights reserved. The Berkeley software License Agreement 4: * specifies the terms and conditions for redistribution. 5: * 6: * @(#)DEFS.h 1.2 (2.11BSD GTE) 12/24/92 7: */ 8: 9: #ifndef _DEFS_ 10: #define _DEFS_ 11: /* 12: * Machine language assist. Uses the C preprocessor to produce suitable code 13: * for various 11's. 14: */ 15: #include "localopts.h" 16: #include "assym.h" 17: 18: #define INTSTK 500. /* bytes for interrupt stack */ 19: 20: #ifdef PROF 21: # define HIGH 06 /* See also the :splfix files */ 22: # define HIPRI 0300 /* Many spl's are done in-line */ 23: #else 24: # define HIGH 07 25: # define HIPRI 0340 26: #endif 27: 28: # define NET 02 29: # define NETPRI 0100 30: 31: /* 32: * adapt to any 11 at boot 33: */ 34: #ifdef GENERIC 35: # undef NONSEPARATE /* Enable support for separate I&D if found */ 36: #endif 37: 38: #ifdef NONSEPARATE /* 11/40, 34, 23, 24 */ 39: # define mfpd mfpi 40: # define mtpd mtpi 41: #endif 42: 43: #if defined(GENERIC) || defined(SUPERVISOR) || defined(NONSEPARATE) 44: /* 45: * GENERIC: movb instruction are available on all PDP-11s. 46: * 47: * SUPERVISOR: can't use spl instructions even if the machine 48: * supports them since spl is a privileged instruction. 49: */ 50: # define SPLHIGH movb $HIPRI,PS 51: # define SPL7 movb $0340,PS 52: # define SPLLOW clrb PS 53: # define SPLNET movb $NETPRI,PS 54: #else 55: # define SPLHIGH spl HIGH 56: # define SPL7 spl 7 57: # define SPLLOW spl 0 58: # define SPLNET spl NET 59: #endif 60: 61: 62: #define CONST(s, x, v) DEC_/**/s(x); x=v; 63: #define INT(s, x, v) .data; .even; DEC_/**/s(x); x:; v; .text; 64: #define CHAR(s, x, v) .data; DEC_/**/s(x); x:; .byte v; .text; 65: #define STRING(s, x, v) .data; DEC_/**/s(x); x:; v; .text; 66: #define SPACE(s, x, n) .bss; .even; DEC_/**/s(x); x:; .=.+[n]; .text; 67: 68: #define DEC_GLOBAL(x) .globl x; 69: #define DEC_LOCAL(x) 70: 71: /* 72: * Macros for compatibility with standard library routines that we have 73: * copies of ... 74: */ 75: #define ENTRY(x) .globl _/**/x; _/**/x:; 76: #define ASENTRY(x) .globl x; x:; 77: 78: #define P_ENTRY(x) .globl _/**/x; _/**/x:; PROFCODE; 79: #define P_ASENTRY(x) .globl x; x:; PROFCODE; 80: 81: /* 82: * PROFCODE: 83: * - kernel profiling not currently implemented. 84: */ 85: #define PROFCODE ; 86: #endif _DEFS_