| 数据搜索系统,热门电子元器件搜索 |
|
ST9 数据表(PDF) 40 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
ST9 数据表(HTML) 40 Page - STMicroelectronics |
|
40 / 146 page ![]() 40/146 ST9 USER GUIDE 3.3.2 Advantages when Using C Language The ST9 has been designed with high-level languages in mind. In particular, the instructions described above are of special interest to C programmers. First, as a structured language, C typically uses the stack to pass arguments to functions, re- turn values from functions, and store the local variables of the functions. An instruction such as: pushw #1500 pushes a constant integer value as the constant argument of a function. This is used in the fol- lowing example: /* define a function that has a single argument of int type */ void MyFunction ( int Param ) ; { /* body of the function */ } void main ( void ) ; { /* some code ... */ MyFunction ( 1500 ) ;/* invoke this function with a constant argument */ /* more code ... */ } Since C makes heavy use of pointers, the instruction: pea 4(rr2) pushes the address of the 5th byte of a structure. For example: /* define a structured type */ struct sMyStruct { int N1 ; int N2 ; char C1 ; } ; struct sMyStruct MyStruct ;/* create a variable of the above defined type */ |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 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 |