Call 72: ram/rom return – Rockwell Automation 1771-DB BASIC MODULE User Manual

Page 262

Advertising
background image

Chapter
Call Routines 69–127

13

13 -4

Use this routine to return to the routine that called this ROM/RAM routine.
Execution begins on the line after the line that called the ROM/RAM
routine. This routine works one layer deep. You may go back to the last
called program’s next line.

Important: There must be a next line in the ROM or RAM routine,
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.

Input and Output Arguments

This routine has no input or output arguments.

Syntax

CALL 72

Example

>ROM 1

>10 REM SAMPLE PROG FOR CALL 72

>20 PRINT “NOW EXECUTING ROM #1

>30 PUSH 3

>40 CALL 71 : REM EXECUTE ROM #3 THEN RETURN

>50 PRINT “EXECUTING ROM #1 AGAIN”

>60 END

>ROM 3

>10 REM THIS LINE WONT BE EXECUTED

>20 PRINT “NOW EXECUTING ROM #3”

>30 CALL 72

>40 END

With ROM #1 selected:

>RUN

NOW EXECUTING ROM #1

NOW EXECUTING ROM #3

EXECUTING ROM #1 AGAIN

READY

>

CALL 72: RAM/ROM Return

Advertising