Introduction.
Introduction.
Introduction.
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 />
Word Instructions:<br />
Word Instructions work with registers, counters, timers, constants, texts, and<br />
db's. Although there are some instructions which depend on the state of the<br />
ACCU, the ACCU isn't that important here. ( see Instruction set booklet ).<br />
Not all the instructions allow you to use all the possible elements ( register<br />
counter ect) as parameters. Please refer to the booklet or the online help.<br />
A lot of the instructions not only write a result to the element ( register, counter<br />
ect), but they also note some general information about the result into four<br />
special flags called arithmetic flags. The flags are:<br />
1. Zero flag ( Example: Z flag is set if the copy instruction copies an empty<br />
register )<br />
2. Error flag (Example: The Error (E) flag is set if the definition text of a<br />
SASI instruction is missing or invalid). SASI=SAIA Assigned Serial Interface.<br />
3. Negative flag ( Example: is set if the result of a calculation was negative )<br />
4. Positive flag ( always inverse to the negative flag )<br />
Example:<br />
ADD R 1<br />
R 33<br />
R 46<br />
The values of register R 1 and register R 33 are<br />
added. The result is in register R 46.<br />
The flags N,P , Z are set according to the value in<br />
register R 46<br />
ACCU<br />
Register<br />
Constant<br />
Timer<br />
Counter<br />
Register<br />
Constant<br />
Timer<br />
Counter<br />
?<br />
COPY<br />
ADD…<br />
..<br />
Word<br />
Instructions:<br />
ALU<br />
32Bit<br />
?<br />
JR<br />
ACC…<br />
Register<br />
Constant<br />
Timer<br />
Counter<br />
E Z N P<br />
Error<br />
Arithmetic Flags<br />
Other Instructions (mainly the Control instruction family) are only executed, if<br />
the mentioned Arithmetic flag is set to high.<br />
Example: JR Z Label ;The Jump is only done, if the Zero flag is<br />
high.<br />
Most Word-Instructions are executed unconditionally.<br />
Zero<br />
Negative<br />
Positive<br />
PG5-07-E © Saia-Burgess Controls Ltd. Page 7-11