Introduction.
Introduction.
Introduction.
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Workshop PG5<br />
Instructionlist<br />
Labels:<br />
You can make conditional and unconditional jumps in your programs. When<br />
you jump in your program, you have to tell the assembler where you want to<br />
jump to. Labels are symbol names given to locations in a program (program<br />
lines), which are used as destinations for jump instructions.<br />
Characters allowed in labels are the same as those of symbols. Labels can appear<br />
anywhere in the source file, but should be within a code block (COB, PB<br />
etc.), and must not be inside a multi-line instruction.<br />
The value assigned to a label is its offset within the code block where it is defined.<br />
All labels are local to the block in which they are defined, and the same<br />
label can be used many times in the same source module, providing it is always<br />
in a different block. Jumps to labels defined in another block are not allowed.<br />
Example:<br />
Range of symbols<br />
and labels:<br />
Symbols are always "local". Which means that the symbol name is only known<br />
to instructions, which are in the same file as the declaration (see chapter 3). If<br />
you have a symbol with the same name in another file, then the data of the two<br />
symbols won’t get mixed up.<br />
Labels are always local to the block. You can't jump from one file to the other<br />
or from one block to the other. Even if the two blocks are in the same file.<br />
All COB’s, XOB’s, PB’s, FB’s, SB’s, IST’s, ST’s, TR’s, TEXT’s, and<br />
DB’s, are globally known<br />
PG5-07-E © Saia-Burgess Controls Ltd. Page 7-9