Zilog Z80380 Uživatelský manuál Strana 38

  • 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 37
I/O ADDRESS SPACES C-Compiler Overview
2–4 UM004001-COR1103
ACCCESING I/O ADDRESS SPACE
The Z380 instruction set does not allow indirect acess of the internal I/O address space
through a register.
To acess the I/O adress space use the on-chip peripheral-addresses as operands to the
IN0/OUT0 machine instructions. Variable pointers can not be used to access the internal I/O
address space and address constants must be used.
The recommended usage the I/O adress space is hown in the below example.
typedef volatile unsigned char __INTIO *PBINTIO;
#defineIO_ADDR((PBINTIO)0x0002)
// …
unsigned char ch;
// …
IO_ADDR[0] = ch;// store to I/O address 2
// …
ch = IO_ADDR[0];// load from I/O address 2
// …
Zobrazit stránku 37
1 2 ... 33 34 35 36 37 38 39 40 41 42 43 ... 115 116

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

Žádné komentáře