August 10, 1986 DOS ESCape Sequences Cursor Position Command ESC[#;#H This function moves the cursor to a specivic location. (works like the Basic "Locate" Command) Example: ESC[12;40H This will place the cursor on Row 12 Column 40 (Rows go across, columns go up and down) Default value for # is 1. Cursor Up Command ESC[#A This moves the cursor up one or more rows without changing the column position. Example: ESC[5A Cursor was located on Row 12 Column 40, after this command the cursor will be located on Row 7 Column 40. Default value for # is 1. Cursor Down Command ESC[#B This moves the cursor down one or more rows without changing the column position. Example: ESC[8B Cursor was located on Row 7 Column 40, after this command the cursor will be located on Row 15 Column 40. Default value for # is 1. Cursor Forward Command ESC[#C This moves the cursor forward one or more columns without changing the Row position. Example: ESC[6C Cursor was located on Row 15 Column 40, after this command the cursor will be located on Row 15 Column 46. Default value for # is 1. -2- Cursor Backward Command ESC[#D This moves the cursor backward one or more columns without changing the Row position. Example: ESC[10D Cursor was located on Row 15 Column 46, after this command the cursor will be located on Row 15 Column 36. Default value for # is 1. Horizontal and Vertical Position Command ESC[#;#f This moves the cursor to a specific location like Cursor Position Command does. Default value for # is 1. Erase Display Command ESC[2J This erases (clears) the screen and places the cursor in the Home Position. Erase in Line Command ESC[K Erases (clears) the line from the current cursor position to the end of the line (cursor position included). -3- DOS Screen Colors 0 All attributes off (Normal White on Black) 1 Bold ON (High intensity) 4 Underscore ON (IBM Monochrome Display only) 5 Blink ON 7 Reverse Video ON 8 Cancel ON 30 Black foreground 31 Red foreground 32 Green foreground 33 Yellow foreground 34 Blue foreground 35 Magenta foreground (purple) 36 Cyan foreground (light blue) 37 White foreground 40 Black background 41 Red background 42 Green background 43 Yellow background 44 Blue background 45 Magenta background (purple) 46 Cyan background (light blue) 47 White background Set Graphic Rendition command ESC[#;...;#m Sets screen foreground and background colors, controls Blink, high intensity, etc. This is the one to use to set different foreground/ background colors. I will give several examples here. Example: ESC[0m This will set the screen to black and white. Every character entered after this command will have black background and white foreground in normal intensity, non blinking. It turns off the Blink, High intensity and colors. Example: ESC[34;41m This will set colors to Blue foreground/Red background. Every character entered after this command will be Blue on a Red background. -4- Example: ESC[1;33;42m This will set a foreground color of HIGH INTENSITY Yellow and a background color of Green. * NOTE - Background colors are always normal intensity! * Example: ESC[5;35;40m This will set BLINKING foreground color of Magenta and a Black background.