]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/doscmd/cpu.c
This commit was generated by cvs2svn to compensate for changes in r79998,
[FreeBSD/FreeBSD.git] / usr.bin / doscmd / cpu.c
1 /*
2 ** No copyright ?!
3 **
4 ** $FreeBSD$
5 */
6 #include "doscmd.h"
7
8 /*
9 ** Hardware /0 interrupt
10 */
11 void
12 int00(regcontext_t *REGS)
13 {
14     debug(D_ALWAYS, "Divide by 0 in DOS program!\n");
15     exit(1);
16 }
17
18 void
19 int01(regcontext_t *REGS)
20 {
21     debug(D_ALWAYS, "INT 1 with no handler! (single-step/debug)\n");
22 }
23
24 void
25 int03(regcontext_t *REGS)
26 {
27     debug(D_ALWAYS, "INT 3 with no handler! (breakpoint)\n");
28 }
29
30 void
31 int0d(regcontext_t *REGS)
32 {
33     debug(D_ALWAYS, "IRQ5 with no handler!\n");
34 }
35
36 void
37 cpu_init(void)
38 {
39     u_long vec;
40
41     vec = insert_hardint_trampoline();
42     ivec[0x00] = vec;
43     register_callback(vec, int00, "int 00");
44
45     vec = insert_softint_trampoline();
46     ivec[0x01] = vec;
47     register_callback(vec, int01, "int 01");
48
49     vec = insert_softint_trampoline();
50     ivec[0x03] = vec;
51     register_callback(vec, int03, "int 03");
52
53     vec = insert_hardint_trampoline();
54     ivec[0x0d] = vec;
55     register_callback(vec, int0d, "int 0d");
56
57     vec = insert_null_trampoline();
58     ivec[0x34] = vec;   /* floating point emulator */
59     ivec[0x35] = vec;   /* floating point emulator */
60     ivec[0x36] = vec;   /* floating point emulator */
61     ivec[0x37] = vec;   /* floating point emulator */
62     ivec[0x38] = vec;   /* floating point emulator */
63     ivec[0x39] = vec;   /* floating point emulator */
64     ivec[0x3a] = vec;   /* floating point emulator */
65     ivec[0x3b] = vec;   /* floating point emulator */
66     ivec[0x3c] = vec;   /* floating point emulator */
67     ivec[0x3d] = vec;   /* floating point emulator */
68     ivec[0x3e] = vec;   /* floating point emulator */
69     ivec[0x3f] = vec;   /* floating point emulator */
70 }