My Project
Chargement...
Recherche...
Aucune correspondance
io.h
Aller à la documentation de ce fichier.
1/*----------------------------------------------------------------------------*/
2/* Manipulation des entrées/sorties. */
3/* (C) Manu Chaput 2000-2022 */
4/*----------------------------------------------------------------------------*/
5#ifndef IO_DEF
6#define IO_DEF
7
8// WARNING les "Nd" étaient des "N", ...
9
13#define outb(port, octet) \
14 asm volatile ("outb %%al, %1":: "a"(octet), "Nd"((uint16_t)port))
15
19#define inb(port, adresseOctet) \
20 asm volatile ("inb %1, %%al": "=a"(adresseOctet): "Nd"((uint16_t)port))
21
25#define outw(port, mot) \
26 asm volatile ("outw %%ax, %1":: "a"(mot), "Nd"((uint16_t)port))
27
31#define inw(port, adresseMot) \
32 asm volatile ("inw %1, %%ax": "=a"(adresseMot): "Nd"((uint16_t)port))
33
37#define outl(port, lng) \
38 asm volatile ("outl %%eax, %1":: "a"(lng), "Nd"((uint16_t)port))
39
43#define inl(port, adresseLong) \
44 asm volatile("inl %%dx, %%eax": "=a"(adresseLong): "d"((uint16_t)port))
45
46#endif