Nuke unused macro and comment
[dragonfly.git] / usr.bin / doscmd / trap.h
blob898e550fcb9b627b6f49049846a620db24ab7784
1 /*
2 * Copyright (c) 1992, 1993, 1996
3 * Berkeley Software Design, Inc. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by Berkeley Software
16 * Design, Inc.
18 * THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND
19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE
22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
30 * BSDI trap.h,v 2.2 1996/04/08 19:33:09 bostic Exp
32 * $FreeBSD: src/usr.bin/doscmd/trap.h,v 1.2.2.1 2002/04/25 11:04:51 tg Exp $
33 * $DragonFly: src/usr.bin/doscmd/trap.h,v 1.2 2003/06/17 04:29:26 dillon Exp $
36 #define CLI 0xfa
37 #define STI 0xfb
38 #define PUSHF 0x9c
39 #define POPF 0x9d
40 #define INTn 0xcd
41 #define TRACETRAP 0xcc
42 #define IRET 0xcf
43 #define LOCK 0xf0
44 #define HLT 0xf4
46 #define OPSIZ 0x66
47 #define REPNZ 0xf2
48 #define REPZ 0xf3
50 #define INd 0xe4
51 #define INdX 0xe5
52 #define OUTd 0xe6
53 #define OUTdX 0xe7
55 #define IN 0xec
56 #define INX 0xed
57 #define OUT 0xee
58 #define OUTX 0xef
60 #define INSB 0x6c
61 #define INSW 0x6d
62 #define OUTSB 0x6e
63 #define OUTSW 0x6f
65 #define IOFS 0x64
66 #define IOGS 0x65
68 #define TWOBYTE 0x0f
69 #define LAR 0x02
71 #define AC_P 0x8000 /* Present */
72 #define AC_P0 0x0000 /* Priv Level 0 */
73 #define AC_P1 0x2000 /* Priv Level 1 */
74 #define AC_P2 0x4000 /* Priv Level 2 */
75 #define AC_P3 0x6000 /* Priv Level 3 */
76 #define AC_S 0x1000 /* Memory Segment */
77 #define AC_RO 0x0000 /* Read Only */
78 #define AC_RW 0x0200 /* Read Write */
79 #define AC_RWE 0x0600 /* Read Write Expand Down */
80 #define AC_EX 0x0800 /* Execute Only */
81 #define AC_EXR 0x0a00 /* Execute Readable */
82 #define AC_EXC 0x0c00 /* Execute Only Conforming */
83 #define AC_EXRC 0x0e00 /* Execute Readable Conforming */
84 #define AC_A 0x0100 /* Accessed */
86 extern void fake_int(regcontext_t *REGS, int);
87 extern void sigtrap(struct sigframe *sf);
88 extern void sigtrace(struct sigframe *sf);
89 extern void sigalrm(struct sigframe *sf);
90 extern void sigill(struct sigframe *sf);
91 extern void sigfpe(struct sigframe *sf);
92 extern void sigsegv(struct sigframe *sf);
93 extern void breakpoint(struct sigframe *sf);
94 #ifdef USE_VM86
95 extern void sigurg(struct sigframe *sf);
96 #else
97 extern void sigbus(struct sigframe *sf);
98 #endif