Annotation of 41BSD/cmd/adb/defs.h, revision 1.1

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.