Call 71 - Rom/Ram To Rom Program Transfer; Call 72 - Ram/Rom Return - Rockwell Automation Allen-Bradley SLC 500 BASIC Reference Manual

Hide thumbs Also See for Allen-Bradley SLC 500 BASIC:
Table of Contents

Advertisement

CALL 71 – ROM/RAM to
ROM Program Transfer
CALL 72 – RAM/ROM
Return
Purpose
Use CALL 71 to transfer from a running ROM or RAM program to the beginning
of any available ROM program. One argument is PUSHed (which ROM
program). None are POPped. An invalid program error displays and you enter the
Command mode if the ROM number does not exist.
The first line of the ROM program is not executed. We
IMPORTANT
recommend that you make it a remark.
Syntax
PUSH [ROM program number]
CALL 71
Example
>1
REM EXAMPLE PROGRAM
>10 REM THIS ROUTINE WILL CALL AND EXECUTE A ROM ROUTINE
>20 INPUT "ENTER ROM ROUTINE TO EXECUTE",N
>30 PUSH N
>40 CALL 71
>50 END
>RUN
ENTER ROM ROUTINE TO EXECUTE 4
You are now executing ROM 4, if it exists. If the ROM routine requested does not
exist the result is:
PROGRAM NOT FOUND.
READY
>
Purpose
Use CALL 72 to return to the ROM or RAM routine that called this ROM or
RAM routine. Execution begins on the line following the line that CALLed the
routine. No arguments are PUSHed or POPped. This routine works one layer
deep. Program control reverts to the line following the CALL in the previous
program.
There must be a next line in the ROM or RAM routine,
IMPORTANT
otherwise unpredictable events could occur that may destroy the
contents of RAM. For this reason, always be sure that at least one
END statement exists following a CALL 70 or 71.
Execution Control and Interrupt Support Functions
Publication 1746-RM001A-US-P
8-9

Advertisement

Table of Contents
loading

This manual is also suitable for:

Allen-bradley slc 500 basic-t1746-bas1746-bas-t

Table of Contents