open an port on freebsd

i have made some thing with leds on it. i put it directly on the printer port. in dos and windows i can send data to it with outp(0x378,123); and then have some leds on and some leds off. i found out that it is possible linux with same assembly (after searching much.). but i want to have those led on my printer port on my freebsd machine.
i also have looked in freebsd and found out that there is a function liek that but for that you need to know a device. and to get that you need to be an driver .... (not sure if that is good but i read many c files of the freebsd kernel).

i like to have a function what does the same as outp in conio.h (also input for reading form an port would be nice) in dos/windows for freebsd is there any one who can make something like that.