ansi_escape_codes
The ANSI escape codes are used by MS-DOS based systems to change the position of the cursor, and also change the colour attributes. These codes are the main base behind the function's used by Iniquity to change the colour's and move the cursor, creating a highly flexible screen display system. These code's are made up of two main part's, but the second part can be broken down even farther. The first part is the escape code, the ASCII character code is ALT-27, and the second part makes up the identifier for the code. This part is made up of two to three main parts, the first being the '[' bracket, the second being a number, or an identifier, and the third part is an identifier, if the second part contains a number. Each Code currently used is explained below, as you will see these code in ANSI screen when you are editing the through a text editor. The escape code will be represented by an 'Esc'. Esc[2J - This code is used to clear the screen, and place the cursor at the home position (1,1). Esc[K - This code is used to clear the line from the current cursor position to the end of the line, placing the cursor back to the original position. Esc[row;colH - This code is used to position the cursor on the screen. 'row' represents the 'y' coordinate, and 'col' represents the 'x' coordinate. Esc[Na - This code is used to move the cursor up 'n' rows. Esc[Nb - This code is used to move the cursor down 'n' rows. Esc[Nc - This code is used to move the cursor right 'n' columns. Esc[Nd - This code is used to move the cursor left 'n' columns. Esc[s - This code is used to save the current cursor position. Esc[u - This code is used to return the cursor to the saved position. Esc[nm - This code allows you to select a character attribute using 'n' as the attribute, which can be one set of the following. 0 - No Special Attributes. 1 - High Intensity. 2 - Low Intensity. 3 - Italic. 4 - Underline. 5 - Blink. 6 - Rapid Blink. 7 - Reverse Video. 8 - Concealed Text (No Display). 30 - Foreground Black. 31 - Foreground Red. 32 - Foreground Green. 33 - Foreground Yellow. 34 - Foreground Blue. 35 - Foreground Magenta. 36 - Foreground Cyan. 37 - Foreground White. 40 - Background Black. 41 - Background Red. 42 - Background Green. 43 - Background Yellow. 44 - Background Blue. 45 - Background Magenta. 46 - Background Cyan. 47 - Background White.
ansi_escape_codes.txt · Last modified: by admin