Difference between revisions of "Template:Intel HEX"

From blackwiki
Jump to navigation Jump to search
imported>Lambtron
(+doc for colorized, individual fields)
imported>Lambtron
(clarified: data field may be empty and start code will still be displayed if all other fields specified)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
  
This template generates a colorized [[Intel HEX]] record. A start code (':' character) will be displayed if all record fields are specified, otherwise it will be omitted.
+
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==
Line 36: Line 36:
 
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|}}}|{{#if:{{{4|}}}|{{#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>
+
</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.