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

Re: [MiNT] libgem16: vs_color



Vincent Rivière wrote:
Helmut Karlowski wrote:

// display("set syspal - %d pens", pens);
BLOG((0,"set_syspalette:vdih=%d rgb=%lx", vdih, rgb));
...

Here rgb is odd. Now tell me!


Can we trust BLOG() ?
Can we trust our eyes ?


I know for sure I can not trust my eyes. :-)
Everything else I dont trust out of a bad attitude. ;-)

A broken boot_log explains a lot.
The strange values displayed are a hint.

A odd stack always is the result of a corruption.
And a corrupted stack causes massive mayham very quick.

To find the place where the corruption occurs you must
look at many more places.

Move addresses of local variable to a static array and look at these at
a later convenient point. At some point you can dump the array to disc.

Use dumparray[n] = &var where n is a constant unique for each move.
Make sure that the assignment is as simple as possible
e.g. lea An,d(sp)  move.l An,dumparray+(n*4)

The stack will NOT get odd by pushing a byte by -(sp)
on normal 68K.

Only a direct move or a add/subtract of a odd number can do that.

PS
In the 20+ years of atari computing I never encountered a odd
stack without very quick crashing after rts.
Always more corruption then only becoming odd.

--
Groeten; Regards.
Henk Robbers. http://members.chello.nl/h.robbers
Interactive disassembler: TT-Digger;  http://digger.atari.org
A Home Cooked C compiler:      AHCC;  http://ahcc.atari.org