摘要 |
PURPOSE:To evade abnormal termination of a program due to a lack of capacity of a stack memory by reserving local variables used in a program in a fixed place of the program and saving values of local variables on a stack memory at the time of calling a subprogram and restoring them at the time of return to a main program. CONSTITUTION:A stack management part 12 stores values of prescribed variables in a variable save area 15 on a stack memory 14 and stores return information 16 on the stack memory 14 and transfers the control to a subprogram 13 thereafter. When execution of the subprogram 13 is completed, the stack management part 12 takes out return information 16 from the stack memory 14 and uses values saved in the variable value save area 15 to restore values of variables in a variable area 11 of a main program 10 to states before call of the subprogram 13 and transfers the control to the main program 10 thereafter.
|