Motorola M68000 Betriebsanweisung Seite 175

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 256
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 174
Exception Processing, System Control Operations, and I/O 161
PC location. Normally this is to an area of read only memory (ROM) that
contains a small bootstrap program to load the complete operating system
from disk. In some cases, the bulk of the operating system is contained in
ROM, and little or no information is obtained from disk. In either case,
the program flow ends up in your operating system, usually at command
level.
Interrupts that are generated by external devices cause exceptions in
either of two ways. The first method is one in which the particular device
provides the vector number ranging from 64 to 255. The particular vectors
used for particular devices is system-dependent. The second method
is to use the autovector feature. The autovectors are 25 through 31.
The particular vector selected is determined from the devices interrupt
priority.
Bus error, address error, illegal instruction, zero divide, and privilege
violation are exceptions caused by errors in a program. A bus error is
generated when you try to reference a non-existent area of memory. An
address error results when you try to access a word, longword, or in
struction from an odd memory address. The illegal instruction exception
is generated if the CPU tries to execute a word bit pattern that doesnt
correspond to any valid instruction. One very specific instruction, IL
LEGAL, always generates this exception. In a sense it is the only legal
instruction that generates an illegal instruction exception. A zero divide
exception results from a DIVU or DIVS instruction when you divide by
zero. Certain instructions are executable only in the supervisor mode. If
one of these instructions is executed in the user mode, the privilege vio
lation exception occurs.
Traps
Exception vectors numbered 32 through 47 are associated with the
TRAP instruction. Its format is:
TRAP #<vector>
where <vector> is a number from 010 through 1510. The operand value of
the TRAP instruction is added to 3210 to determine the actual exception
vector. Execution of this instruction causes an immediate exception to be
generated, with control passed to the appropriate exception handler. If
the handler subsequently executes an RTE instruction, the program will
continue with the instruction following the TRAP.
TRAPS are sometimes called software interrupts and are the method
that many operating systems use to provide user services. There are a
couple of advantages to this method:
Seitenansicht 174
1 2 ... 170 171 172 173 174 175 176 177 178 179 180 ... 255 256

Kommentare zu diesen Handbüchern

Keine Kommentare