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