
Hex È«³Æ £¨Intel HEX£©ÎļþÊÇÓÉÒ»ÐÐÐзûºÏIntel HEXÎļþ¸ñʽµÄÎı¾Ëù¹¹³ÉµÄASCIIÎı¾Îļþ¡£ÔÚIntel HEXÎļþÖУ¬Ã¿Ò»Ðаüº¬Ò»¸öHEX¼Ç¼¡£ÕâЩ¼Ç¼ÓɶÔÓ¦»úÆ÷ÓïÑÔÂëºÍ/»ò³£Á¿Êý¾ÝµÄÊ®Áù½øÖƱàÂëÊý×Ö×é³É¡£Intel HEXÎļþͨ³£ÓÃÓÚ´«Ê佫±»´æÓÚROM»òÕßEPROMÖеijÌÐòºÍÊý¾Ý¡£´ó¶àÊýEPROM±à³ÌÆ÷»òÄ£ÄâÆ÷ʹÓÃIntel HEXÎļþ¡£
¼Ç¼¸ñʽ
Intel HEXÓÉÈÎÒâÊýÁ¿µÄÊ®Áù½øÖƼǼ×é³É¡£Ã¿¸ö¼Ç¼°üº¬5¸öÓò£¬ËüÃÇ°´ÒÔϸñʽÅÅÁУº
:llaaaatt[dd...]cc
ÿһ×é×Öĸ¶ÔÓ¦Ò»¸ö²»Í¬µÄÓò£¬Ã¿Ò»¸ö×Öĸ¶ÔÓ¦Ò»¸öÊ®Áù½øÖƱàÂëµÄÊý×Ö¡£Ã¿Ò»¸öÓòÓÉÖÁÉÙÁ½¸öÊ®Áù½øÖƱàÂëÊý×Ö×é³É£¬ËüÃǹ¹³ÉÒ»¸ö×Ö½Ú£¬¾ÍÏñÒÔÏÂÃèÊöµÄÄÇÑù£º
: ÿ¸öIntel HEX¼Ç¼¶¼ÓÉðºÅ¿ªÍ·.
ll ÊÇÊý¾Ý³¤¶ÈÓò,Ëü´ú±í¼Ç¼µ±ÖÐÊý¾Ý×Ö½Ú(dd...)µÄÊýÁ¿.
aaaa ÊǵØÖ·Óò,Ëü´ú±í¼Ç¼µ±ÖÐÊý¾ÝµÄÆðʼµØÖ·.
tt ÊÇ´ú±íHEX¼Ç¼ÀàÐ͵ÄÓò,Ëü¿ÉÄÜÊÇÒÔÏÂÊý¾Ýµ±ÖеÄÒ»¸ö:
00 ¨C Êý¾Ý¼Ç¼
01 ¨C Îļþ½áÊø¼Ç¼
02 ¨C À©Õ¹¶ÎµØÖ·¼Ç¼
04 ¨C À©Õ¹ÏßÐÔµØÖ·¼Ç¼
dd ÊÇÊý¾ÝÓò,Ëü´ú±íÒ»¸ö×Ö½ÚµÄÊý¾Ý.Ò»¸ö¼Ç¼¿ÉÒÔÓÐÐí¶àÊý¾Ý×Ö½Ú.¼Ç¼µ±ÖÐÊý¾Ý×Ö½ÚµÄÊýÁ¿±ØÐëºÍÊý¾Ý³¤¶ÈÓò(ll)ÖÐÖ¸¶¨µÄÊý×ÖÏà·û.
cc ÊÇУÑéºÍÓò,Ëü±íʾÕâ¸ö¼Ç¼µÄУÑéºÍ.УÑéºÍµÄ¼ÆËãÊÇͨ¹ý½«¼Ç¼µ±ÖÐËùÓÐÊ®Áù½øÖƱàÂëÊý×Ö¶ÔµÄÖµÏà¼Ó,ÒÔ256Ϊģ½øÐÐÒÔϲ¹×ã.
Êý¾Ý¼Ç¼
Intel HEXÎļþÓÉÈÎÒâÊýÁ¿ÒԻسµ»»Ðзû½áÊøµÄÊý¾Ý¼Ç¼×é³É.Êý¾Ý¼Ç¼Íâ¹ÛÈçÏÂ:
:10246200464C5549442050524F46494C4500464C33
ÆäÖÐ:
10 ÊÇÕâ¸ö¼Ç¼µ±ÖÐÊý¾Ý×Ö½ÚµÄÊýÁ¿.
2462 ÊÇÊý¾Ý½«±»ÏÂÔص½´æ´¢Æ÷µ±ÖеĵØÖ·.
00 ÊǼǼÀàÐÍ(Êý¾Ý¼Ç¼)
464C¡464CÊÇÊý¾Ý.
33 ÊÇÕâ¸ö¼Ç¼µÄУÑéºÍ.
À©Õ¹ÏßÐÔµØÖ·¼Ç¼(HEX386)
À©Õ¹ÏßÐÔµØÖ·¼Ç¼Ҳ½Ð×÷32λµØÖ·¼Ç¼»òHEX386¼Ç¼.ÕâЩ¼Ç¼°üº¬Êý¾ÝµØÖ·µÄ¸ß16λ.À©Õ¹ÏßÐÔµØÖ·¼Ç¼×ÜÊÇÓÐÁ½¸öÊý¾Ý×Ö½Ú,Íâ¹ÛÈçÏÂ:
:02000004FFFFFC
ÆäÖÐ:
02 ÊÇÕâ¸ö¼Ç¼µ±ÖÐÊý¾Ý×Ö½ÚµÄÊýÁ¿.
0000 ÊǵØÖ·Óò,¶ÔÓÚÀ©Õ¹ÏßÐÔµØÖ·¼Ç¼,Õâ¸öÓò×ÜÊÇ0000.
04 ÊǼǼÀàÐÍ 04(À©Õ¹ÏßÐÔµØÖ·¼Ç¼)
FFFF ÊǵØÖ·µÄ¸ß16λ.
FC ÊÇÕâ¸ö¼Ç¼µÄУÑéºÍ,¼ÆËã·½·¨ÈçÏÂ:
01h + NOT(02h + 00h + 00h + 04h + FFh + FFh).
µ±Ò»¸öÀ©Õ¹ÏßÐÔµØÖ·¼Ç¼±»¶ÁÈ¡,´æ´¢ÓÚÊý¾ÝÓòµÄÀ©Õ¹ÏßÐÔµØÖ·±»±£´æ,Ëü±»Ó¦ÓÃÓÚ´ÓIntel HEXÎļþ¶ÁÈ¡À´µÄËæºóµÄ¼Ç¼.ÏßÐÔµØÖ·±£³ÖÓÐЧ,Ö±µ½Ëü±»ÁíÍâÒ»¸öÀ©Õ¹µØÖ·¼Ç¼Ëù¸Ä±ä.
ͨ¹ý°Ñ¼Ç¼µ±ÖеĵØÖ·ÓòÓë±»ÒÆλµÄÀ´×ÔÀ©Õ¹ÏßÐÔµØÖ·¼Ç¼µÄµØÖ·Êý¾ÝÏà¼Ó»ñµÃÊý¾Ý¼Ç¼µÄ¾ø¶Ô´æ´¢Æ÷µØÖ·.
ʾÀý
¡¡¡¡ÒÔϵÄÀý×ÓÑÝʾÁËÕâ¸ö¹ý³Ì..
À´×ÔÊý¾Ý¼Ç¼µØÖ·ÓòµÄµØÖ· 2462
À©Õ¹ÏßÐÔµØÖ·¼Ç¼µÄÊý¾ÝÓò + FFFF
------------
¾ø¶Ô´æ´¢Æ÷µØÖ· FFFF2462
À©Õ¹¶ÎµØÖ·¼Ç¼(HEX86)
À©Õ¹¶ÎµØÖ·¼Ç¼Ҳ½ÐHEX86¼Ç¼,Ëü°üÀ¨4-19λÊý¾ÝµØÖ·¶Î.À©Õ¹¶ÎµØÖ·¼Ç¼×ÜÊÇÓÐÁ½¸öÊý¾Ý×Ö½Ú,Íâ¹ÛÈçÏÂ:
:020000021200EA
ÆäÖÐ:
02 ÊǼǼµ±ÖÐÊý¾Ý×Ö½ÚµÄÊýÁ¿.
0000 ÊǵØÖ·Óò.¶ÔÓÚÀ©Õ¹¶ÎµØÖ·¼Ç¼,Õâ¸öÓò×ÜÊÇ0000.
02 ÊǼǼÀàÐÍ 02(À©Õ¹¶ÎµØÖ·¼Ç¼)
1200 ÊǵØÖ·¶Î.
EA ÊÇÕâ¸ö¼Ç¼µÄУÑéºÍ,¼ÆËã·½·¨ÈçÏÂ:
01h + NOT(02h + 00h + 00h + 02h + 12h + 00h).
µ±Ò»¸öÀ©Õ¹¶ÎµØÖ·¼Ç¼±»¶ÁÈ¡,´æ´¢ÓÚÊý¾ÝÓòµÄÀ©Õ¹¶ÎµØÖ·±»±£´æ,Ëü±»Ó¦ÓÃÓÚ´ÓIntel HEXÎļþ¶ÁÈ¡À´µÄËæºóµÄ¼Ç¼.¶ÎµØÖ·±£³ÖÓÐЧ,Ö±µ½Ëü±»ÁíÍâÒ»¸öÀ©Õ¹µØÖ·¼Ç¼Ëù¸Ä±ä.
ͨ¹ý°Ñ¼Ç¼µ±ÖеĵØÖ·ÓòÓë±»ÒÆλµÄÀ´×ÔÀ©Õ¹¶ÎµØÖ·¼Ç¼µÄµØÖ·Êý¾ÝÏà¼Ó»ñµÃÊý¾Ý¼Ç¼µÄ¾ø¶Ô´æ´¢Æ÷µØÖ·.
ÒÔϵÄÀý×ÓÑÝʾÁËÕâ¸ö¹ý³Ì..
À´×ÔÊý¾Ý¼Ç¼µØÖ·ÓòµÄµØÖ· 2462
À©Õ¹¶ÎµØÖ·¼Ç¼Êý¾ÝÓò + 1200
---------
¾ø¶Ô´æ´¢Æ÷µØÖ· 00014462
Îļþ½áÊø(EOF)¼Ç¼
Intel HEXÎļþ±ØÐëÒÔÎļþ½áÊø(EOF)¼Ç¼½áÊø.Õâ¸ö¼Ç¼µÄ¼Ç¼ÀàÐÍÓòµÄÖµ±ØÐëÊÇ01.EOF¼Ç¼Íâ¹Û×ÜÊÇÈçÏÂ:
:00000001FF
ÆäÖÐ:
00 ÊǼǼµ±ÖÐÊý¾Ý×Ö½ÚµÄÊýÁ¿.
0000 ÊÇÊý¾Ý±»ÏÂÔص½´æ´¢Æ÷µ±ÖеĵØÖ·.ÔÚÎļþ½áÊø¼Ç¼µ±ÖеØÖ·ÊÇûÓÐÒâÒå±»ºöÂÔµÄ.0000hÊǵäÐ͵ĵØÖ·.
01 ÊǼǼÀàÐÍ 01(Îļþ½áÊø¼Ç¼)
FF ÊÇÕâ¸ö¼Ç¼µÄУÑéºÍ,¼ÆËã·½·¨ÈçÏÂ:
01h + NOT(00h + 00h + 00h + 01h).
Intel HEXÎļþÀý×Ó:
ÏÂÃæÊÇÒ»¸öÍêÕûµÄIntel HEXÎļþµÄÀý×Ó:
:10001300AC12AD13AE10AF1112002F8E0E8F0F2244
:10000300E50B250DF509E50A350CF5081200132259
:03000000020023D8
:0C002300787FE4F6D8FD7581130200031D
:10002F00EFF88DF0A4FFEDC5F0CEA42EFEEC88F016
:04003F00A42EFE22CB
:00000001FF Intel HEXÎļþÊÇÓÉÒ»ÐÐÐзûºÏIntel HEXÎļþ¸ñʽµÄÎı¾Ëù¹¹³ÉµÄASCIIÎı¾Îļþ¡£ÔÚIntel HEXÎļþÖУ¬Ã¿Ò»Ðаüº¬Ò»¸öHEX¼Ç¼¡£ÕâЩ¼Ç¼ÓɶÔÓ¦»úÆ÷ÓïÑÔÂëºÍ/»ò³£Á¿Êý¾ÝµÄÊ®Áù½øÖƱàÂëÊý×Ö×é³É¡£Intel HEXÎļþͨ³£ÓÃÓÚ´«Ê佫±»´æÓÚROM»òÕßEPROMÖеijÌÐòºÍÊý¾Ý¡£´ó¶àÊýEPROM±à³ÌÆ÷»òÄ£ÄâÆ÷ʹÓÃIntel HEXÎļþ¡£