A89: Re: Re: Re: Line 1111 error?


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

A89: Re: Re: Re: Line 1111 error?





> ok, so my new piece of code is like so:
>
> LowDrawSprite:
>  move.w 2(a7),d1  ; Read Y Value
>  move.w 4(a7),d0  ; Read X Value

Close, but it should be:
  move.w 6(a7),d1  ; Read Y Value
  move.w 4(a7),d0  ; Read X Value

The values that are first in the function call (in this case X) will end up at
the lowest adress because they are pushed onto the stack last.

> ; Don't need these?
>  ;movem d0-d2/a0-a1,-(a7) ; Save Registers

No, but you should check that put_sprite doesn't alter any registers (in which
case you'd have to store/restore them).

>  lea mario_standing_0(pc),a0
>
>  jsr graphlib::put_sprite ; Draw Sprite
>
>  ;movem (a7)+,d0-d2/a0-a1 ; Restore Registers
>
>  rts
>
> now my sprite doesn't even show up on the screen...
>
> thanks for the help guys, I know I'm a newbie at this stuff, im just
> thankful that you guys aren't being asses about it :)


--
 / Niklas Brunlid
Check out Prosit for the TI-89 / TI-92+ at http://prosit.ticalc.org
Random PQF v5.1 Quote follows:

The only things known to go faster than ordinary light is monarchy,
according to the philosopher Ly Tin Weedle. He reasoned like this: you
can't have more than one king, and tradition demands that there is no gap
between kings, so when a king dies the succession must therefore pass to
the heir *instantaneously*. Presumably, he said, there must be some
elementary particles -- kingons, or possibly queons -- that do this job,
but of course succession sometimes fails if, in mid-flight, they strike an
anti-particle, or republicon. His ambitious plans to use his discovery to
send messages, involving the careful torturing of a small king in order to
modulate the signal, were never fully expanded because, at that point, the
bar closed.
        -- (Terry Pratchett, Mort)





References: