I am just writing a program to modify some of the bin file....
I am want to use as console program
my main aims is to fill some parts of data(i.e 100h to 1ffh, enter by user)with FF
however, i found some problems
when i open the file and fprint FF(255) to it, it can replace the desire block, however, the file ends after the last written block.
for example, if i need to modify value between 100h-1000h for a 1.5M size bin file, the output file is become 0-1000h, it just overwrite itself instead of replace the desire block....
i just use the function "fprint/fput", but both cannot achieve the replace function....
Could anyone have some suggestions on how to solve it?