CALLS        Cancelable call of a TML function

Syntax                        

CALLS Label

Cancelable CALL of a TML function

CALLS VAR16

Cancelable CALL with address set in VAR16

 

OperandsLabel: 16-bit program memory address

VAR16: integer variable

PlaceTMLOnline

Binary code

DescriptionCalls a TML function (subroutine) with possibility to interrupt the function execution using ABORT command. This is a cancelable call. A TML function is a set of TML commands which starts with a label and ends with the RET instruction. The label gives the TML function address and name. TML function address may also be specified by an immediate value or by the value of a 16-bit TML variable.

Only one function may be called with a cancelable call at a time. A cancelable call issued while another one is still active (the called function is in execution) is ignored and a command error is set in error register MER.14. Also status register low SRL.7 is set. While a cancelable call is active, SRL.8 = 1.

 

Example        

...

CCALL fct1;        //cancelable call of Function1

STOP;

...

END;

Function1:                        // Function1 definition

...

ABORT;                // if this command is encountered or

                       // got via a communication channel

...                // next instruction executed is STOP

RET;