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 Exercise Chapter 7<br />

6:<br />

Result = CMP 100<br />

90<br />

100 > 90<br />

=><br />

ZerroFlag = L<br />

PositiveFlag = H<br />

NegativeFlag = L<br />

ErrorFlag = Not changed<br />

How can you know?<br />

1. Solution: Enter the program into the Instructionlist editor, place the<br />

cursor on the instruction CMP and press the button F1 => A help on<br />

the instruction will come up.<br />

2. Solution: Built and download the program and trace online to the<br />

instruction CPM => you’ll see the state of all the Arithmetic flags:<br />

3. Solution: Have a look into the instruction booklet for more information<br />

about the instruction CMP.<br />

7:<br />

If you load a constant into a register, then the execution of the “load” instruction<br />

doesn’t depend on the ACCU state. Therefore the program<br />

would work the same. Have a look into the booklet for some help on the<br />

instruction “LD”. Note: An instruction LD T (load timer) or LD C (load<br />

counter) would depend on the ACC state but not a load register!<br />

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

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

Saved successfully!

Ooh no, something went wrong!