27.10.2015 Views

Advanced Configuration and Power Interface Specification

ACPI_6.0

ACPI_6.0

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Advanced</strong> <strong>Configuration</strong> <strong>and</strong> <strong>Power</strong> <strong>Interface</strong> <strong>Specification</strong><br />

19.3.2 ASL Literal Constants<br />

This section describes how to encode integer <strong>and</strong> string constants using ASL.<br />

19.3.2.1 Integers<br />

DigitChar := ‘0’-‘9’<br />

LeadDigitChar := ‘1’-‘9’<br />

OctalDigitChar := ‘0’-‘7’<br />

HexDigitChar := DigitChar | ‘A’-‘F’ | ‘a’-‘f’<br />

Integer<br />

DecimalConst<br />

OctalConst<br />

HexConst<br />

ByteConst<br />

WordConst<br />

DWordConst<br />

QWordConst<br />

:= DecimalConst | OctalConst | HexConst<br />

:= LeadDigitChar | <br />

:= ‘0’ | <br />

:= | | <br />

:= Integer => 0x00-0xFF<br />

:= Integer => 0x0000-0xFFFF<br />

:= Integer => 0x00000000-0xFFFFFFFF<br />

:= Integer => 0x0000000000000000-0xFFFFFFFFFFFFFFFF<br />

Numeric constants can be specified in decimal, octal, or hexadecimal. Octal constants are preceded<br />

by a leading zero (0), <strong>and</strong> hexadecimal constants are preceded by a leading zero <strong>and</strong> either a lower or<br />

upper case ‘x’. In some cases, the grammar specifies that the number must evaluate to an integer<br />

within a limited range, such as 0x00–0xFF, <strong>and</strong> so on.<br />

19.3.2.2 Strings<br />

String := ‘”’ Utf8CharList ‘”’<br />

Utf8CharList := Nothing | | <br />

Utf8Char := 0x01-0x21 |<br />

0x23-0x5B |<br />

0x5D-0x7F |<br />

0xC2-0xDF 0x80-0xBF |<br />

0xE0 0xA0-0xBF 0x80-0xBF |<br />

0xE1-0xEC 0x80-0xBF 0x80-0xBF |<br />

0xED 0x80-0x9F 0x80-0xBF |<br />

0xEE-0xEF 0x80-0xBF 0x80-0xBF |<br />

0xF0 0x90-0xBF 0x80-0xBF 0x80-0xBF |<br />

0xF1-0xF3 0x80-0xBF 0x80-0xBF 0x80-0xBF |<br />

0xF4 0x80-0x8F 0x80-0xBF 0x80-0xBF<br />

EscapeSeq := SimpleEscapeSeq | OctalEscapeSeq | HexEscapeSeq<br />

SimpleEscapeSeq := \' | \" | \a | \b | \f | \n | \r | \t | \v | \\<br />

OctalEscapeSeq := \ OctalDigitChar |<br />

\ OctalDigitChar OctalDigitChar |<br />

\ OctalDigitChar OctalDigitChar OctalDigitChar<br />

HexEscapeSeq := \x HexDigitChar |<br />

\x HexDigitChar HexDigitChar<br />

NullChar<br />

:= 0x00<br />

String literals consist of zero or more ASCII characters surrounded by double quotation marks ("). A<br />

string literal represents a sequence of characters that, taken together, form a null-terminated string.<br />

After all adjacent strings in the constant have been concatenated, a null character is appended.<br />

Strings in the source file may be encoded using the UTF-8 encoding scheme as defined in the<br />

Unicode 4.0 specification. UTF-8 is a byte-oriented encoding scheme, where some characters take a<br />

single byte <strong>and</strong> others take multiple bytes. The ASCII character values 0x01-0x7F take up exactly<br />

one byte.<br />

786 April, 2015 Version 6.0

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!