User’s Manual U15556EJ1V0UM
15
(2)
(3)
Pascal function call interface................................................................................................. 467
Location and order of storing arguments...................................................................... 463
Location and order of storing automatic variables........................................................ 465
11.7.5
CHAPTER 12 REFERENCING THE ASSEMBLER.......................................................................470
12.1 Accessing Arguments/Automatic Variables ....................................................................471
12.2 Storing Return Values ........................................................................................................474
12.3 Calling an Assembly Language Routine from C..............................................................475
(1)
Calling an assembly language routine function (C source)........................................................ 475
(2)
Saving and restoring the information of assembly language routine (assembler source)......... 476
12.4 Calling C Language Routine from Assembly Language Routine ..................................479
(1)
Calling a C language function from assembly language (assembler source)............................. 479
12.5 Referencing Variables Defined by Other Languages......................................................481
(1)
How to refer to C-defined variables............................................................................................ 481
(2)
How to refer to assembler-defined variables from C.................................................................. 482
12.6 Other Important Hints.........................................................................................................483
(1)
“_” (underscore).......................................................................................................................... 483
(2)
Placement of arguments on the stack........................................................................................ 483
CHAPTER 13 EFFECTIVE UTILIZATION OF COMPILER...........................................................484
13.1 Efficient Coding...................................................................................................................484
(1)
Using external variables............................................................................................................. 485
(2)
1-bit data .................................................................................................................................... 485
(3)
Function definitions .................................................................................................................... 486
(4)
Optimization option..................................................................................................................... 486
(5)
Using extended functions........................................................................................................... 487
APPENDIX A LIST OF LABELS FOR saddr AREA...................................................................490
A.1
Arguments of norec Functions..........................................................................................490
A.2
Automatic variables of norec Functions ..........................................................................491
A.3
Register Variables...............................................................................................................491
APPENDIX B LIST OF SEGMENT NAMES..................................................................................492
B.1
List of Segment Names ......................................................................................................494
B.1.1
Program area and data area ................................................................................................. 494
B.1.2
Flash memory area ............................................................................................................... 498
B.2
Location of Segment ..........................................................................................................500
B.3
Example of C Source..........................................................................................................501
B.4
Example of Output Assembler Module.............................................................................502
APPENDIX C LIST OF RUNTIME LIBRARIES.............................................................................505
APPENDIX D LIST OF LIBRARY STACK CONSUMPTION .......................................................510
APPENDIX E INDEX.........................................................................................................................517