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 />

Index Register:<br />

Each and every COB has an internal register which is called an index register.<br />

The content of this register can be manipulated by five instructions:<br />

SEI<br />

SEt Index register<br />

INI<br />

INcrement Index register<br />

DEI<br />

DEcrement Index register<br />

STI<br />

STore Index register<br />

RSI<br />

ReStore Index register<br />

Most of the instructions can work with the content of this register and perform<br />

indirect commands with it. (these instructions are indicated in the booklet). If<br />

you add an X to the command name ( Example LD =>LDX ) you tell the PCD<br />

that you are using the index register in this program line.<br />

Example:<br />

COPY<br />

Normally an instruction like COPY would work like this:<br />

COPY R 10<br />

R 40<br />

The content of R 10 is COPIED into R 40<br />

COPYX<br />

COPYX works different:<br />

SEI K 2<br />

COPYX R 10<br />

R 40<br />

The Index register is set to 2<br />

R 10 is not copied into R 40, but the content of<br />

register R 12 is copied into R 42 ( add the content<br />

of the index register to R 10 and R 40).<br />

So now that you know the basics, we can start to write our first program.<br />

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

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

Saved successfully!

Ooh no, something went wrong!