Common Information For Subroutine Instructions - Panasonic FP7 Series Command Reference Manual

Cpu unit
Hide thumbs Also See for FP7 Series:
Table of Contents

Advertisement

3.34 Common Information for Subroutine Instructions

Program configuration
● Subroutine instructions are configured from a subroutine call instruction and a subroutine
program.
● Describe subroutine programs in subprogram areas, and use the SBL instruction and RET
instruction to indicate the start and end positions of the subroutine program.
● Subroutine call instructions can be described in either the main program area or a
subprogram area (another subroutine program).
Types of call instructions
● There are four types of subroutine call instructions as follows:
CALL (local subroutine)
FCALL (output OFF type local subroutine call)
ECALL (subroutine call (with PB number specification))
EFCALL (forced output OFF type subroutine call (with PB number specification))
● Local subroutine call instructions (CALL, FCALL) start subroutine programs within the same
PB.
● Subroutine call instructions (ECALL, EFCALL) start subroutine programs for a specified PB
number.
Flow of the program process
● When the execution condition is ON, the subroutine call instruction is executed to start the
subroutine program beginning with the SBL instruction with the specified number. When the
execution condition is OFF, nothing occurs.
● When the subroutine program is processed up to the RET instruction, the program will return
to the address next to the subroutine call instruction, and continue with processing of the
program.
WUME-FP7CPUPGR-12

3.34 Common Information for Subroutine Instructions

Subroutine program
Main program area
ED
SBL10
Subprogram area
RET
3-107

Advertisement

Table of Contents
loading

Table of Contents