Program Control Instructions
The execution of a PL/B program begins at the first executable instruction. It continues sequentially until a Program Control Instruction alters the sequence, the program terminates or it is interrupted to execute another program.
|
Describes program exception handling. | |
|
Provides an overview of functions. | |
|
Describes trappable events. | |
|
GOTO one of several execution labels based on an index. | |
|
GOTO one of several execution labels based on a function key. | |
|
Exit the inner most LOOP/REPEAT structure. | |
|
Control caching of PLFORMs. | |
|
Save current execution address and call an execution label. | |
|
Terminate currently executing program and start another program. | |
|
Discard the next event on the event queue. | |
|
Enter the debugger if debugging is active. | |
|
Perform a CHAIN to the ANSWER program. | |
|
Designate the end of function parameters. | |
|
Check to determine if any objects have been acted upon. | |
|
Clear an event from the event queue. | |
|
Retrieve the number of events currently on the event queue. | |
|
Retrieve information regardig an event on the event queue. | |
|
Manipulate the event queue. | |
|
Wait on an object event to occur. | |
|
Test for an exising exception handler. | |
|
Clear an exception handler. | |
|
Suspend an exception handler. | |
|
Trigger an exception handler. | |
|
Restore an exception handler. | |
|
Set an exception handler. | |
|
Restore the flags from a variable. | |
|
Save the flags in a variable. | |
|
Structured logic for looping. | |
|
Restore the flags from an internal flag stack. | |
|
Save the flags in an internal flag stack. | |
|
Defines a function. | |
|
End a function definition. | |
|
Go to an execution label. | |
|
Structured logic for testing that also allows ELSE and ELSE IF instructions. | |
|
Defines a local function. | |
|
Load separately compiled subroutine. | |
|
Structured logic for looping that also allows UNTIL and WHILE instructions. | |
|
Local routine that may be called with parameters. | |
|
Continue execution into next CASE, WHEN, or DEFAULT statement. | |
|
Discard return address from last CALL, TRAP, or EVENTWAIT instruction. | |
|
Wait for a period. | |
|
CALL one of several execution labels based on an index. | |
|
CALL one of several execution labels based on a function key. | |
|
External routine that may be called with parameters. | |
|
Retrieve the number of return address on the return stack. | |
|
Return execution to the next address on the return stack. | |
|
External routine that may be called with parameters. | |
|
Define a multi-way branch. | |
|
Set the state of the condition code and function key flags. | |
|
Stop program execution. Return to MASTER program or to the OS. | |
|
Define a multi-way branch. | |
|
Set an event trap to an address. Call the address if the event occurs. | |
|
Clear one or more event traps. | |
|
Clear and restore saved traps. | |
|
Save all traps that are set. | |
|
Returns the size of the variable required for the TRAPSAVE instruction. |
Some Program Control Instructions have the ability to alter the flow conditionally based upon Flags. These flags are set to TRUE or FALSE and are checked as follows:
|
|
|
|
|
|
|
|
PL/B supports the conventional method of program control, (GOTO, CALL, RETURN) and structured code (IF, ELSE, ENDIF, LOOP, REPEAT, etc.). These two types may be intermixed within the same program.
![]() |