So what was the custom ROM you mentioned in your earlier post. I.e., how did you modify the ROM?
On many chip programmers, the software that comes with the programmer includes an option to interleave the source file when programming chips. Writing a C program as you did works too.