home *** CD-ROM | disk | FTP | other *** search
/ Audio 4.94 - Over 11,000 Files / audio-11000.iso / msdos / music / ansipl20 / ansicode.txt < prev    next >
Text File  |  1991-06-02  |  9KB  |  130 lines

  1.  
  2.  
  3.  
  4.  
  5.                                                  ANSI CODES REFERENCE
  6.                                                                                
  7.  
  8.       Below is a reference listing ANSI CODES.  For more information
  9.       how to use the ansi codes, consult your DOS user's manual.
  10.  
  11.           >>>----- Screen Attribute Command Sequences -----<<<                 
  12.                                                                                
  13.                                                                                
  14.     Name/                         Default   Function                           
  15.     Command        Parameter       Value    Operation                          
  16.   ---------------  ------------    ------   ----------------------             
  17.   SET SCREEN       see below        none    Sets the default character display 
  18.   ATTRIBUTE:                                mode.  Command line may contain    
  19.   ESC [px;px;...;pxm                        several codes which are separated  
  20.                                             by semicolons.                     
  21.                                                                                
  22.   Wherein p is a number specified below:           Wherein x is:               
  23.   --------------------------------------           -------------               
  24.   0   Normal (white on black)                      0 = Black                   
  25.   1   High intensity                               1 = Red                     
  26.   4   Underscore (monochrome display only)         2 = Green                   
  27.   5   Blink                                        3 = Yellow                  
  28.   7   Reverse video (black on white)               4 = Blue                    
  29.   8   Invisible                                    5 = Magenta                 
  30.   3x  Set foreground color to x (wherein x is:)    6 = Cyan                    
  31.   4x  Set backgroung color to x (wherein x is:)    7 = White                   
  32.                                                                                
  33.                                                                                
  34.            >>>----- Cursor Control Command Sequences -----<<<                  
  35.                                                                                
  36.    Values for parameters are specified in ASCII decimal (that is, row 10 is    
  37.    indicated by the characters  10 ).  Letters following the parameters        
  38.    are case-sensitive.                                                         
  39.                                                                                
  40.     Name/                         Default   Function                           
  41.     Command        Parameter       Value    Operation                          
  42.   ---------------  ------------    ------   ----------------------             
  43.   SET POSITION:    r = row #          1     Move the cursor to the specified   
  44.   ESC [r;cH        c = column #       1     screen position.                   
  45.    --or--                                   Both rows and columns are numbered 
  46.   ESC [r;cf                                 starting at 1.                     
  47.                                                                                
  48.   MOVE UP:         l # of lines       1     Move cursor up specified number of 
  49.   ESC [lA                                   lines or until top of screen is    
  50.                                             reached.  Column position is not   
  51.                                             changed.                           
  52.                                                                                
  53.   MOVE DOWN:       l # of lines       1     Move cursor down specified number  
  54.   ESC [lB                                   of lines or until bottom of screen 
  55.                                             is reached.  Column position is    
  56.                                             not changed.                       
  57.                                                                                
  58.   MOVE RIGHT:      c # of columns     1     Move cursor right specified number 
  59.   ESC [cC                                   of columns or until right edge of  
  60.                                             screen is reached.  Row position   
  61.                                             is not changed.                    
  62.  
  63.                                                        (continued on page 2)
  64.                                                                                
  65.  
  66.  
  67.  
  68.  
  69.                                                                       page 2
  70.  
  71.   MOVE LEFT:       c # of columns     1     Move cursor left specified number  
  72.   ESC [cD                                   of columns or until left edge of   
  73.                                             screen is reached.  Row position   
  74.                                             is not changed.                    
  75.  
  76.   SAVE CURSOR      none                     The current cursor position is     
  77.   POSITION:                                 saved (in memory).  Only the last  
  78.   ESC [s                                    saved position is remembered.      
  79.                                                                                
  80.   RESTORE CURSOR   none                     Move cursor to the location set    
  81.   POSITION:                                 with last SAVE CURSOR POSITION     
  82.   ESC [u                                    command.                           
  83.                                                                                
  84.   REPORT CURSOR    6                        Will return the current cursor     
  85.   POSITION:                                 position in the format of:         
  86.   ESC [6n                                   ESC [r;cR                          
  87.                                             wherein r is the current cursor row
  88.                                             and c is the current cursor column 
  89.                                                                                
  90.              >>>----- Screen Erase Command Sequences -----<<<                  
  91.                                                                                
  92.     Name/                         Default   Function                           
  93.     Command        Parameter       Value    Operation                          
  94.   ---------------  ------------    ------   ----------------------             
  95.   ERASE SCREEN:    2                  2     Erase entire display and move      
  96.   ESC [2J                                   cursor to home position.           
  97.                                                                                
  98.   ERASE LINE:      0                  0     Erase line from cursor position to 
  99.   ESC [0K                                   the right margin, inclusive.       
  100.                                             Cursor position is not changed.    
  101.                                                                                
  102.              >>>----- Display Mode Command Sequences -----<<<
  103.                                                                                
  104.   SET MODE:        (wherein # is:)          Sets display mode according
  105.   ESC [=#h                                  to the parameter (#) specified.
  106.                                             Command sequence must end with
  107.                                             a lowercase "h".
  108.  
  109.   RESET MODE:      (wherein # is:)          Resets display mode according
  110.   ESC [=#l                                  to the parameter (#) specified.
  111.                                             Equivalent to set mode except
  112.                                             for parameter 7, which turns
  113.                                             end-of-line wrap off.  Command
  114.                                             sequence must end with a lower-
  115.   wherein # is:                             case "l".
  116.   -------------
  117.   0     40 x 25 black and white.        Remember that if these codes are
  118.   1     40 x 25 color.                  used, they may not display correctly
  119.   2     80 x 25 black and white.        on all monitors due to hardware
  120.   3     80 x 25 color.                  variations.
  121.   4     320 x 200 color.
  122.   5     320 x 200 black and white.
  123.   6     640 x 200 black and white.
  124.   7     End-of-line wrap turned on.
  125.  
  126.   * Note: keyboard reassignment commands are not listed in this
  127.           reference.  For more details, consult your DOS user's manual.
  128.                                                                                
  129.   Also see the file MUSICODE.TXT for a listing of Music Codes.
  130.