Mitsubishi — 5.6 Application Instructions

5 Categories and Use of Basic Application Instructions 4. When X13 is ON, execute CALL P13, jump to and run subroutine P13. 5. When X14 is ON, execute CALL P14, jump to and run subroutine P14. When the SRET instruction is reached, jump back to the last P subroutine to finish the remaining instructions. 6. The execution of subroutines will go backwards to the subroutine of upper level until SRET instruction in P10 subroutine is executed. After this program execution will return to the main program.

P12 Main Program Subroutine P10 P13 Subroutine Subroutine P11 P14 Subroutine Subroutine DVP-PM Application Manual 5-19 X0 INC D0 Y0 X20 CALL P10 X0 INC D1 Y1 FEND X2 INC D10 Y2 X11 CALL P11 X2 INC D11 Y3 SRET X2 INC D20 Y4 X12 CALL P12 X2 INC D21 Y5 SRET INC D0 X2 INC D30 Y20 X13 CALL P13 X2 INC D31 Y21 SRET X2 INC D40 Y22 X14 CALL P14 X2 INC D41 Y23 SRET X2 INC D50 Y24 SRET END INC D30 CALL P10 CALL P13 INC D1 INC D31 INC D10 INC D40 CALL P11 CALL P14 INC D11 INC D41 INC D20 INC D50 CALL P12 INC D21