Add proper report if something is trying to call a non initialized interrupt
aka CS=0000h, IP=0000h which is more than likely to crash the whole thing.
This commit is contained in:
parent
43292a26dc
commit
f71f131dcc
@ -128,6 +128,14 @@ void nec_int(uint16_t vector)
|
||||
I.TF = I.IF = 0;
|
||||
dest_off = ReadWord(vector);
|
||||
dest_seg = ReadWord(vector+2);
|
||||
|
||||
if ((dest_off == 0) && (dest_seg == 0))
|
||||
{
|
||||
printf("Something wrong with the interrupt, exiting...\n");
|
||||
//dump_memory();
|
||||
return;
|
||||
}
|
||||
|
||||
PUSH(I.sregs[CS]);
|
||||
PUSH(I.ip);
|
||||
I.ip = (WORD)dest_off;
|
||||
@ -151,6 +159,14 @@ static void nec_interrupt(uint32_t int_num, /*BOOLEAN*/ int md_flag)
|
||||
dest_off = ReadWord((int_num)*4);
|
||||
dest_seg = ReadWord((int_num)*4+2);
|
||||
|
||||
if ((dest_off == 0) && (dest_seg == 0))
|
||||
{
|
||||
printf("Something wrong with the interrupt, exiting...\n");
|
||||
//dump_memory();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
PUSH(I.sregs[CS]);
|
||||
PUSH(I.ip);
|
||||
I.ip = (WORD)dest_off;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user