Re: A89: Starting out assembly, need help


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

Re: A89: Starting out assembly, need help




In a message dated 12/4/98 8:06:04 PM Eastern Standard Time,
Daniel7073@aol.com writes:

> The TI-OS was wirtten in C++ or C.  The C calling convention dicates that
>  parameters are loaded on to the stack from right to left (in opposite order
> of
>  declaration), and the caller pops them off.  The fastcall convention uses
>  registers, but for simplicity for ASM programmers, TI probably didn't do 
> that.
>  Also, if someone creates a function with twenty parameters (bad programming
>  style, but still possible), there wouldn't be enough registers.
>  
>  Daniel Imfeld

Well wouldn't the subroutine in the library have to pop the values back from
the register to get to the data?  And if this is true, why does the stack have
to be set back to where it was sometime after the function?