freebsd 386 syscalls

the keyboard demo runs on my freebsd 386 box when I use these syscalls.