Annotation of coherent/b/bin/c/n1/i8086/snap1.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * Machine specific parts of the
        !             3:  * debug routines.
        !             4:  * Many are macros in cc1mch.h,
        !             5:  * repeated here for documentation.
        !             6:  * Both SMALL and LARGE model of
        !             7:  * the Intel 8086.
        !             8:  */
        !             9: #ifdef   vax
        !            10: #include "INC$LIB:cc1.h"
        !            11: #else
        !            12: #include "cc1.h"
        !            13: #endif
        !            14: 
        !            15: /*
        !            16:  * Print a pointer.
        !            17:  * This is actually host dependent
        !            18:  * and required even if TINY by other
        !            19:  * diagnostic messages.
        !            20:  */
        !            21: psnap(p)
        !            22: char *p;
        !            23: {
        !            24: #if RUNNING_LARGE
        !            25:        struct  {
        !            26:                int     offs;
        !            27:                int     base;
        !            28:        };
        !            29: 
        !            30:        printf("%04x:%04x", p.base, p.offs);
        !            31: #else
        !            32: #ifdef vax
        !            33:        printf("%08x", (int) p);
        !            34: #else
        !            35:        printf("%04x", (int) p);
        !            36: #endif
        !            37: #endif
        !            38: }
        !            39: 
        !            40: #if !TINY
        !            41: /*
        !            42:  * Print an ival_t.
        !            43:  * #define isnap(x)    printf(" %d", x)
        !            44:  */
        !            45: 
        !            46: /*
        !            47:  * Print an lval_t.
        !            48:  * #define lsnap(x)    printf(" %ld", x)
        !            49:  */
        !            50: 
        !            51: /*
        !            52:  * Print a dval_t.
        !            53:  */
        !            54: dsnap(d)
        !            55: dval_t d;
        !            56: {
        !            57:        register int i;
        !            58: 
        !            59:        for (i=0; i<8; ++i)
        !            60:                printf(" %02x", d[i]&0377);
        !            61: }
        !            62: 
        !            63: /*
        !            64:  * Print the t_cost field.
        !            65:  * #define csnap(x)    (x!=0 ? printf(" cost=%d", x) : 0)
        !            66:  */
        !            67: 
        !            68: /*
        !            69:  * Print the t_flag field.
        !            70:  * #define fsnap(x)    (x!=0 ? printf(" flag=%08lx", x) : 0)
        !            71:  */
        !            72: 
        !            73: /*
        !            74:  * Print machine dependent leaves.
        !            75:  * #define mdlsnap(x)  snaptype(x, "Bad leaf");
        !            76:  */
        !            77: 
        !            78: /*
        !            79:  * Print machine dependent op nodes.
        !            80:  * #define mdosnap(x)  snaptype(x, "Bad op");
        !            81:  */
        !            82: 
        !            83: #endif

unix.superglobalmegacorp.com

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