Honestly, I have no idea how to do that. Assuming you know C, the best place to look is in the Linux kernel source code (25MB). It's got code to interface practically all the standard ports on the PC.
ftp://ftp.linuxberg.com/pub/kernel.org/v2.4/linux-2.4.3.tar.gz
If the ftp site is busy, you can try again later. You can uncompress it using Winzip or UINX gunzip and tar programs.
If you're pressed for time, I recommend using several COM ports or two parallel ports, since interfacing them from QB is easy. If the data rate doesn't have to be that high, you can multiplex signals on a single wire on the port.