I've recently posted a solution for reading and writing binary data using KiXtart elsewhere on the board - including NULLs.