Re: A89: Starting out assembly, need help


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

Re: A89: Starting out assembly, need help




In a message dated 12/3/98 7:47:35 PM Pacific Standard Time, TurboSoft@aol.com
writes:

<< oh okay l see.
 How come the parameters are loaded onto the stack and not into data
registers? >>

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