Game sometimes crashes upon exit (Developers)
> Watcom C compiler). Any thoughts or suggestions would be welcome!
Since the crash occurs after the "old" interrupt vector has been restored, this saved vector most likely has been inadvertently modified.
Looking into the .map file to see the location of the saved vector:
074d:035d+ _FireHeld
074d:0af4+ _star_background
074d:2a34* _ship_background_new
074d:2a4c* _ship_sprite
074d:2a7c* _ship_background_old
074d:2a94+ _OldKbdRoutine
074d:2a98+ _Sprites
As you can see, OldKbdRoutine is located behind star_background ( the symbols marked with "*" may be ignored since they are "unused" ).
star_background is defined as:
unsigned char star_background[8000];
and accessed:
Offset = TempRand&0x1FFF;
memset(star_background+Offset, Star, 1);
The problem is that 0x2000 is 8192, not 8000.
---
MS-DOS forever!
Complete thread:
- Game sometimes crashes upon exit - KarlG, 28.05.2022, 21:59
- Game sometimes crashes upon exit - Japheth, 29.05.2022, 06:21
- Game sometimes crashes upon exit - tkchia, 29.05.2022, 09:53
- Game sometimes crashes upon exit - KarlG, 29.05.2022, 15:26
- Game sometimes crashes upon exit - KarlG, 29.05.2022, 15:24
- Game sometimes crashes upon exit - tkchia, 29.05.2022, 09:53
- Game sometimes crashes upon exit - Japheth, 29.05.2022, 06:21