From mint-bounce@lists.fishpool.fi Mon Jan 18 19:24:28 2010 X-SourceIP: 77.249.76.7 Message-ID: <4B54FB3E.5030108@chello.nl> Date: Tue, 19 Jan 2010 01:22:22 +0100 From: Henk Robbers User-Agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: mint@lists.fishpool.fi Subject: Re: [MiNT] libgem16: vs_color References: <4B542D75.6080103@freesbee.fr> <4B543E5D.30600@atari.org> <4B54BFBF.1090000@freesbee.fr> <4B54D93C.3080603@freesbee.fr> <4B54EB36.9050301@freesbee.fr> In-Reply-To: <4B54EB36.9050301@freesbee.fr> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: h.robbers@chello.nl Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: 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