Difference between revisions of "Template:Intel HEX"
imported>Lambtron (+support for partial records that exclude start code) |
imported>Lambtron (clarified: data field may be empty and start code will still be displayed if all other fields specified) |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
| − | This template generates a colorized [[Intel HEX]] record. | + | This template generates a colorized [[Intel HEX]] record. A start code (':' character) will be displayed if all record fields are specified (data field is optional), otherwise it will be omitted. |
==Syntax== | ==Syntax== | ||
<code><nowiki>{{Intel HEX | RecordLength | AddressField | RecordType | Data | Checksum}}</nowiki></code> | <code><nowiki>{{Intel HEX | RecordLength | AddressField | RecordType | Data | Checksum}}</nowiki></code> | ||
| − | == | + | ==Examples== |
;Color legend | ;Color legend | ||
{{legend inline|#FFFFCC|Start code}} | {{legend inline|#FFFFCC|Start code}} | ||
| Line 15: | Line 15: | ||
{{legend inline|#CCCCCC|Checksum}} | {{legend inline|#CCCCCC|Checksum}} | ||
| − | + | ===Complete records=== | |
| + | Complete records will have an automatically prepended start code (':') character. For example, | ||
| + | |||
<code><nowiki>{{Intel HEX|10|0100|00|214601360121470136007EFE09D21901|40}}</nowiki></code> | <code><nowiki>{{Intel HEX|10|0100|00|214601360121470136007EFE09D21901|40}}</nowiki></code> | ||
| Line 21: | Line 23: | ||
{{Intel HEX|10|0100|00|214601360121470136007EFE09D21901|40}} | {{Intel HEX|10|0100|00|214601360121470136007EFE09D21901|40}} | ||
| + | |||
| + | ===Partial records=== | ||
| + | An individual, colorized field can be displayed by invoking the template with other fields left empty. For example, | ||
| + | |||
| + | <code><nowiki>{{Intel HEX||0100|||}}</nowiki></code> | ||
| + | |||
| + | produces | ||
| + | |||
| + | {{Intel HEX||0100|||}} | ||
==Note== | ==Note== | ||
This template uses the same color scheme as [[Template:SREC HEX]]. | This template uses the same color scheme as [[Template:SREC HEX]]. | ||
| − | </noinclude><includeonly>{{#if:{{{1|}}}|{{#if:{{{2|}}}|{{#if:{{{3 | + | </noinclude><includeonly>{{#if:{{{1|}}}|{{#if:{{{2|}}}|{{#if:{{{3|}}}|{{#if:{{{5|}}}|<span style="background-color:#FFFFCC;font-family:monospace">:</span>|}}|}}|}}|}}<span style="background-color:#CCFFCC;font-family:monospace">{{{1}}}</span><span style="background-color:#CCCCFF;font-family:monospace">{{{2}}}</span><span style="background-color:#FFCCCC;font-family:monospace">{{{3}}}</span><span style="background-color:#CCFFFF;font-family:monospace">{{{4}}}</span><span style="background-color:#CCCCCC;font-family:monospace">{{{5}}}</span></includeonly> |
Latest revision as of 15:55, 4 August 2014
This template generates a colorized Intel HEX record. A start code (':' character) will be displayed if all record fields are specified (data field is optional), otherwise it will be omitted.
Syntax
{{Intel HEX | RecordLength | AddressField | RecordType | Data | Checksum}}
Examples
- Color legend
Start code Byte count Address Record type Data Checksum
Complete records
Complete records will have an automatically prepended start code (':') character. For example,
{{Intel HEX|10|0100|00|214601360121470136007EFE09D21901|40}}
produces
:10010000214601360121470136007EFE09D2190140
Partial records
An individual, colorized field can be displayed by invoking the template with other fields left empty. For example,
{{Intel HEX||0100|||}}
produces
0100
Note
This template uses the same color scheme as Template:SREC HEX.