X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fd588,bba5a29a2c756216 X-Google-Attributes: gidfd588,public From: Colin Douthwaite Subject: Re: Help Date: 1998/06/03 Message-ID: <896851096.749323@mnementh.southern.co.nz> X-Deja-AN: 359033626 References: <3571C2B0.2977CC22@slkc.uswest.net> Organization: CLEAR Net, http://www.clear.net.nz/ User-Agent: tin/pre-1.4-980226 (UNIX) (SunOS/5.4 (sun4m)) Newsgroups: alt.ascii-art.animation Geech wrote: >Um, I've been playing around for a bit with ascii >images but I just discovered this animation side >of it all, how do you make them? Where can I get >some info? ========================================================================= ANSI ESCAPE SEQUENCES ( For use in Ascii animations ) ========================================================================= Wherever you see '#', that should be replaced by the appropriate number. ESC code sequence Function ------------------- --------------------------- Cursor Controls: ESC[#;#H or ESC[#;#f Moves cusor to line #, column # ESC[#A Moves cursor up # lines ESC[#B Moves cursor down # lines ESC[#C Moves cursor forward # spaces ESC[#D Moves cursor back # spaces ESC[#;#R Reports current cursor line & column ESC[s Saves cursor position for recall later ESC[u Return to saved cursor position Erase Functions: ESC[2J Clear screen and home cursor ESC[K Clear to end of line Set Graphics Rendition: ESC[#;#;....;#m Set display attributes where # is 0 for normal display 1 for bold on 4 underline (mono only) 5 blink on 7 reverse video on 8 nondisplayed (invisible) 30 black foreground 31 red foreground 32 green foreground 33 yellow foreground 34 blue foreground 35 magenta foreground 36 cyan foreground 37 white foreground 40 black background 41 red background 42 green background 43 yellow background 44 blue background 45 magenta background 46 cyan background 47 white background ESC[=#;7h or Put screen in indicated mode where # is ESC[=h or 0 for 40 x 25 black & white ESC[=0h or 1 for 40 x 25 color ESC[?7h 2 for 80 x 25 b&w 3 for 80 x 25 color 4 for 320 x 200 color graphics 5 for 320 x 200 b & w graphics 6 for 640 x 200 b & w graphics 7 to wrap at end of line ESC[=#;7l or ESC[=l or Resets mode # set with above command ESC[=0l or ESC[?7l Keyboard Reassignments: ESC[#;#;...p Keyboard reassignment. The first ASCII or ESC["string"p code defines which code is to be or ESC[#;"string";#; changed. The remaining codes define #;"string";#p what it is to be changed to. E.g. Reassign the Q and q keys to the A and a keys (and vice versa). ESC [65;81p A becomes Q ESC [97;113p a becomes q ESC [81;65p Q becomes A ESC [113;97p q becomes a E.g. Reassign the F10 key to a DIR command. ESC [0;68;"dir";13p The 0;68 is the extended ASCII code for the F10 key and 13 is the ASCII code for a carriage return. Other function key codes F1=59,F2=60,F3=61,F4=62,F5=63 F6=64,F7=65,F8=66,F9=67,F10=68 ======================================================================== Note: ESC = ASCII #27, the left pointing arrow character .--------------------- ANSI.SYS Quick Reference Guide ---------------------. | ------------------ ----------------- -------------- | | Display Attributes Set Display Modes Cursor Control | |--------------------------------------------------------------------------| | ESC[1;2;3;4;5;6;7;8m ESC[=H ESC[A Up J | | ESC[B Down H | | 0 White on Black 0 25x40 BW ESC[C Right W | | 1 High intensity 1 25x40 Color ESC[D Left | | 2 Underscore (mda) 2 25x80 BW ESC[H Move 1 | | 5 Blink on 3 25x80 Color ESC[s Save 9 | | 7 Reverse Video 4 200x320 Clr Gfx ESC[u Restore 9 | | 8 Screen off 5 200x320 BW Gfx ESC[2J CLS 1 | |-------------------------- 6 200x640 B&W Gfx ESC[K Clear line | | Foreground Background --------------------- ------------------------- | |------------------------- ESC[=7l Line Wrap OFF Keyboard Re-assignment | | 30 Black 40 Black ESC[=7h Line Wrap ON ------------------------- | | 31 Red 41 Red --------------------- ESC[;p | | 32 Green 42 Green If you ever have the | | 33 Brown 43 Brown problem where ANSI Code/result may be ASC | | 34 Blue 44 Blue is displayed at row or scankey value. Result | | 35 Magenta 45 Magenta 1 column 80 until it may be characters within | | 36 Cyan 46 Cyan is done, use WordWrap quotes for words to echo | | 37 White 47 White ON command above. when key is pressed. | ---------------------------------------------------------------------------- -Joey@ptd.net- ============================================================================