Difference between revisions of "Examples/message file"

From Syslinux Wiki
Jump to: navigation, search
(New "Message file" page.)
 
(Wiki formatting. Add details and examples. Add "see also" links.)
Line 2: Line 2:
  
 
'''Specify ''background'' and ''foreground'' colors:'''
 
'''Specify ''background'' and ''foreground'' colors:'''
 +
{| style=" width: 100%; "
 +
|
 
<!-- Do NOT use "pre" tags here. -->
 
<!-- Do NOT use "pre" tags here. -->
   <SI>''<bg><fg>''                         <SI> = <Ctrl-O> = ASCII 15   
+
   <SI>''<bg><fg>''{{Prsp|125}}<SI> = <Ctrl-O> = ASCII 15   
 +
|}
  
Example ''color.txt'' file in hexadecimal view:
+
Example "''color.txt''" file in hexadecimal view:
 
+
{| style=" width: 100%; "
<pre>
+
|
# xxd color.txt
+
  # xxd color.txt
0000000: 0f39 6542 6c69 6e6b 696e 6720 5965 6c6c  .9eBlinking Yell
+
  0000000: <span style=" background-color: aqua; color: maroon; ">0f</span><span style=" background-color: maroon; color: aqua; ">39</span> <span style=" background-color: lime; color: maroon; ">65</span>42 6c69 6e6b 696e 6720 5965 6c6c  .'''9e'''Blinking Yell
0000010: 6f77 206f 6e20 426c 7565 2042 6163 6b67  ow on Blue Backg
+
  0000010: 6f77 206f 6e20 426c 7565 2042 6163 6b67  ow on Blue Backg
0000020: 726f 756e 640a                          round.
+
  0000020: 726f 756e 640a                          round.
</pre>
+
|}
  
 
Note the first few bytes:
 
Note the first few bytes:
  
{| class="wikitable" style="font-family:monospace"
+
{| class="wikitable" style=" font-family: monospace; "
 
|-
 
|-
| 0x0f :  
+
| 0x<span style=" background-color: aqua; color: maroon; ">0f</span> :  
 
| ASCII &nbsp;15  
 
| ASCII &nbsp;15  
 
|
 
|
 
|
 
|
 
|-
 
|-
| 0x39 :  
+
| 0x<span style=" background-color: maroon; color: aqua; ">39</span> :  
 
| ASCII &nbsp;57  
 
| ASCII &nbsp;57  
| character "9"  
+
| character "'''9'''"  
| ''background'' "bright blue"
+
| ''background'' "<span style=" background-color: blue; color: yellow; ">bright blue</span>"
 
|-
 
|-
| 0x65 :  
+
| 0x<span style=" background-color: lime; color: maroon; ">65</span> :  
 
| ASCII 101  
 
| ASCII 101  
| character "e"  
+
| character "'''e'''"  
| ''foreground'' "yellow"
+
| ''foreground'' "<span style=" background-color: blue; color: yellow; ">yellow</span>"
 
|}
 
|}
  
The resulting content is presented here in different formats, so to support different viewers / browsers:
+
The resulting content is presented here in different formats,  
 +
so as to support different viewers / browsers:
  
<pre>
+
{|
☼9eBlinking Yellow on Blue Background
+
|
 +
<pre style=" background-color: blue; color: yellow; ">
 +
☼9eBlinking Yellow on Blue Background
 
</pre>
 
</pre>
 +
|}
 +
{|
 +
|
 +
&#x263C;9e<span style=" background-color: blue; color: yellow; ">Blinking Yellow on Blue Background</span>
 +
|}
 +
{|
 +
|
 +
&#x0263C;9e<span style=" background-color: blue; color: yellow; ">Blinking Yellow on Blue Background</span>
 +
|}
 +
<code style=" white-space: pre; ">&#x263C;9e<span style=" background-color: blue; color: yellow; ">Blinking Yellow on Blue Background</span></code>
  
&#x263C;9eBlinking Yellow on Blue Background
+
<tt style=" white-space: pre; ">&#x263C;9e</tt><tt style=" background-color: blue; color: yellow; ">Blinking Yellow on Blue Background</tt>
  
&#x0263C;9eBlinking Yellow on Blue Background
+
When this DISPLAY (message) file is shown in the Syslinux boot environment,
 +
the aforementioned special bytes are not part of the output text:
  
<code>&#x263C;9eBlinking Yellow on Blue Background</code>
+
{|
 +
|
 +
<!--
 +
--><!-- Do not leave extra space(s) or hidden characters in the following output,
 +
--><!-- in order to render the result as in a real (screen / output) example.
 +
-->
 +
<pre style=" white-space: pre; background-color: blue; color: yellow; ">
 +
Blinking Yellow on Blue Background
 +
</pre>
 +
|}
 +
 
 +
For simplicity in the above example,
 +
the special bytes (that set the colors)
 +
are located at the very beginning of the "''color.txt''" sample file.
 +
 
 +
Unless noted differently, such special bytes can be located
 +
at any location within the DISPLAY file,
 +
where the colors of the text and/or background that follow them
 +
need to change. They can also be used in multiple places within a DISPLAY file,
 +
as the following example illustrates:
 +
 
 +
{|
 +
|
 +
<!-- Do NOT use "pre" tags here. -->
 +
  <u>☼1f</u>'''F'''<u>☼0a</u>'''1'''<u>☼07</u>'''  Main help'''
 +
  <u>☼1f</u>'''F'''<u>☼0a</u>'''2'''<u>☼07</u>'''  '''<u>☼7b</u>'''Popular boot'''<u>☼07</u>''' options'''
 +
  <u>☼1f</u>'''F'''<u>☼0a</u>'''3'''<u>☼07</u>'''  '''<u>☼1e</u>'''Rescue'''<u>☼07</u>''' boot options'''
 +
 
 +
  '''Press the '''<u>☼1f</u>'''F1'''<u>☼07</u>''' key to continue.'''
 +
|}
  
<tt>&#x263C;9eBlinking Yellow on Blue Background</tt>
+
See also:
 +
* [[Display_file_format]]
 +
<!--
 +
--><!-- The following example of a DISPLAY file should rather be saved/opened in
 +
--><!-- "CR/LF" (i.e. "Windows") "Newline" format,
 +
--><!-- and in either
 +
--><!-- codepage 1252 / "ANSI - Latin I",
 +
--><!-- or as codepage 437 / "OEM - United States",
 +
--><!-- in order to be shown similarly to how it is displayed
 +
--><!-- in the Syslinux boot environment;
 +
--><!-- when opening the file in a web browser,
 +
--><!-- it might be better to use UTF-8 or Unicode instead.
 +
--><!--
 +
--><!-- The reason for these "conditions" is the fact that the special
 +
--><!-- character that sets a pair of foreground/background colors
 +
--><!-- (i.e. ASCII 15) is a non-printable character.
 +
--><!-- Under certain "conditions", a glyph that is "equivalent"
 +
--><!-- to the ASCII 15 character can be displayed.
 +
--><!-- This _printable_ character is Unicode "9788 decimal",
 +
--><!-- or "263C hexadecimal".
 +
--><!-- It is important to note that
 +
--><!-- the Unicode "263C hexadecimal" character is only being used
 +
--><!-- in order to display a printable glyph in the relevant location,
 +
--><!-- instead of having the ASCII 15 "hidden" (non-printable) character.
 +
--><!-- In other words, the Unicode "263C hexadecimal" character is only
 +
--><!-- a "place-holder", and it is not replacement in terms of
 +
--><!-- the functionality / usage of the real ASCII 15 character.
 +
--><!--
 +
--><!--  http://ftp.debian.org/debian/dists/bullseye/main/installer-i386/current/images/netboot/debian-installer/i386/boot-screens/f1.txt
 +
--><!-- 
 +
--><!--  https://deb.debian.org/debian/dists/bullseye/main/installer-i386/current/images/netboot/debian-installer/i386/boot-screens/f1.txt
 +
--><!-- 
 +
--><!--  https://salsa.debian.org/installer-team/debian-installer/-/blob/20200314/build/boot/x86/f1.txt
 +
--><!-- 
 +
--><!--  https://salsa.debian.org/installer-team/debian-installer/-/blob/bullseye/build/boot/x86/f1.txt
 +
--><!-- 
 +
--><!--  https://salsa.debian.org/installer-team/debian-installer/-/blob/master/build/boot/x86/f1.txt
 +
-->

Revision as of 07:08, 22 August 2020


Specify background and foreground colors:

 <SI><bg><fg>                         <SI> = <Ctrl-O> = ASCII 15  

Example "color.txt" file in hexadecimal view:

 # xxd color.txt
 0000000: 0f39 6542 6c69 6e6b 696e 6720 5965 6c6c  .9eBlinking Yell
 0000010: 6f77 206f 6e20 426c 7565 2042 6163 6b67  ow on Blue Backg
 0000020: 726f 756e 640a                           round.

Note the first few bytes:

0x0f : ASCII  15
0x39 : ASCII  57 character "9" background "bright blue"
0x65 : ASCII 101 character "e" foreground "yellow"

The resulting content is presented here in different formats, so as to support different viewers / browsers:

 ☼9eBlinking Yellow on Blue Background
☼9eBlinking Yellow on Blue Background
☼9eBlinking Yellow on Blue Background

☼9eBlinking Yellow on Blue Background

☼9eBlinking Yellow on Blue Background

When this DISPLAY (message) file is shown in the Syslinux boot environment, the aforementioned special bytes are not part of the output text:

Blinking Yellow on Blue Background

For simplicity in the above example, the special bytes (that set the colors) are located at the very beginning of the "color.txt" sample file.

Unless noted differently, such special bytes can be located at any location within the DISPLAY file, where the colors of the text and/or background that follow them need to change. They can also be used in multiple places within a DISPLAY file, as the following example illustrates:

 ☼1fF☼0a1☼07   Main help
 ☼1fF☼0a2☼07   ☼7bPopular boot☼07 options
 ☼1fF☼0a3☼07   ☼1eRescue☼07 boot options
 
 Press the ☼1fF1☼07 key to continue.

See also: