I'm working with an old file format, .tap. It requires the header to have information on the length of the contents of the data following it. Should I be creating the file content, then storing that in a file, then using the contents of the file to read into a new file as I generate the header? Is there a way to INSERT bytes into a file that will move the other contents up by the amount of bytes inserted?
I will also have to get a binary XOR of all of the bytes in the file for the checksum, is there a quick way to do that, or should I be thinking about some thing like:
Code: Select all
x.a=Byte0 ! Byte1
ctr=2
Repeat
x= x ! Byte(ctr)
ctr=ctr+1
Until ctr= Length of Bytes