Mail Archives: djgpp/1998/03/01/12:01:24
A while back this phenomenon was described in another thread but no one
responded. Since then I've looked at Allegro's sources, trying to figure out
what's going on, but I have no clue why this is happenning.
When using a DOS box from Windows95, after running the program resulting from
the code listed below, typing "mem" consistently crashes my DOS box back to
Windows with the message:
"This program has performed an illegal operation and will be terminated. Quit
all programs, and then restart your computer.
..and the "details" are:
"The program tried to execute an invalid instruction. Fault location:
0E2D:5C2C Interrupts in service: none."
If anyone can reproduce this phenomenon on their machine it may be worth
finding out why it happens, but I am stuck. Here's the code:
#include <stdio.h>
#include <allegro.h>
int main(int argc, char *argv[])
{
allegro_init();
install_keyboard();
install_timer();
/* install a digital sound driver -- removing this eliminates the behavior
*/
if (install_sound(DIGI_AUTODETECT, MIDI_NONE, argv[0]) != 0) {
printf("Error initialising sound system\n%s\n", allegro_error);
exit(1);
}
exit(0);
}
/*
gcc -O -Wall -o debug.exe debug.c -lalleg
*/
- Raw text -