Annotation of coherent/b/bin/db_400/i8086c.c, revision 1.1

1.1     ! root        1: /* $Header: /src386/bin/db/RCS/i8086c.c,v 1.2 93/03/11 07:45:47 bin Exp Locker: bin $
        !             2:  *
        !             3:  *     The information contained herein is a trade secret of Mark Williams
        !             4:  *     Company, and  is confidential information.  It is provided  under a
        !             5:  *     license agreement,  and may be  copied or disclosed  only under the
        !             6:  *     terms of  that agreement.  Any  reproduction or disclosure  of this
        !             7:  *     material without the express written authorization of Mark Williams
        !             8:  *     Company or persuant to the license agreement is unlawful.
        !             9:  *
        !            10:  *     COHERENT Version 2.3.35
        !            11:  *     Copyright (c) 1982, 1983, 1984.
        !            12:  *     An unpublished work by Mark Williams Company, Chicago.
        !            13:  *     All rights reserved.
        !            14:  */
        !            15: /*
        !            16:  * A debugger.
        !            17:  * Tables for the Intel 8086.
        !            18:  *
        !            19:  * $Log:       i8086c.c,v $
        !            20:  * Revision 1.2  93/03/11  07:45:47  bin
        !            21:  * Hal: post NDP update that at least
        !            22:  * can st breakpoints.
        !            23:  * 
        !            24:  * Revision 1.1  92/06/10  14:36:44  bin
        !            25:  * Initial revision
        !            26:  * 
        !            27:  * Revision 1.1        88/10/17  04:04:02      src
        !            28:  * Initial revision
        !            29:  * 
        !            30:  *
        !            31:  * Revision: 386 version 92/05/01 
        !            32:  * Bernard Wald, Wald Software Consulting, Germany
        !            33:  *
        !            34:  */
        !            35: 
        !            36: #include <stdio.h>
        !            37: #include <sys/param.h>
        !            38: #include <l.out.h>
        !            39: #include "trace.h"
        !            40: #include "i8086.h"
        !            41: 
        !            42: /*
        !            43:  * Global variables.
        !            44:  */
        !            45: int    cacdata;
        !            46: int    cacaddr;
        !            47: int    cacsegn;
        !            48: int    sysflag;
        !            49: BIN    sin;
        !            50: REG    reg;
        !            51: 
        !            52: /*
        !            53:  * Breakpoint instruction
        !            54:  */
        !            55: BIN    bin ={
        !            56:        0xCC
        !            57: };
        !            58: 
        !            59: /*
        !            60:  * Table containing format strings.
        !            61:  */
        !            62: char *formtab[4][4] ={
        !            63:        "%4d",                          /* 'b', 'd' */
        !            64:        "%3u",                          /* 'b', 'u' */
        !            65:        "%04o",                         /* 'b', 'o' */
        !            66:        "%02x",                         /* 'b', 'x' */
        !            67:        "%6d",                          /* 'w', 'd' */
        !            68:        "%5u",                          /* 'w', 'u' */
        !            69:        "%07o",                         /* 'w', 'o' */
        !            70:        "%04x",                         /* 'w', 'x' */
        !            71:        "%10ld",                        /* 'l', 'd' */
        !            72:        "%11lu",                        /* 'l', 'u' */
        !            73:        "%012lo",                       /* 'l', 'o' */
        !            74:        "%08lx",                        /* 'l', 'x' */
        !            75:        "%8ld",                         /* 'v', 'd' */
        !            76:        "%8lu",                         /* 'v', 'd' */
        !            77:        "%09lo",                        /* 'v', 'o' */
        !            78:        "%06lx"                         /* 'v', 'x' */
        !            79: };
        !            80: 
        !            81: /*
        !            82:  * Fault types.
        !            83:  */
        !            84: char *signame[] ={
        !            85:        "Hangup",
        !            86:        "Interrupt",
        !            87:        "Quit",
        !            88:        "Illegal Instruction",
        !            89:        "Trace Trap",
        !            90:        "Abort",
        !            91:        "Emulator Trap",
        !            92:        "Floating Point Exception",
        !            93:        "Kill",
        !            94:        "Bus Error",
        !            95:        "Segmentation Violation",
        !            96:        "Invalid System Call Number",
        !            97:        "Write to Pipe with no Readers",
        !            98:        "Alarm",
        !            99:        "Termination",
        !           100:        "USR1",
        !           101:        "USR2",
        !           102:        "Death of Child",
        !           103:        "Restart",
        !           104:        "Window Change",
        !           105:        "Polled Event",
        !           106:        "Signal 23",
        !           107:        "Signal 24",
        !           108:        "Signal 25",
        !           109:        "Signal 26",
        !           110:        "Signal 27",
        !           111:        "Signal 28",
        !           112:        "Signal 29",
        !           113:        "Signal 30",
        !           114:        "Signal 31",
        !           115: };
        !           116: 
        !           117: /*
        !           118:  * Names of registers.
        !           119:  */
        !           120: char regitab[] ={
        !           121:        'b',    'p',
        !           122:        'd',    'i',
        !           123:        's',    'i',
        !           124:        '?',    '\0',
        !           125:        'e',    's',
        !           126:        'c',    'x',
        !           127:        'd',    'x',
        !           128:        'a',    'x',
        !           129:        'b',    'x',
        !           130:        'd',    's',
        !           131:        's',    'p',
        !           132:        's',    's',
        !           133:        '?',    '\0',
        !           134:        'i',    'p',
        !           135:        'c',    's',
        !           136:        'f',    'w',
        !           137:        '\0',   '\0'
        !           138: };
        !           139: 
        !           140: /*
        !           141:  * Table of system calls.
        !           142:  */
        !           143: char *sysitab[NMICALL] ={
        !           144:        NULL,
        !           145:        "exit",
        !           146:        "fork",
        !           147:        "read",
        !           148:        "write",
        !           149:        "open",
        !           150:        "close",
        !           151:        "wait",
        !           152:        "creat",
        !           153:        "link",
        !           154:        "unlink",
        !           155:        "exece",
        !           156:        "chdir",
        !           157:        NULL,
        !           158:        "mknod",
        !           159:        "chmod",
        !           160:        "chown",
        !           161:        "brk",
        !           162:        "stat",
        !           163:        "lseek",
        !           164:        "getpid",
        !           165:        "mount",
        !           166:        "umount",
        !           167:        "setuid",
        !           168:        "getuid",
        !           169:        "stime",
        !           170:        "ptrace",
        !           171:        "alarm",
        !           172:        "fstat",
        !           173:        "pause",
        !           174:        "utime",
        !           175:        NULL,
        !           176:        NULL,
        !           177:        "access",
        !           178:        "nice",
        !           179:        "ftime",
        !           180:        "sync",
        !           181:        "kill",
        !           182:        NULL,
        !           183:        NULL,
        !           184:        NULL,
        !           185:        "dup",
        !           186:        "pipe",
        !           187:        "times",
        !           188:        "profil",
        !           189:        "unique",
        !           190:        "setgid",
        !           191:        "getgid",
        !           192:        "signal",
        !           193:        NULL,
        !           194:        NULL,
        !           195:        "acct",
        !           196:        NULL,
        !           197:        NULL,
        !           198:        "ioctl",
        !           199:        NULL,
        !           200:        "getegid",
        !           201:        "geteuid",
        !           202:        NULL,
        !           203:        NULL,
        !           204:        "umask",
        !           205:        "chroot",
        !           206:        "setpgrp",
        !           207:        "getpgrp",
        !           208:        "sload",
        !           209:        "suload",
        !           210:        "fcntl",
        !           211:        "poll",
        !           212:        "msgctl",
        !           213:        "msgget",
        !           214:        "msgrcv",
        !           215:        "msgsnd",
        !           216:        "alarm2",
        !           217:        "tick",
        !           218: };

unix.superglobalmegacorp.com

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