Prism
Operation Manual Issue 2.00
Page 7.7
The following example shows a very simple Segment called 'Carrier lock' which FAILS
if the selected DI is unlocked, displaying the message 'No carrier lock'; otherwise the
Segment PASSES. It would be unusual to write a Segment as simple as this, since
normally a Segment contains a number of related tests rather than just one. The
operation of the example Segment should be clear to anyone who has written a
computer program in almost any language:
/* Segment 1: tests that carrier is locked */
SEGMENT( 1,'Carrier lock');
SET_FAIL;
TEST_UNLOCK_BIT; JUMP_IF_ZERO(@lock_ok);
MESSAGE( 'No carrier lock '); SEGMENT_END;
@lock_ok:
SET_PASS;
SEGMENT_END;
/*******************************************/
Instructions may appear on lines on their own, or with several on one line separated by
semicolons (';') as in the example above. Instructions may be 'simple', with no
parameters, or they may be 'complex' with following parameters enclosed in brackets:
SET_PASS
simple Instruction
MEAS_FS_JITTER(6)
complex Instruction
Complex Instructions are followed by one or more parameters in brackets, separated
by commas. Parameters may be:
q
Numeric (binary, base 10 or hexadecimal);
q
Text (in single quotes);
q
A Label (without the final colon);
Labels are typically targets for branching ('jump') Instructions. A Label is distinguished
from an Instruction by starting with the '@' character and ending with a colon (':'), for
example:
@MYLABEL:
Labels may be on a line on their own, or may precede one or more Instructions on the
same line.