Annotation of coherent/d/bin/db/i8086/i8086c.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * A debugger.
        !             3:  * Tables for the Intel 8086.
        !             4:  */
        !             5: #include <stdio.h>
        !             6: #include <sys/const.h>
        !             7: #include <l.out.h>
        !             8: #include "trace.h"
        !             9: #include "i8086.h"
        !            10: 
        !            11: /*
        !            12:  * Global variables.
        !            13:  */
        !            14: int    cacdata;
        !            15: int    cacaddr;
        !            16: int    cacsegn;
        !            17: int    sysflag;
        !            18: BIN    sin;
        !            19: REG    reg;
        !            20: 
        !            21: /*
        !            22:  * Breakpoint instruction
        !            23:  */
        !            24: BIN    bin ={
        !            25:        0xCC
        !            26: };
        !            27: 
        !            28: /*
        !            29:  * Table containing format strings.
        !            30:  */
        !            31: char *formtab[4][4] ={
        !            32:        "%4d",                          /* 'b', 'd' */
        !            33:        "%3u",                          /* 'b', 'u' */
        !            34:        "%04o",                         /* 'b', 'o' */
        !            35:        "%02x",                         /* 'b', 'x' */
        !            36:        "%6d",                          /* 'w', 'd' */
        !            37:        "%5u",                          /* 'w', 'u' */
        !            38:        "%07o",                         /* 'w', 'o' */
        !            39:        "%04x",                         /* 'w', 'x' */
        !            40:        "%10ld",                        /* 'l', 'd' */
        !            41:        "%11lu",                        /* 'l', 'u' */
        !            42:        "%012lo",                       /* 'l', 'o' */
        !            43:        "%08lx",                        /* 'l', 'x' */
        !            44:        "%8ld",                         /* 'v', 'd' */
        !            45:        "%8lu",                         /* 'v', 'd' */
        !            46:        "%09lo",                        /* 'v', 'o' */
        !            47:        "%06lx"                         /* 'v', 'x' */
        !            48: };
        !            49: 
        !            50: /*
        !            51:  * Fault types.
        !            52:  */
        !            53: char *signame[] ={
        !            54:        "Hangup",
        !            55:        "Interrupt",
        !            56:        "Quit",
        !            57:        "Alarm clock",
        !            58:        "Termination signal",
        !            59:        "Restart",
        !            60:        "Bad argument to system call",
        !            61:        "Write on open pipe",
        !            62:        "Kill",
        !            63:        "Breakpoint",
        !            64:        "Segmentation violation",
        !            65:        "Divide error",
        !            66:        "Overflow",
        !            67:        "Signal 14",
        !            68:        "Signal 15",
        !            69:        "Signal 16",
        !            70: };
        !            71: 
        !            72: /*
        !            73:  * Names of registers.
        !            74:  */
        !            75: char regitab[] ={
        !            76:        'b',    'p',
        !            77:        'd',    'i',
        !            78:        's',    'i',
        !            79:        '?',    '\0',
        !            80:        'e',    's',
        !            81:        'c',    'x',
        !            82:        'd',    'x',
        !            83:        'a',    'x',
        !            84:        'b',    'x',
        !            85:        'd',    's',
        !            86:        's',    'p',
        !            87:        's',    's',
        !            88:        '?',    '\0',
        !            89:        'i',    'p',
        !            90:        'c',    's',
        !            91:        'f',    'w',
        !            92:        '\0',   '\0'
        !            93: };
        !            94: 
        !            95: /*
        !            96:  * Byte registers.
        !            97:  */
        !            98: char *regbtab[] ={
        !            99:        "al",   "cl",   "dl",   "bl",   "ah",   "ch",   "dh",   "bh"
        !           100: };
        !           101: 
        !           102: /*
        !           103:  * Word registers.
        !           104:  */
        !           105: char *regwtab[] ={
        !           106:        "ax",   "cx",   "dx",   "bx",   "sp",   "bp",   "si",   "di"
        !           107: };
        !           108: 
        !           109: /*
        !           110:  * Indirect mode table.
        !           111:  */
        !           112: char *indmtab[] ={
        !           113:        "(bx)(si)",
        !           114:        "(bx)(di)",
        !           115:        "(bp)(si)",
        !           116:        "(bp)(di)",
        !           117:        "(si)",
        !           118:        "(di)",
        !           119:        "(bp)",
        !           120:        "(bx)"
        !           121: };
        !           122: 
        !           123: /*
        !           124:  * Jump table.
        !           125:  */
        !           126: char *jumptab[] ={
        !           127:        "jo",
        !           128:        "jno",
        !           129:        "jb",
        !           130:        "jae",
        !           131:        "je",
        !           132:        "jne",
        !           133:        "jbe",
        !           134:        "ja",
        !           135:        "js",
        !           136:        "jns",
        !           137:        "jp",
        !           138:        "jnp",
        !           139:        "jl",
        !           140:        "jge",
        !           141:        "jle",
        !           142:        "jg"
        !           143: };
        !           144: 
        !           145: /*
        !           146:  * Table of system calls.
        !           147:  */
        !           148: char *sysitab[NMICALL] ={
        !           149:        NULL,
        !           150:        "exit",
        !           151:        "fork",
        !           152:        "read",
        !           153:        "write",
        !           154:        "open",
        !           155:        "close",
        !           156:        "wait",
        !           157:        "creat",
        !           158:        "link",
        !           159:        "unlink",
        !           160:        "exece",
        !           161:        "chdir",
        !           162:        NULL,
        !           163:        "mknod",
        !           164:        "chmod",
        !           165:        "chown",
        !           166:        "brk",
        !           167:        "stat",
        !           168:        "lseek",
        !           169:        "getpid",
        !           170:        "mount",
        !           171:        "umount",
        !           172:        "setuid",
        !           173:        "getuid",
        !           174:        "stime",
        !           175:        "ptrace",
        !           176:        "alarm",
        !           177:        "fstat",
        !           178:        "pause",
        !           179:        "utime",
        !           180:        NULL,
        !           181:        NULL,
        !           182:        "access",
        !           183:        "nice",
        !           184:        "ftime",
        !           185:        "sync",
        !           186:        "kill",
        !           187:        NULL,
        !           188:        NULL,
        !           189:        NULL,
        !           190:        "dup",
        !           191:        "pipe",
        !           192:        "times",
        !           193:        "profil",
        !           194:        "unique",
        !           195:        "setgid",
        !           196:        "getgid",
        !           197:        "signal",
        !           198:        NULL,
        !           199:        NULL,
        !           200:        "acct",
        !           201:        NULL,
        !           202:        NULL,
        !           203:        "ioctl",
        !           204:        NULL,
        !           205:        "getegid",
        !           206:        "geteuid",
        !           207:        NULL,
        !           208:        NULL,
        !           209:        "umask",
        !           210:        "chroot",
        !           211:        NULL,
        !           212:        NULL,
        !           213:        "sload",
        !           214:        "suload",
        !           215: };

unix.superglobalmegacorp.com

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