Zilog Z80380 Uživatelský manuál Strana 39

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 116
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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
Zobrazit stránku 38
1 2 ... 34 35 36 37 38 39 40 41 42 43 44 ... 115 116

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

Žádné komentáře