|
|
1.1 root 1: /* defs.h 4.3 82/12/19 */
2:
3: /*
4: * adb - vax string table version; common definitions
5: */
6: #include <machine/psl.h>
7: #include <machine/pte.h>
8:
9: #include <sys/param.h>
10: #include <sys/dir.h>
11: #include <sys/user.h>
12:
13: #include <ctype.h>
14: #include <a.out.h>
15:
16: #include "mac.h"
17: #include "mode.h"
18: #include "head.h"
19:
20: /* access modes */
21: #define RD 0
22: #define WT 1
23:
24: #define NSP 0
25: #define ISP 1
26: #define DSP 2
27: #define STAR 4
28: #define STARCOM 0200
29:
30: /*
31: * Symbol types, used internally in calls to findsym routine.
32: * One the VAX this all degenerates since I & D symbols are indistinct.
33: * Basically we get NSYM==0 for `=' command, ISYM==DSYM otherwise.
34: */
35: #define NSYM 0
36: #define DSYM 1 /* Data space symbol */
37: #define ISYM DSYM /* Instruction space symbol == DSYM on VAX */
38:
39: #define BKPTSET 1
40: #define BKPTEXEC 2
41:
42: #define USERPS PSL
43: #define USERPC PC
44: #define BPT 03
45: #define TBIT 020
46: #define FD 0200
47: #define SETTRC 0
48: #define RDUSER 2
49: #define RIUSER 1
50: #define WDUSER 5
51: #define WIUSER 4
52: #define RUREGS 3
53: #define WUREGS 6
54: #define CONTIN 7
55: #define EXIT 8
56: #define SINGLE 9
57:
58: /* the quantities involving ctob() are located in the kernel stack. */
59: /* the others are in the pcb. */
60: #define KSP 0
61: #define ESP 4
62: #define SSP 8
63: #define USP (ctob(UPAGES)-5*sizeof(int))
64: #define R0 (ctob(UPAGES)-18*sizeof(int))
65: #define R1 (ctob(UPAGES)-17*sizeof(int))
66: #define R2 (ctob(UPAGES)-16*sizeof(int))
67: #define R3 (ctob(UPAGES)-15*sizeof(int))
68: #define R4 (ctob(UPAGES)-14*sizeof(int))
69: #define R5 (ctob(UPAGES)-13*sizeof(int))
70: #define R6 (ctob(UPAGES)-12*sizeof(int))
71: #define R7 (ctob(UPAGES)-11*sizeof(int))
72: #define R8 (ctob(UPAGES)-10*sizeof(int))
73: #define R9 (ctob(UPAGES)-9*sizeof(int))
74: #define R10 (ctob(UPAGES)-8*sizeof(int))
75: #define R11 (ctob(UPAGES)-7*sizeof(int))
76: #define AP (ctob(UPAGES)-21*sizeof(int))
77: #define FP (ctob(UPAGES)-20*sizeof(int))
78: #define PC (ctob(UPAGES)-2*sizeof(int))
79: #define PSL (ctob(UPAGES)-1*sizeof(int))
80: #define P0BR 80
81: #define P0LR 84
82: #define P1BR 88
83: #define P1LR 92
84:
85: #define MAXOFF 255
86: #define MAXPOS 80
87: #define MAXLIN 128
88: #define EOF 0
89: #define EOR '\n'
90: #define SP ' '
91: #define TB '\t'
92: #define QUOTE 0200
93: #define STRIP 0177
94: #define LOBYTE 0377
95: #define EVEN -2
96:
97: /* long to ints and back (puns) */
98: union {
99: INT I[2];
100: L_INT L;
101: } itolws;
102:
103: #ifndef vax
104: #define leng(a) ((long)((unsigned)(a)))
105: #define shorten(a) ((int)(a))
106: #define itol(a,b) (itolws.I[0]=(a), itolws.I[1]=(b), itolws.L)
107: #else
108: #define leng(a) itol(0,a)
109: #define shorten(a) ((short)(a))
110: #define itol(a,b) (itolws.I[0]=(b), itolws.I[1]=(a), itolws.L)
111: #endif
112:
113: /* result type declarations */
114: L_INT inkdot();
115: POS get();
116: POS chkget();
117: STRING exform();
118: L_INT round();
119: BKPTR scanbkpt();
120: VOID fault();
121:
122: struct pcb pcb;
123: int kernel;
124: int kcore;
125: struct pte *sbr;
126: int slr;
127: int masterpcbb;
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.