Page 186 - DCAP210_INTRODUCTION__TO_MICROPROCESSORS
P. 186

Introduction to Microprocessors


                  Notes          pending condition handler information

                                 call/signal on : error, failure, halt, notready, novalue, syntax
                                 pending condition information
                                 information that is returned by the condition built-in function
                                 settings associated with the options instruction

                                 elapsed time clock
                                 a function or subroutine can alter the setting of the elapsed time clock, which is provided by the
                                 time built-in function, without affecting the setting that is used in the calling procedure.

                                 trace settings
                                 a function or subroutine can alter trace settings, which are established by the trace instruction or
                                 the trace built-in function, without affecting the settings that are used in the calling procedure.

                                                Support for the options instruction is implementation-dependent, and the
                                                settings may not be saved and restored during function or subroutine calls.


                                 13.3.2 Trap subroutine call activation/deactivation
                                 call ON conditionName [ NAME trapLabel ]

                                 call OFF conditionName
                                 The call ON or OFF instructions activate or deactivate the handling of condition traps by an
                                 associated procedure. When active, a conditional trap will cause the trapLabel to be invoked as a
                                 subroutine. In a call ON instruction, if the trapLabel is absent, the label that is invoked is the
                                 same as the condition name. The handling of condition traps can alternatively be activated or
                                 deactivated by the signal ON or OFF instructions.
                                 The conditionName in the call ON or OFF is one of the following:

                                 ERROR
                                 FAILURE
                                 HALT
                                 NOTREADY
                                 Unlike the signal ON or OFF trap anticipation instructions, the following condition names are
                                 ineligible in a call ON or OFF instruction:
                                 SYNTAX
                                 NOVALUE


                                                The call ON or OFF instructions activate or deactivate the handling of condition
                                                traps by an associated procedure.


                                 13.4 Return Instruction

                                 In computer programming, a return statement causes execution to leave the current subroutine
                                 and resume at the point in the code immediately after where the subroutine was called, known as
                                 its return address. The return address is saved, usually on the process's call stack, as part of the
                                 operation of making the subroutine call. Return statements in many languages allow a function
                                 to specify a return value to be passed back to the code that called the function.



        180                              LOVELY PROFESSIONAL UNIVERSITY
   181   182   183   184   185   186   187   188   189   190   191