string conversion

I have a file with hex numbers like "048C9A..."
I want to convert the file so it should look like "0x04,0x8C,0X9A..."

thanks
1. Read two characters (H and K).
2. Write 0xHK
3. Write comma (if necessary)
4. Repeat from 1.
Topic archived. No new replies allowed.