Motorola Axiom CMD11E1 Uživatelská příručka Strana 79

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 101
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 78
7.3. INTERRUPTS 79
(b) However, if the mask is set, then request for service is generated.
i. The I bit in the CCR is a master disable switch. If this is set
(by using the command SEI), then the request for service does not
interrupt the computer and is hence ignored.
ii. However if I bit is cleared (by using the command CLI), then the
CPU is interrupted.
Note: It is extremely important that you have an SEI before any code
that can turn on an interrupt and and CLI after all relevant and required
initialization is performed.
3. When a CPU is interrupted, it stops its current task and starts the service.
4. When performing the service, you get a completely new set of registers.
So you can not assume that the registers will have any specific value. Also,
when the service terminates, the new set of registers is destroyed. So you can
not assume that the rest of the code can see what you stored in the register
as part of the service. In fact, the interrupted task would be oblivious to
the fact that a service was provided. The only way it can find out is if the
service modifies some memory location.
5. The location of the service that is associated with a particular interrupt is
defined by the hardware manufacturer, and is called the jump vector. This
would be in read only memory and can not be chanted. The operating
system, BUFFALO, sets the start of the service to a known location and
sets aside three bytes at that location. Your service will start with JMP
instruction to the actual code for the service. Your service must end with
the RTI instruction.
The address of services to three important interrupts is given in the following
table:
Interrupt Service location
TOF $00D0
RTIF $00EB
OC2F $00DC
6. Your service code should, as part of the service, turn off the flag that gen-
erated the interrupt. If not, the request for service will still be active and
will generate a new service request as soon as the current service end!
Here is a short checklist for what you should do:
1. In your main routine, enable an interrupt by turning on the associated mask.
Zobrazit stránku 78
1 2 ... 74 75 76 77 78 79 80 81 82 83 84 ... 100 101

Komentáře k této Příručce

Žádné komentáře