C-1
APPENDIX C
EXAMPLE CODE HEADER FILES
This appendix contains the header files called by the code examples that are included in several
chapters of this manual. Section C.1 contains the register definitions for each code routine. Sec-
tion C.2 contains the variable definitions.
C.1 REGISTER DEFINITIONS FOR CODE EXAMPLES
/* 80386EX REGISTER DEFINITIONS */
#define _SetEXRegWord(reg,val) (outpw(reg,val))
#define _SetEXRegByte(reg,val) (outp(reg,val))
#define _ReadEXRegWord(val,reg) (val=inpw(reg))
#define _GetEXRegByte(reg) inp(reg)
#define _GetEXRegWord(reg) inpw(reg)
/* REMAP ADDRESSING Registers */
#define REMAPCFGH 0x0023
#define REMAPCFGL 0x0022
#define REMAPCFG 0x0022
/* INTERRUPT CONTROL REGISTERS -- SLOT 15 ADDRESSES */
#define ICW1M 0xF020
#define ICW1S 0xF0A0
#define ICW2M 0xF021
#define ICW2S 0xF0A1
#define ICW3M 0xF021
#define ICW3S 0xF0A1
#define ICW4M 0xF021
#define ICW4S 0xF0A1
#define OCW1M 0xF021
#define OCW1S 0xF0A1
#define OCW2M 0xF020
#define OCW2S 0xF0A0
#define OCW3M 0xF020
#define OCW3S 0xF0A0
/* INTERRUPT CONTROL REGISTERS -- SLOT 0 ADDRESSES */
#define ICW1MDOS 0x0020
#define ICW1SDOS 0x00A0
#define ICW2MDOS 0x0021
#define ICW2SDOS 0x00A1
#define ICW3MDOS 0x0021
#define ICW3SDOS 0x00A1
#define ICW4MDOS 0x0021
#define ICW4SDOS 0x00A1
#define OCW1MDOS 0x0021
#define OCW1SDOS 0x00A1
#define OCW2MDOS 0x0020