Re: Re: A86: Problems compiling


[Prev][Next][Index][Thread]

Re: Re: A86: Problems compiling




Well, in my development of Z80 code, the cause of random crashes was usually
interrupt related since interrupts do not occur at predicatable code
execution spots and interrupts (especially grayscale routines) rely timing
which may work just because of when and how the program started. Thats why
judicious use of halts and other sync mechanisms are useful.

Other causes for crashes are stack related and instruction pointer mishaps.
I'd say about 80% of the severe (crashing) bugs I squashed when writing any
games were stack related. The rest were interrupt problems or instruction
pointer mishaps. Or sometimes a combination of all 3 ;-) Eventually you
have an internal stack in your mind that you keep track of the stack
balance, the IP, registers and so-forth. It only takes a little practice
before fixing and preventing these serious bugs is a no-brainer.

Matt

> You guys were both right; there was a bug with the grayscale interrupt. I
> didn't think there was a bug in my program because I had bug-tested the
> routines I had been working with several times.  After reading your posts;
I
> took out the interrupt and everything worked fine.  I still don't
understand
> why the problem surfaced only now, though; I've had that routine in there
> since the program's infancy.
>
> Oh BTW, I did everything you said Josh; but it still wouldn't work until I
> took out the routine.
>
> Thanks, and sorry for the trouble.





References: