diff options
author | dyson <dyson@FreeBSD.org> | 1997-08-09 01:43:15 +0000 |
---|---|---|
committer | dyson <dyson@FreeBSD.org> | 1997-08-09 01:43:15 +0000 |
commit | 305573cb2990c5d329d149cef5a3b5533b1e8fd9 (patch) | |
tree | df06304b637358dbe8a006fdb7a6ea5955fee179 /usr.bin/doscmd/cpu.c | |
parent | dede28832bba6a9de7a428ff58df92439bddbc9c (diff) | |
download | FreeBSD-src-305573cb2990c5d329d149cef5a3b5533b1e8fd9.zip FreeBSD-src-305573cb2990c5d329d149cef5a3b5533b1e8fd9.tar.gz |
Add our doscmd to the tree. This is a result of work from BSDI, and
a group of dos emulator developers.
Submitted by: Jonathan Lemon <jlemon@americantv.com>
Obtained from: BSDI
Diffstat (limited to 'usr.bin/doscmd/cpu.c')
-rw-r--r-- | usr.bin/doscmd/cpu.c | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/usr.bin/doscmd/cpu.c b/usr.bin/doscmd/cpu.c new file mode 100644 index 0000000..bad8725 --- /dev/null +++ b/usr.bin/doscmd/cpu.c @@ -0,0 +1,70 @@ +/* +** No copyright ?! +** +** $Id: cpu.c,v 1.5 1996/09/25 11:05:54 miff Exp $ +*/ +#include "doscmd.h" + +/* +** Hardware /0 interrupt +*/ +void +int00(regcontext_t *REGS) +{ + debug(D_ALWAYS, "Divide by 0 in DOS program!\n"); + exit(1); +} + +void +int01(regcontext_t *REGS) +{ + debug(D_ALWAYS, "INT 1 with no handler! (single-step/debug)\n"); +} + +void +int03(regcontext_t *REGS) +{ + debug(D_ALWAYS, "INT 3 with no handler! (breakpoint)\n"); +} + +void +int0d(regcontext_t *REGS) +{ + debug(D_ALWAYS, "IRQ5 with no handler!\n"); +} + +void +cpu_init(void) +{ + u_long vec; + + vec = insert_hardint_trampoline(); + ivec[0x00] = vec; + register_callback(vec, int00, "int 00"); + + vec = insert_softint_trampoline(); + ivec[0x01] = vec; + register_callback(vec, int01, "int 01"); + + vec = insert_softint_trampoline(); + ivec[0x03] = vec; + register_callback(vec, int03, "int 03"); + + vec = insert_hardint_trampoline(); + ivec[0x0d] = vec; + register_callback(vec, int0d, "int 0d"); + + vec = insert_null_trampoline(); + ivec[0x34] = vec; /* floating point emulator */ + ivec[0x35] = vec; /* floating point emulator */ + ivec[0x36] = vec; /* floating point emulator */ + ivec[0x37] = vec; /* floating point emulator */ + ivec[0x38] = vec; /* floating point emulator */ + ivec[0x39] = vec; /* floating point emulator */ + ivec[0x3a] = vec; /* floating point emulator */ + ivec[0x3b] = vec; /* floating point emulator */ + ivec[0x3c] = vec; /* floating point emulator */ + ivec[0x3d] = vec; /* floating point emulator */ + ivec[0x3e] = vec; /* floating point emulator */ + ivec[0x3f] = vec; /* floating point emulator */ +} |