
CHAPTER 5
CONDITIONAL AND
ARITHMETIC INSTRUCTIONS
In Chapter 4 you learned a small number of 68000 instructions. These
were enough to write some very simple programs. I hope that you have
taken the time to actually run some of the programs presented in the
chapter, as well as a few programs of your own design. Nothing gives you
more confidence that you are successfully mastering assembly language
programming than the joy you experience when a program actually
performs as it should. By now you should have become familiar with
your own computer’s procedures for editing, assembling, and executing
assembly language programs. If you are having trouble, you should
carefully review your computer system's manuals before going on with
this chapter.
The remainder of this book is designed to expand your vocabulary
of 68000 instructions. Rather than present all the remaining instructions
at one time, we will present groups of instructions and specific examples
of their use. You should not attempt to learn all of the 68000 instructions
before practicing with each group. Take the time to actually experiment
with the instructions presented in each chapter. Don’t limit yourself to
the exercises. Be creative.
In this chapter you will learn the very powerful set of conditional
instructions. These instructions allow the control flow of your program
to vary depending on the results of certain instructions. Among these
are the arithmetic instructions you have already learned as well as several
others. Crucial to understanding the conditional instructions is a thorough
knowledge of certain bits in the condition code register and how they are
affected by arithmetic instructions.
Arithmetic and the Condition Code Register
As you learned in Chapter 2, the 68000 has a special register known as
the condition code register (CCR), This register is not used in the same
57
Kommentare zu diesen Handbüchern