Annotation of Net2/arch/i386/isa/debug.h, revision 1.1

1.1     ! root        1: /* debug.h */
        !             2: 
        !             3: /* #define     SHOW_A_LOT */
        !             4: 
        !             5: #ifdef INTR_DEBUG
        !             6: #define INTRLOCAL(label) label
        !             7: #else /* not INTR_DEBUG */
        !             8: #define INTRLOCAL(label) L/**/label
        !             9: #endif /* INTR_DEBUG */
        !            10: 
        !            11: #define        BDBTRAP(name) \
        !            12:        ss ; \
        !            13:        cmpb    $0,_bdb_exists ; \
        !            14:        je      1f ; \
        !            15:        testb   $SEL_RPL_MASK,4(%esp) ; \
        !            16:        jne     1f ; \
        !            17:        ss ; \
        !            18: bdb_/**/name/**/_ljmp: ; \
        !            19:        ljmp    $0,$0 ; \
        !            20: 1:
        !            21: 
        !            22: #ifdef INTR_DEBUG
        !            23: #define        COUNT_EVENT(group, event)       incl    (group) + (event) * 4
        !            24: #else /* not INTR_DEBUG */
        !            25: #define        COUNT_EVENT(group, event)
        !            26: #endif /* INTR_DEBUG */
        !            27: 
        !            28: #define        COUNT_INTR(group, event)        incl    (group) + (event) * 4
        !            29: 
        !            30: #ifdef SHOW_A_LOT
        !            31: 
        !            32: #define        GREEN           0x27    /* 0x27 for true green, 0x07 for mono */
        !            33: #define        CLI_STI_X       63
        !            34: #define        CPL_X           46
        !            35: #define        IMEN_X          64
        !            36: #define        IPENDING_X      29
        !            37: #define        RED             0x47    /* 0x47 for true red, 0x70 for mono */
        !            38: 
        !            39: #define        SHOW_BIT(bit) ; \
        !            40:        movl    %ecx,%eax ; \
        !            41:        shr     $bit,%eax ; \
        !            42:        andl    $1,%eax ; \
        !            43:        movb    bit_colors(%eax),%al ; \
        !            44:        movb    %al,bit * 2 + 1(%ebx)
        !            45: 
        !            46: #define        SHOW_BITS(var, screen_offset) ; \
        !            47:        pushl   %ebx ; \
        !            48:        pushl   %ecx ; \
        !            49:        movl    _Crtat,%ebx ; \
        !            50:        addl    $screen_offset * 2,%ebx ; \
        !            51:        movl    _/**/var,%ecx ; \
        !            52:        call    show_bits ; \
        !            53:        popl    %ecx ; \
        !            54:        popl    %ebx
        !            55: 
        !            56: #define        SHOW_CLI \
        !            57:        COUNT_EVENT(_intrcnt_show, 0) ; \
        !            58:        pushl   %eax ; \
        !            59:        movl    _Crtat,%eax ; \
        !            60:        movb    $RED,CLI_STI_X * 2 + 1(%eax) ; \
        !            61:        popl    %eax
        !            62: 
        !            63: #define        SHOW_CPL \
        !            64:        COUNT_EVENT(_intrcnt_show, 1) ; \
        !            65:        SHOW_BITS(cpl, CPL_X) ; \
        !            66: 
        !            67: #define        SHOW_IMEN \
        !            68:        COUNT_EVENT(_intrcnt_show, 2) ; \
        !            69:        SHOW_BITS(imen, IMEN_X)
        !            70: 
        !            71: #define        SHOW_IPENDING \
        !            72:        COUNT_EVENT(_intrcnt_show, 3) ; \
        !            73:        SHOW_BITS(ipending, IPENDING_X)
        !            74: 
        !            75: #define        SHOW_STI \
        !            76:        COUNT_EVENT(_intrcnt_show, 4) ; \
        !            77:        pushl   %eax ; \
        !            78:        movl    _Crtat,%eax ; \
        !            79:        movb    $GREEN,CLI_STI_X * 2 + 1(%eax) ; \
        !            80:        popl    %eax
        !            81: 
        !            82: #else /* not SHOW_A_LOT */
        !            83: 
        !            84: #define        SHOW_CLI        COUNT_EVENT(_intrcnt_show, 0)
        !            85: #define        SHOW_CPL        COUNT_EVENT(_intrcnt_show, 1)
        !            86: #define        SHOW_IMEN       COUNT_EVENT(_intrcnt_show, 2)
        !            87: #define        SHOW_IPENDING   COUNT_EVENT(_intrcnt_show, 3)
        !            88: #define        SHOW_STI        COUNT_EVENT(_intrcnt_show, 4)
        !            89: 
        !            90: #endif /* SHOW_A_LOT */
        !            91: 
        !            92:        .data
        !            93:        .globl  _bdb_exists
        !            94: _bdb_exists:
        !            95:        .long   0
        !            96:        .text

unix.superglobalmegacorp.com

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