hex2bin 软件使用说明
1. 解压缩软件
2.拷贝hex文本文件
将你的hex文本文件myHexFile.txt
拷贝到hex2bin的解压缩目录中
C:\share\test\hex2bin\hex2bin\win64>dir
Volume in drive C is NetApp_Win10
Volume Serial Number is 3C81-A4AD
Directory of C:\share\test\hex2bin\hex2bin\win64
01/15/2024 06:52 PM <DIR> .
01/15/2024 06:51 PM <DIR> ..
01/15/2024 05:55 PM 3,282,653 hex2bin.exe
01/15/2024 06:47 PM 110,112 hexdump.exe
01/15/2024 06:12 PM 146 myHexFile.txt
3 File(s) 3,392,911 bytes
2 Dir(s) 281,271,402,496 bytes free
2.打开hex文本文件
计算出红色方框内要被扣掉的字符个数(本例中为6),以及绿色方框内要保留最终导入到二进制bin文件的字符个数(本例中为47)
3.运行软件
运行一下两条命令生成myHexFile.bin
文件。
C:\share\test\hex2bin\hex2bin\win64>hex2bin.exe -i myHexFile.txt -o myHexFile.txt.new -s 6 -l 47
C:\share\test\hex2bin\hex2bin\win64>hex2bin.exe -i myHexFile.txt.new -o myHexFile.bin -p
C:\share\test\hex2bin\hex2bin\win64>dir
Volume in drive C is NetApp_Win10
Volume Serial Number is 3C81-A4AD
Directory of C:\share\test\hex2bin\hex2bin\win64
01/15/2024 06:41 PM <DIR> .
01/15/2024 06:07 PM <DIR> ..
01/15/2024 05:55 PM 3,282,653 hex2bin.exe
01/15/2024 06:41 PM 16 myHexFile.bin
01/15/2024 06:12 PM 146 myHexFile.txt
01/15/2024 06:40 PM 32 myHexFile.txt.new
4 File(s) 3,282,847 bytes
2 Dir(s) 281,549,701,120 bytes free
4.查看生成的bin文件
C:\share\test\hex2bin\hex2bin\win64>hexdump.exe myHexFile.bin
000000 00 00 00 00 00 40 30 00 00 00 00 00 00 20 30 00