Annotation of coherent/b/bin/db_400/i8086.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * i8086.h
                      3:  */
                      4: #define FPTEST 1
                      5: 
                      6: #include <sys/reg.h>
                      7: #include <ieeefp.h>
                      8: 
                      9: #define        TBIT    0x0100
                     10: 
                     11: /*
                     12:  * Operand or address size constants
                     13:  */
                     14: #define RM16   16
                     15: #define RM32   32
                     16: 
                     17: #define OPD16  16
                     18: #define OPD32  32
                     19: 
                     20: /*
                     21:  * Some debugger types
                     22:  */
                     23: #define DBBYTE 1
                     24: #define DBWORD 2
                     25: #define DBLONG 4
                     26: #define DBPTR32        4
                     27: #define DBPTR48        6
                     28: 
                     29: /*
                     30:  * Define the number of various register types available
                     31:  */
                     32: #define NSEGREGS       6
                     33: #define NCTRLREGS      4
                     34: #define NDBGREGS       8
                     35: #define NTSTREGS       8
                     36: 
                     37: /*
                     38:  * Offsets into the users area.
                     39:  */
                     40: #if 0
                     41: #define UREGOFF        (UPASIZE-(sizeof (struct ureg)))
                     42: #endif
                     43: 
                     44: /*
                     45:  * Registers from the user area after a core dump.
                     46:  */
                     47: struct ureg {
                     48:        long    ur_gs;
                     49:        long    ur_fs;
                     50:        long    ur_es;
                     51:        long    ur_ds;
                     52:        long    ur_di;
                     53:        long    ur_si;
                     54:        long    ur_bp;                  /* bp */
                     55:        long    ur_fill;                /* sp */
                     56:        long    ur_bx;                  /* bx */
                     57:        long    ur_dx;                  /* dx */
                     58:        long    ur_cx;                  /* cx */
                     59:        long    ur_ax;                  /* ax */
                     60:        long    ur_trapno;
                     61:        long    ur_id;                  /* id */
                     62:        long    ur_ip;                  /* ip */
                     63:        long    ur_cs;                  /* cs */
                     64:        long    ur_fw;                  /* fw */
                     65:        long    ur_sp;                  /* sp */
                     66:        long    ur_ss;                  /* ss */
                     67: #if FPTEST
                     68:        long    ur_filler;
                     69:        struct _fpstate ur_fpstate;
                     70: #endif
                     71: };
                     72: 
                     73: /*
                     74:  * Registers.
                     75:  */
                     76: typedef        struct reg {
                     77:        unsigned r_ax;                  /* Accumulator */
                     78:        unsigned r_bx;                  /* Base */
                     79:        unsigned r_cx;                  /* Count */
                     80:        unsigned r_dx;                  /* Data */
                     81:        unsigned r_sp;                  /* Stack pointer */
                     82:        unsigned r_bp;                  /* Base pointer */
                     83:        unsigned r_si;                  /* Source index */
                     84:        unsigned r_di;                  /* Destination index */
                     85:        unsigned r_cs;                  /* Code segment */
                     86:        unsigned r_ds;                  /* Data segment */
                     87:        unsigned r_ss;                  /* Stack segment */
                     88:        unsigned r_es;                  /* Extra segment */
                     89:        unsigned r_fs;
                     90:        unsigned r_gs;
                     91:        unsigned r_ip;                  /* Instruction pointer */
                     92:        unsigned r_fw;                  /* Status flags */
                     93:        unsigned valid;                 /* 0 = uninitialized */
                     94: } REG;
                     95: 
                     96: /*
                     97:  * Instruction table.
                     98:  */
                     99: typedef struct {
                    100:        unsigned i_code;                /* Code */
                    101:        unsigned i_mask;                /* Mask */
                    102:        char     *i_name;               /* Name */
                    103: } INS;
                    104: 
                    105: /*
                    106:  * Functions.
                    107:  */
                    108: char   *putifmt();
                    109: char   *fmatPercent();
                    110: 
                    111: /*
                    112:  * Global symbols.
                    113:  */
                    114: extern int     cacdata;                /* Current word in cache */
                    115: extern int     cacaddr;                /* Address of word in cache */
                    116: extern int     cacsegn;                /* Segment number of word in cache */
                    117: extern int     sysflag;                /* Executing a system call */
                    118: extern BIN     sin;                    /* Instruction after sys call */
                    119: extern REG     reg;                    /* General registers */
                    120: 
                    121: /*
                    122:  * Tables.
                    123:  */
                    124: extern char    *formtab[4][4];         /* Format table */
                    125: extern char    regitab[];              /* Register name table */
                    126: extern char    *regbtab[];             /* Byte register table */
                    127: extern char    *regwtab[];             /* Word register table */
                    128: extern char    *indmtab[];             /* Indirect mode table */
                    129: extern char    *jumptab[];             /* Jump table */
                    130: extern char    *sysitab[];             /* System call table */
                    131: extern INS     insrtab[];              /* Instruction table */
                    132: extern INS     fpinstab[];             /* 8087 Instruction table */
                    133: extern INS     vminstab[];             /* Virtual Mode Instruction table */
                    134: 
                    135: extern char    *opStrMap1[];           /* Map 1 of the instruction strings */
                    136: extern char    *opStrMap2[];           /* Map 2 of the instruction strings */
                    137: extern char    *grpStrMap0[];          /* Map "grp0" of the instruction strings */
                    138: extern char    *grpStrMap1[];          /* Map "grp1" of the instruction strings */
                    139: extern char    *grpStrMap2[];          /* Map "grp2" of the instruction strings */
                    140: extern char    *grpStrMap3[];          /* Map "grp3" of the instruction strings */
                    141: extern char    *grpStrMap4[];          /* Map "grp4" of the instruction strings */
                    142: extern char    *grpStrMap5[];          /* Map "grp5" of the instruction strings */
                    143: extern char    *grpStrMap6[];          /* Map "grp6" of the instruction strings */
                    144: extern char    *grpStrMap7[];          /* Map "grp7" of the instruction strings */
                    145: extern char    *grpStrMap8[];          /* Map "grp8" of the instruction strings */
                    146: extern char    **grpStrMap[];          /* Map "grp" of the instruction strings */
                    147: extern char    *segReg[];              /* Strings for the segment regs */
                    148: extern char    *genReg8[];             /* Strings for 8 bit general regs */
                    149: extern char    *genReg16[];            /* Strings for 16 bit general regs */
                    150: extern char    *genReg32[];            /* Strings for 32 bit general regs */
                    151: extern char    **genReg[];             /* Strings for 32 bit general regs */
                    152: extern char    *ctrlReg[];             /* Strings for the control regs */
                    153: extern char    *dbgReg[];              /* Strings for the debug regs */
                    154: extern char    *tstReg[];              /* Strings for the test regs */
                    155: extern char    *modRMtab16[];          /* Strings for 16b indirect addressing */
                    156: extern char    *modRMtab32[];          /* Strings for 16b indirect addressing */
                    157: extern char    **modRMtab[];           /* Strings for indirect addressing */
                    158: extern char    *sibtab0[];             /* Strings for indexed addressing * 1 */
                    159: extern char    *sibtab1[];             /* Strings for indexed addressing * 2 */
                    160: extern char    *sibtab2[];             /* Strings for indexed addressing * 4 */
                    161: extern char    *sibtab3[];             /* Strings for indexed addressing * 8 */
                    162: extern char    **sibtab[];             /* Strings for indexed addressing * 8 */

unix.superglobalmegacorp.com

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