Configuring Assembly Styles

The following section describes the color settings related to the Assembly Language lexer. This lexer currently only supports the Intel platform. These settings are available from the File Types tab of the Settings dialog by selecting the "Asm" category shown in the dialog below.

 

       

 

The following table describes the list of lexer settings that may be configured for the Assembly language type.

 

Lexer Setting

Description

Assembler Directives

The Assembler Directives category applies to any assembler directives configured by the user. These directives may be specified by selecting the Keywords tab for the Assembly language type. These types are listed as part of the File types tab in the Settings dialog.

 

The following example demonstrates the highlighting of Assembler directives:

 

    

 

In this case the include and dw are categorized as assembler directives and highlighted in the color and font specified by the user (red in this case).

 

Assembler Directive Operands

The Assembler Directive Operands category applies to any operands such as byte, dword, far, near that are part of the Assembly language file. These directives are user configurable and may be specified by selecting the Keywords tab for the Assembly language type. These types are listed as part of the File types tab in the Settings dialog.

 

The following example demonstrates the highlighting of Assembly Directive Operands:

 

 

In this case the word byte is categorized as an assembler directive operand and highlighted in the color and font specified by the user (red in this case).

 

Brace Highlighting

The Brace Highlighting category occurs when the cursor is adjacent to an opening brace that is matched by a closing brace or vice versa. Brace matching occurs on the following set of braces:

 

( and)

{ and }

[ and ]

 

The following example demonstrates this category:

 

    

 

In this case the opening { of the sample and its closing } match and are categorized as "Brace Highlighting" and highlighted in the color and font specified by the user (red in this case).

 

Comments

The Comments category applies to single line assembly language comments that begin with the ; operator.

 

The following example demonstrates an assembly language comment

 

    

In this case the two comments are categorized as such and highlighted in the color and font specified by the user (green in this case).

 

CPU Instructions

The CPU Instructions category is used to highlight any CPU instructions such as cmp or and. They are user configurable and may be specified by selecting the Keywords tab for the Assembly language type. These types are listed as part of the File types tab in the Settings dialog.

 

In this example the instructions mov, and, cmp, jae are all CPU instructions and are highlight in the color and font specified by the user (red in this case).

 

Default

The Default category really only applies to virtual space that is not occupied by characters or whitespace. In this case both the foreground color and the font settings have no purpose, only the background color is used. It is provided to allow the user to maintain a consistent color across all styles when changing the background color.

 

The following example demonstrates this category:

 

    

 

In this case all virtual space that is not occupied by characters or whitespace is categorized as the "Default" category and highlighted in the color and font specified by the user (grey in this case).

 

Extended Instructions

The Extended Instructions category applies to advanced Pentium instructions such as the SIMD instruction set. These instructions are user configurable and may be specified by selecting the Keywords tab for the Assembly language type. These types are listed as part of the File types tab in the Settings dialog.

 

The following example demonstrates this category:

 

    

 

In this case the instruction mulps is categorized as an Extended Instruction and highlighted in the color and font specified by the user (red in this case).

 

FPU Instructions

The FPU Instructions category applies to floating point instructions such as those listed in the example below. These instructions are user configurable and may be specified by selecting the Keywords tab for the Assembly language type. These types are listed as part of the File types tab in the Settings dialog.

 

 

In this case the instruction fstcw  and fwait are categorized as FPU Instruction and highlighted in the color and font specified by the user (red in this case).

 

Identifiers

The Identifiers category applies to such things as labels and constants that the user creates.

 

The following example demonstrates this category:

 

    

 

In this case the words DOUBLE, W0, x and cos_tooLarge are categorized as "Identifiers" and highlighted in the color and font specified by the user (red in this case).

 

Indent Guides

The Indent Guides category applies to the indent guides if they are displayed. Note that the font size does not apply. For more information please refer to the indent guides topic.

 

The following example demonstrates the this category:

 

    

 

In this case the indent guides are displayed and highlighted in the color and font specified by the user (red in this case).

 

Line Numbers

The Line Numbers category applies to the line numbers displayed in the left hand column. For more information on displaying line numbers please refer to the line numbers topic.

 

The following example demonstrates this category:

 

    

 

In this case the line numbers are highlighted in the color and font specified by the user (purple on a grey background in this case).

 

Mismatched Brace

The Mismatched Brace category occurs when an opening brace has no closing brace or vice versa. This will only be displayed if the cursor currently located adjacent to the brace. Brace matching occurs on the following sets of braces:

 

( and)

{ and }

[ and ]

 

The following example demonstrates this category:

 

    

 

In this case the opening{ has no closing brace so it is categorized as mismatched braces and highlighted in the color and font specified by the user (red in this case).

 

Numbers

The Numbers category applies to any numbers contained in the file. Line numbers are categorized separately.

 

The following example demonstrates this category:

 

    

 

In this case the numbers 7FF0h, 6, 53, 16 and 3FF0h are categorized as numbers and are highlighted in the color and font specified by the user. (red in this case).

 

Open Strings

The Open Strings category applies to both single and double quoted strings that have not been closed by a corresponding closing single or double quote.

 

The following example demonstrates this category:

 

    

 

In this case the word"ax is categorized as an open string because there is no closing quote at the end of the string. It is highlighted in the color and font specified by the user (red in this case).

 

Operators

The Operators category applies to any operators contained in the file such as +, -, +, ], *, etc. Note that braces are highlighted in an alternate color if the cursor is adjacent. Refer to the Brace Highlighting and Mismatched Brace categories for more information.

 

The following example demonstrates this category:

 

    

 

In this case the operators ,, [, ], + , - and * are categorized as operators and are highlighted in the color and font specified by the user. (red in this case).

 

Registers

The Registers category is used to highlight any CPU registers encountered in the assembly language file. The list of registers is user configurable and may be specified by selecting the Keywords tab for the Assembly language type. These types are listed as part of the File types tab in the Settings dialog.

 

The following example demonstrates this category:

 

    

 

In this case the registers edi, al, ecx, dl, and esi are categorized as registers and highlighted in the color and font specified by the user. (red in this case).

 

Strings

The Strings category applies to strings that are enclosed in double or single quotes.

 

The following example demonstrates an example of a double quoted string:

 

    

 

In this case the string "ax" enclosed in double quotes is categorized as a string and highlighted in the color and font specified by the user (blue in this case).

 

Whitespace and Control Characters

The Whitespace and Control characters category applies to any whitespace and control characters that are displayed.

 

The following example demonstrates this category:

 

    

 

In this case, any spaces, tabs or control characters are categorized as  whitespace or control characters and highlighted in the color and font specified by the user (underlined red in this case).