2006/01/05

SYSLINUX의 Display 파일인 MSG 확장자 파일 포맷코드

지금 하고 있는 일이 리눅스 인스톨러를 만드는 일인데, ISOLINUX에 있는 확장자가 *.msg 인 파일에는 일반인이 이해할 수 없는 코드가 몇가지 있는데 이 코드에 대해서 다음과 같은 내용을 갖다놓는다.

이 코드를 VIM에서만 입력을 해보았는데 입력을 할 경우 Ctrl+V 를 먼저 누르고 입력해야 한다. (숫자 ^0 처럼 보이는 것은 영어 대문자 O이다. 터미널에선 구분이 잘 되지 않는다)

전문 : http://syslinux.zytor.com/faq.php#format
-----
{ What is the DISPLAY File Format? }

DISPLAY and function-key help files are text files in either DOS or UNIX format (with or without <CR>). In addition, the following special codes are interpreted:

<FF> <FF> = <Ctrl-L> = ASCII 12
Clear the screen, home the cursor. Note that the screen is filled with the current display color.

<SI><bg><fg> <SI> = <Ctrl-O> = ASCII 15
Set the display colors to the specified background and foreground colors, where <bg> and <fg> are hex digits, corresponding to the standard PC display attributes

0 = black 8 = dark grey
1 = dark blue 9 = bright blue
2 = dark green a = bright green
3 = dark cyan b = bright cyan
4 = dark red c = bright red
5 = dark purple d = bright purple
6 = brown e = yellow
7 = light grey f = white


Picking a bright color (8-f) for the background results in the corresponding dark color (0-7), with the foreground flashing.

Colors are not visible over the serial console.

<CAN>filename<newline> <CAN> = <Ctrl-X> = ASCII 24
If a VGA display is present, enter graphics mode and display the graphic included in the specified file. The file format is an ad hoc format called LSS16; the included Perl program "ppmtolss16" can be used to produce these images. This Perl program also includes the file format specification.

The image is displayed in 640x480 16-color mode. Once in graphics mode, the display attributes (set by <SI> code sequences) work slightly differently: the background color is ignored, and the foreground colors are the 16 colors specified in the image file. For that reason, ppmtolss16 allows you to specify that certain colors should be assigned to specific color indicies.

Color indicies 0 and 7, in particular, should be chosen with care: 0 is the background color, and 7 is the color used for the text printed by SYSLINUX itself.

<EM> <EM> = <Ctrl-Y> = ASCII 25
If we are currently in graphics mode, return to text mode.

<DLE>..<ETB> <Ctrl-P>..<Ctrl-W> = ASCII 16-23
These codes can be used to select which modes to print a certain part of the message file in. Each of these control characters select a specific set of modes (text screen, graphics screen, serial port) for which the output is actually displayed:

Character Text Graph Serial
------------------------------------------------------
<DLE> = <Ctrl-P> = ASCII 16 No No No
<DC1> = <Ctrl-Q> = ASCII 17 Yes No No
<DC2> = <Ctrl-R> = ASCII 18 No Yes No
<DC3> = <Ctrl-S> = ASCII 19 Yes Yes No
<DC4> = <Ctrl-T> = ASCII 20 No No Yes
<NAK> = <Ctrl-U> = ASCII 21 Yes No Yes
<SYN> = <Ctrl-V> = ASCII 22 No Yes Yes
<ETB> = <Ctrl-W> = ASCII 23 Yes Yes Yes

For example:

<DC1>Text mode<DC2>Graphics mode<DC4>Serial port<ETB>

... will actually print out which mode the console is in!

<SUB> <SUB> = <Ctrl-Z> = ASCII 26
End of file (DOS convention).

<BEL> <BEL> = <Ctrl-G> = ASCII 7
Beep the speaker.

댓글 없음: