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

Re: [MiNT] libgem16: vs_color



Am 18.01.2010, 23:46 Uhr, schrieb Eero Tamminen <oak@helsinkinet.fi>:

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

Everything is odd on the stack in set_syspalette. Here is the assembly:


  .even
.globl _set_syspalette
_set_syspalette:
  add.w #-12,sp
  movm.l #0x3c20,-(sp)
  move.w 36(sp),d5
  move.l 38(sp),a2
  move.w _screen+12,d0

...

Here it is called (stack even):

  .even
L366:
  cmp.w #8,_screen+12
  jbgt L380
  pea -48(a6)
  pea _screen+68
  move.l _C+166,a0
  move.l 16(a0),a0
  move.w 4(a0),-(sp)
  move.w _C+148,-(sp)
  pea LC13
  clr.w -(sp)
  jbsr _bootlog
  pea _screen+68
  move.l _C+166,a0
  move.l 16(a0),a0
  move.w 4(a0),-(sp)
  jbsr _set_syspalette
  add.w #24,sp
  jbra L380

There's no char involved anywhere.

I'm afraid that's beyond my scope ...

variable
addresses?

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

All on stack.

--
Helmut Karlowski