I am trying to manipulate binary files with ARexx. I am using WRITECH() to emit the contents of a variable to a file, but WRITECH() apparently skips zero bytes ('00'x).
This program is expected to output five bytes, but only outputs THREE. My guess is WRITECH() outputs a null-terminated string, so the '0099'x string will never be output because the '00'x terminates the string, and '99'x is after the termination.
call open 'outfile', 'test.bin'
call writech 'outfile', '0099'x
call writech 'outfile', 'ff'x
call writech 'outfile', '12'x
call writech 'outfile', '34'x
call close 'outfile'
So, how in ARexx can I output a zero byte?