I'd rather recomment using LLVM:
- It allows you not to bother with low-level details like register allocations (you provide only SSA form)
- It does optimizations for you. It can be faster then the hand-written and well-optimized compiler as the LLVM pipeline in GHC is showing (at the beginning - before much optimalization it had equal or better performance than mature native code generator).
- It is cross-platform - you don't tight yourself to for example x86
I'n not quite sure what you mean by 'kernel' commands. If you mean opcodes:
- There are Intel manuals
- There is Wikipedia page containing all of the documented memnonics (however not the opcodes and not always description)
- There is NASM manual
However the ARM or PowerPC have totally different opcodes.
If you mean the operating systen syscalls (system calls) then:
- You can just use C library. It is in every operating system and is cross platform.
- You can use directly syscalls. However they are harder to use, may be slower (libc may use additional buffering) and are not cross platform (Linux syscalls on x86 - may be not up-to-date).