|
| Assembler Directives and |
|
| .CALLINFO Directive |
|
| it restores the RP value when it encounters a .LEAVE |
|
| |
|
| other routines should save the RP value. |
| SAVE_SP | Specifies that the current routine saves the value of |
|
| Previous_SP in its frame marker at |
|
| the Assembler does not automatically save the Stack |
|
| Pointer when it generates Entry/Exit code sequences, |
|
| you must explicitly save this value in your program |
|
| when using this key word. You can obtain the |
|
| Previous_SP value from the special register |
|
| %previous_sp. |
|
| Programming languages, such as HP |
|
| typically use this value for |
|
| reference local variables. |
| SAVE_SR0 | Indicates that this millicode procedure saves %sr0 in |
|
| its frame marker at |
|
| valid for |
| Discussion |
|
| When a program uses the .CALLINFO directive, all entry and exit code | |
| must follow the procedure calling convention described in the documents | |
| under the topic | |
| http://www.software.hp.com/STK/. If you use the .ENTER and .LEAVE | |
| directives, the Assembler will automatically generate the necessary code. | |
| The parameters in the .CALLINFO directive govern the generation of the | |
| Entry/Exit code sequence (except for SAVE_SP). However, if you use the | |
| .ENTRY and .EXIT directives, your code must provide the necessary | |
| Entry/Exit code sequences. | |
| A stack frame consists of a pointer to the top of the frame, a frame | |
| marker, a fixed argument list, and a variable argument list. The | |
| following example, Stack Frames, illustrates these areas as an inverted | |
| stack for | |
| For | |
NOTE | ||
| documents under the topic | |
| http://www.software.hp.com/STK/. | |
|
|
|
Chapter 4 | 71 |