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

cc65 assembler stack usage?



In cc65 assembler, I know that sp is the pointer to the top of the stack.  I also know that pusha and pushax push a byte or word onto the stack, respectively, and popa and popax pop.  I also know that pusha0 zero-extends the .A to a word before pushing.  I know that push0-9 push constants to the stack.  But what about reading a parameter or auto variable inside a function?  I'm sure there's a better method than setting the .Y then offseting an access as in (sp),y when accessing words.