主题:求一个简单二进制文件的改数据问题
00000000h: 1D 7D 06 00 00 00 00 00 7C 06 00 00 F2 FF FF FF ; .}......|...?
00000010h: E5 FF FF FF 2C 00 00 00 39 00 00 00 F3 F3 00 00 ; ?,...9...篌..
00000020h: 00 00 FF FF 00 00 00 00 00 00 00 00 00 00 00 00 ; ..............
00000030h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000040h: 00 00 00 00 00 00 00 00 00 00 00 00 30 A0 00 00 ; ............0?.
-- --
00000050h: 1E 7D 06 00 7C 06 00 00 A7 06 00 00 F0 FF FF FF ; .}..|...?..?
00000060h: E5 FF FF FF 30 00 00 00 37 00 00 00 F3 F3 00 00 ; ?0...7...篌..
00000070h: 00 00 FF FF 00 00 00 00 00 00 00 00 00 00 00 00 ; ..............
00000080h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000090h: 00 00 00 00 00 00 00 00 00 00 00 00 31 A0 00 00 ; ............1?.
-- --
一个二进制文件如上,,每80个字节为一个数据段,
已经知道 30 A0 这个数据为一个有效值,转成十进制为 41008
想请大家帮忙编个程序,,
打开类似上面源码的这个文件,我能自己指定41008为41001开始或者其他数开始,
把后面每段数据中的这个值改为 41001 .41002 .41003 ....这样子,
谢谢大家啦,能给个源程序,我也能学学。
00000010h: E5 FF FF FF 2C 00 00 00 39 00 00 00 F3 F3 00 00 ; ?,...9...篌..
00000020h: 00 00 FF FF 00 00 00 00 00 00 00 00 00 00 00 00 ; ..............
00000030h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000040h: 00 00 00 00 00 00 00 00 00 00 00 00 30 A0 00 00 ; ............0?.
-- --
00000050h: 1E 7D 06 00 7C 06 00 00 A7 06 00 00 F0 FF FF FF ; .}..|...?..?
00000060h: E5 FF FF FF 30 00 00 00 37 00 00 00 F3 F3 00 00 ; ?0...7...篌..
00000070h: 00 00 FF FF 00 00 00 00 00 00 00 00 00 00 00 00 ; ..............
00000080h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; ................
00000090h: 00 00 00 00 00 00 00 00 00 00 00 00 31 A0 00 00 ; ............1?.
-- --
一个二进制文件如上,,每80个字节为一个数据段,
已经知道 30 A0 这个数据为一个有效值,转成十进制为 41008
想请大家帮忙编个程序,,
打开类似上面源码的这个文件,我能自己指定41008为41001开始或者其他数开始,
把后面每段数据中的这个值改为 41001 .41002 .41003 ....这样子,
谢谢大家啦,能给个源程序,我也能学学。