Listing 1: I/O functions for operation on a single register

/* For 8, 16, 32 bit and 1 bit registers. */

/* Read operations: */
unsigned char iord8(access_type);
unsigned int  iord16(access_type);
unsigned long iord32(access_type);
SGBOOL iord1(access_type);

/* Write operations: */
void iowr8(access_type, unsigned char val);
void iowr16(access_type, unsigned int val);
void iowr32(access_type, unsigned long val);
void iowr1(access_type, SGBOOL val);

/* AND operations (Clear group of bits) */
void ioand8(access_type, unsigned char val);
void ioand16(access_type, unsigned int val);
void ioand32(access_type, unsigned long val);
void ioand1(access_type, SGBOOL val);

/* OR operations (Set group of bits) */
void ioor8(access_type, unsigned char val);
void ioor16(access_type, unsigned int val);
void ioor32(access_type, unsigned long val);
void ioor1(access_type, SGBOOL val);
/* End of File */