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

Re: [MiNT] libgem16: vs_color



Hi,

On Tuesday 19 January 2010, Helmut Karlowski wrote:
> void
> set_syspalette(short vdih, struct rgb_1000 *palette)
> {
>    short i, pens, rgb[3];
>    //if( C.fvdi_version == 0 ) return; /* as long as this doesn't work
> reliable */
>
>    if (screen.planes > 8)
>      pens = 256;
>    else
>      pens = 1 << screen.planes;
>
> //  display("set syspal - %d pens", pens);
>    BLOG((0,"set_syspalette:vdih=%d rgb=%lx", vdih, rgb));
> ...
>
> Here rgb is odd. Now tell me!

I wonder whether odd alignment is already in function arguments
or only in local stack args.  What about vdih, i, pens and palette variable
addresses?

(Does GCC pass some of the args in registers like e.g. pure-C does?)


	- Eero