Texas Instruments MSP50C614 manual ±±±±±±±±±±±±±±±

Models: MSP50C614

1 414
Download 414 pages 24.44 Kb
Page 354
Image 354

Implementation Details

find the correct size for bogus. Bogus can be made larger for extra safety as long as enough memory is left over for the C±± variables and the stack. If space allows, it is a good idea to add a few extra words to bogus in case assembly variables are added to the project without modifying bogus.

It is also important not to alter the contents of registers R5 and R7. R7 is the stack pointer and R5 is a frame pointer used in C to C function calls. Parameters are passed on the stack and the return value is always int and always located in a0. The stack usage for function calls is as follows.

C to C function call. The stack is shown after the operation on the bottom is performed.

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

R7Param 2

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

Param 2

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

R7Param 1

Param 1

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

Param 1

Param 1

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

R7,R5 Stack data

R5Stack data

R5Stack data

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

±±±±±±±±±±±±±±±

Before call

 

Parameter 1

 

Parameter 2

 

5-54

Page 354
Image 354
Texas Instruments MSP50C614 manual ±±±±±±±±±±±±±±±