| поискавой системы для электроныых деталей |
|
CC78K4 датащи(PDF) 159 Page - NEC |
|
|
|||||||||||||||||||||||||||||
CC78K4 датащи(HTML) 159 Page - NEC |
|
159 / 523 page ![]() CHAPTER 10 LIBRARY FUNCTIONS User’s Manual U15556EJ1V0UM 159 10.1 Interface Between Functions To use a library function, the function must be called. Calling a library function is carried out by a call instruction. The arguments and return value of a function are passed via a stack and a register, respectively. However, when the old function interface supporting option (-ZO) is not specified, the first argument is, if possible, also passed via a register. For the -ZO option, refer to CHAPTER 5 COMPILER OPTION in the CC78K4 C Compiler Operation User's Manual (U15557E). 10.1.1 Arguments Placing or removing arguments on or from the stack is performed by the caller (calling function). The callee (called function) only references the argument values. However, when the argument is passed via a register, the callee directly refers to the register and copies the value of the argument to another register, if necessary. Also, when specifying the function call interface automatic pascal function option -ZR, removal of arguments from the stack is performed by the called side if the argument is passed by the stack. Arguments are placed on the stack one by one in descending order from bottom to top if the argument is passed via the stack. The minimum unit of data that can be stacked is 16 bits. A data type larger than 16 bits is stacked in units of 16 bits one by one from its MSB. An 8-bit type data is extended to a 16-bit type data for stacking. When it is a large model and the argument is the address value or when it is a medium model and the argument is the address value of the function, the argument is stacked in 3-byte units. The following shows the list of the passing of the first argument. The second and subsequent arguments are passed via a stack. The function interface (passing of argument and storing of return value) of the standard library is the same as that of normal function. Table 10-1. List of Passing First Argument Type of First Argument Passing Method (Without -ZO Specification) Passing Method (with -ZO Specification) 1-byte, 2-byte integer AX Passed via a stack 3-byte integer WHL, small model: stack passing Passed via a stack 4-byte integer AX, RP2 Passed via a stack Floating-point number (float type) AX, RP2 Passed via a stack Floating-point number (double type) AX, RP2 Passed via a stack Other Passed via a stack Passed via a stack Remark Of the types shown above, 1- to 4-byte integers include structures and unions. |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |