Re: A89: placing data into C variables from ASM(" ") constructs


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

Re: A89: placing data into C variables from ASM(" ") constructs




> > Try the following:
> >
> >  move.w %d0,8(%sp)
> will that work?  l tried something like that before, and something bad
> happened (calc lock up)

No, it won't work. GCC (this version, anyway) always allocated room for
variables on the stack, even if none are used, and the allocation itself takes
up four bytes (by using link).

To reach the argument that was last pushed onto the stack in pure asm you'd have
to use something like this:

 move.w 4(%a6),%d0



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

I EXPECT, he said, THAT YOU COULD MURDER A PIECE OF CHEESE?
        -- Death talks to the Death of Rats
           (Terry Pratchett, Reaper Man)




Follow-Ups: References: