Examples of how to write to the DAC output register in 16-bit DAC mode.
unsigned int dac_value;
...
outp( base_address+6, dac_value & 0xFF );
outp( base_address+7, dac_value >> 8 );
...
or
union { unsigned int word; unsigned char byte[2]; } dac_value;
...
outp( base_address+6, dac_value.byte[0] );
outp( base_address+7, dac_value.byte[1] );
...
unsigned int dac_value;
...
outpw( base_address+6, dac_value );
...