OUTB(9F) Kernel Functions for Drivers OUTB(9F)

outb, outw, outl - write to an I/O port

#include <sys/ddi.h>
#include <sys/sunddi.h>
void outb(int port, unsigned char value);

void outw(int port, unsigned short value);

void outl(int port, unsigned long value);

The functions described here are obsolete. For the outb(), outw(), and outl() functions use, respectively, ddi_put8(9F), ddi_put16(9F), and ddi_put32(9F) instead.

A valid I/O port address.


The data to be written to the I/O port.


The address of a buffer from which the values will be fetched.


The number of values to be written to the I/O port.

These routines write data of various sizes to the I/O port with the address specified by port.

The outb(), outw(), and outl() functions write 8 bits, 16 bits, and 32 bits of data respectively, writing the data specified by value.

These functions may be called from user, interrupt, or kernel context.

See attributes(5) for descriptions of the following attributes:

Architecture x86
Interface Stability Obsolete

isa(4), attributes(5), ddi_put8(9F), ddi_put16(9F), ddi_put32(9F), inb(9F)

Writing Device Drivers

October 24, 2012 OmniOS