Zilog Z80380 Instrukcja Użytkownika Strona 39

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 116
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 38
UM004001-COR1103 2–5
C-Compiler Overview INTERRUPT FUNCTIONS
INTERRUPT FUNCTIONS
Interrupt functions are declared by preceding their definition with #pragma interrupt.
Such functions should not take parameters or return a value. For example:
#include <zilog.h>
#include <z382.h>
volatile int gprtCount;
#pragma interrupt
void timer(void)
{
char cDummy;
cDummy = tcr;
cDummy = tmdr0l;
cDummy = tmdr0h;
gprtCount++;
}
The compiler generates the following prologue and epilogue code for interrupt functions:
.align 2
_timer:
ex af,af’
exall
.
.
.
exall
ex af,af’
ei
reti
Przeglądanie stron 38
1 2 ... 34 35 36 37 38 39 40 41 42 43 44 ... 115 116

Komentarze do niniejszej Instrukcji

Brak uwag