| 数据搜索系统,热门电子元器件搜索 |
|
ST20-C1 数据表(PDF) 49 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
ST20-C1 数据表(HTML) 49 Page - STMicroelectronics |
|
49 / 205 page ![]() 49/205 4 Using ST20-C1 instructions ® A function called using fcall must have a fixed offset at compile time. jab is used for calling functions and procedures at dynamically calculated addresses, for example when using function pointers. The jab instruction is also used to perform the return. The return address must have been restored with a ldl from the stack into the Areg. A procedure or function that requires local work space will normally include ajw instructions to allocate and deallo- cate space. When the jab instruction is executed, the programmer must ensure that: • the Areg holds the return address; • any workspace claimed by the procedure should have been released so that the Wptr has returned to the value it held at the start of the procedure. The jab instruction uses one word of the evaluation stack, so the other two words can therefore be used to return up to two values to the calling code, including a pointer to a block of additional data to be returned. 4.10.1 Adjusting work space The primary instruction ajw is used to perform a relative adjustment to the stack pointer Wptr to: • create work space on the stack at the beginning of the function and • return the work space pointer at the end of the function. ajw n increases the value of the workspace pointer by the number of words in its operand value, n. Work space is created at the beginning of a function or procedure with a negative operand and released before returning with a positive operand. The amount of extra work space needed will normally include: • space to save any parameters passed in the evaluation stack; • space for local variables and temporaries; • space for any hidden system variables such as the static chain. For example, a function with w words of local work space might be: T myfunction (param_1, param_2) { local variable declarations; P; return (E); } This can be compiled as: ajw -w; stl param_1; stl param_2; P; E; ajw w; |
|
链接网址 |
| 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 |