07.03.2014 Views

Introduction.

Introduction.

Introduction.

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Workshop PG5<br />

Instructionlist<br />

7.3 IL Syntax<br />

Comments:<br />

IL programs are read by two kinds of entities: humans and compilers. The<br />

compiler requires the source code text to conform exactly to its syntax rules.<br />

For example a COB command demands two parameters. One behind the<br />

command COB itself and the second on the line below it. Humans are not so<br />

particular about how instructions are given, but they often need more explanation<br />

about what the function of the instructions are. Such explanation can be<br />

added to the source code. We call them comments and they are displayed in<br />

green. There are two ways to add a comment.<br />

; All the text from the semicolon to the end of the<br />

line is considered as comment and will be green.<br />

$skip $endskip All the text between the two instructions is<br />

skipped by the compiler and therefore is a comment.<br />

Comments can be added to every line.<br />

Structure:<br />

The code itself is structured in several rows. You can jump from row to row by<br />

using the TAB key.<br />

1. ROW: LABELS, General comments and TEXT<br />

2. ROW: Mnemo code. In this row you insert the actual instruction.<br />

3. ROW: The operands for the instruction. Also called media code.<br />

4. ROW: Comments to the specific program line.<br />

PG5-07-E © Saia-Burgess Controls Ltd. Page 7-5

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!