Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Game sometimes crashes upon exit (Developers)

posted by Japheth Homepage, Germany (South), 29.05.2022, 06:21

> 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:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 182 users online (0 registered, 182 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum