Motorola M68000 User's Guide Page 169

  • Download
  • Add to my manuals
  • Print
  • Page
    / 256
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 168
C/MPTER 12
EXCEPTION PROCESSING,
SYSTEM CONTROL
OPERATIONS, AND I/O
In this chapter we will cover a number of topics and instructions
that dont fit into the category of general programming instructions. I
mentioned in Chapter 2 that the 68000 doesn’t have any input/output
instructions. This is not quite true. A number of instructions are used
to process interrupts, a certain type of exception which is a vital part
of I/O activity. In addition, a special version of the MOVE instruction is
provided to make certain kinds of I/O easier and faster. I also mentioned
in Chapter 2 that the 68000 has a user and supervisor mode of operation.
The system control operations are used to coordinate these two modes.
The Status Register and System Control
When we are in the supervisor mode, the condition code register,
CCR, is part of a 16-bit register known as the status register, SR. Let’s
take a closer look at the high-order bits of the register found on the
following page. If the trace bit is set to a 1, the CPU is placed into trace
mode. This special mode is used for debugging purposes. When in trace
mode, an exception is generated for each instruction executed. We will
discuss trace mode when we talk about exceptions.
If the supervisor state bit is set, we are in supervisor mode. However,
this bit cannot be arbitarily set at any time. If we are in user mode
(the supervisor bit clear), we can’t modify the high-order bits of the
status register. How then do we get into supervisor mode? There are
two ways. The first is when we initially turn on our system, or push the
reset button (if so equipped). This causes a system reset to supervisor
mode. The second method is related to the handling of exceptions. When
155
Page view 168
1 2 ... 164 165 166 167 168 169 170 171 172 173 174 ... 255 256

Comments to this Manuals

No comments