Andys Editor Help-file Minimum information required to get started using AE, using supplied .INI file. ~X means Shift-X, ^X means Ctrl-X and @X means Alt-X. Esc to cancel current command, or bring up command menu. Arrows Move around buffer (or traditional Wordstar cursor diamond). F3 Enters fold (or ^L ^I). F4 Exits fold (or ^L ^O). @X Exits editor (or other_exit from command menu). /*...sfiles supplied:0:*/ If you are just interested in running AE under OS/2 and DOS, you need :- ae.exe Executable for DOS 3.3 or later, or OS/2 1.x or 2.x. You need this file. Put it on the PATH. ae.ini Initialisation file used by ae.exe by default. Supplied suitable for use under DOS and OS/2. Best to print this and keep handy for a day or two. You need this file. Put it where ae.exe is put. ae.ico OS/2 Icon for AE. Optional. Put it where ae.exe is put. ae.txt This file. Optional. ae.ng Norton Guide for AE. Optional. flatten.exe Produce flat output from folded file. Good for making printable output. If you wish to run on a RS/6000 under AIX. aeaix.bin RS/6000 AIX executable Upload to AIX machine in binary mode as file "ae". Put it on the path. aeaix.ini RS/6000 initialisation file. Much like the ae.ini for DOS and OS/2. Upload to AIX machine in ascii mode as file ".aerc". Put it in your home directory. /*...e*/ /*...sintroduction:0:*/ Welcome to Andys Editor. This editor was designed as a language configurable folding source code editor. This editor provides these features :- Folding. The ability to group lines into a larger 'meta-line'. Block operations. Yank and put model for line copying etc. Deleted item stack to allow multiple undeletes. Extended regular expression searching. Multiple buffers at any one time. Portability across many machines. Bracket matching. User configurable keyboard binding. Shelling of nested processes (and filtering of folds through commands). The editor is relatively small for what it does. This editor is a folding editor. This is a highly useful feature. Once you have got used to the folding paradigm, you will not want to use a flat editor again! /*...e*/ /*...swhat is a folding editor\63\:0:*/ Folding is an idea borrowed from the language occam by INMOS. A fold is a group of lines that may be considered a unit and described by a single line. Eg: Consider the flat piece of code :- while not eof(f) do begin read(f, c); write(c) end This could be folded to give :- while not eof(f) do /*...secho out another character from the file:10:*/ begin read(f, c); write(c) end /*...e*/ The ... line hides away the details of whats going on. Obviously it makes more sense to fold larger and more complicated peices of code away. Its a bit like inline subroutines. A particularly nice way to fold Pascal programs looks like this :- program fred(input, output); {highly trivial example of folding} var i: integer; /*...sinitialise:10:*/ procedure initialise; /*...ssign_on:12:*/ procedure sign_on; begin writeln('FRED version 1.0') end {sign_on}; /*...e*/ begin sign_on; i := 1 end {initialise}; /*...e*/ /*...smain_body:10:*/ procedure main_body; begin writeln('i is ',i:1) end {main_body}; /*...e*/ begin initialise; main_body end. As you can see, this style of folding allows you to rapidly find any given procedure and enables you to see the structure of the program as a whole. Also, you no longer need to page up miles to find the variables! Folds can be open or closed. The ones shown already were closed, but if they are opened they look like this :- while not eof(f) do /*...Secho out another character from the file:10:*/ begin read(f, c); write(c) end /*...e*/ This allows the user to see whats in them without actually entering them. There is a second kind of fold, called a virtual fold which allows links to other files to be made. For example you might see :- program fred(input, output) {$I 'header.inc'} /*...vheader\46\inc:8:*/ begin etc. If you use 'fold_in' on the virtual fold line, then the file is read and selected. I suggest you don't try it on the virtual fold above, since it is unlikely you have a file header.inc for AE to load! If you later use 'fold_out' from within the top fold of header.inc file, then the file is optiobally written if modified, discarded, then the original buffer is selected. In this way many files may edited as if they were only one file. Virtual folds may also be opened, in which case they look like this :- /*...Vheader\46\inc:8:*/ You cannot see the contents of an open virtual fold, since they are in another file, and are not loaded until the virtual fold is entered. The significance of opening virtual folds becomes apparent in searching, where it is possible to search just open virtual folds, and to skip closed ones, during a global search. /*...e*/ /*...swhat is on the screen\63\:0:*/ If you are in the editor now, looking at this fold you should see the following on the top 3 lines :- 1) The name of this help file (probably c:ae.txt) at the top left. 2) The current folds tag just below that (whats on the screen?). 3) A blank line below that (where prompts and error messages appear). 4) The language name (probably top) for the current buffer. 5) The current line and column numbers at the top right. The line number is the 'flat' line number (ie: over the whole file). 6) One or more of the words 'autoindent', 'overtype' and 'insert'. These specify the current editing mode. 7) Either ^I or a number specifying either the number of spaces per press of the tab key or that real chr$(9) tabs are in force. Below that, you should see this text. You will also see a line with a single ^ on it below this text. This marks the end of the current fold. Typing on it automatically inserts a new line. Any unused lines are marked with a ~ in UNIX vi(1) style. /*...e*/ /*...scommand line and startup:0:*/ When this editor loads it does the following :- Processes the command line arguments :- ae [-l] [-r] [-w width] [-h height] [-i inifile] {filename} -l means load filename arguments into buffers -r restricted version (no shelling allowed) -w width set screen mode to width columns -h height set screen mode to height lines -i inifile executes inifile instead of default name Trys to initialise the screen driver. If -w and -h are not specified a default screen size is used. Alternatively, the editor trys to initialise a screen of the desired size. What are allowable screen sizes depend on the hardware installed etc. Next a buffer is created with no name. A virtual fold line is created for each filename argument. On closedown the editor will not write this buffer, since it has no name. Then the configuration file is executed, line by line, stopping if an error occurs. If an error occurs, the line number is given, and AE will continue when the user presses a key. If the -l switch is given the editor attempts to create a buffer for each filename argument and then to load them. If there is only one file, and the -l switch is not given, the file is read in anyway. If there is only one file, it is selected. Then the editor signs on with its version date. /*...e*/ /*...seditor commands:0:*/ This fold lists all the commands available in the editor to the user. These may be executed in 3 ways :- 1) By pressing escape and selecting them from the menu system. The main menu gives a list of sub-menus, grouped by function. These sub-menus give command names, and prompt the user for arguments. 2) By pressing escape, selecting 'COMMAND' and typing them in. The 'COMMAND' menu selection is special in that it does not give a second level menu, but rather it prompts the user for a command string to be executed. 3) By using a key-binding that uses the required commands. A key-binding is a connection between a key or a pair of keys and a command string. A command string is a list of command names followed by arguments. /*...sarguments:0:*/ Arguments may be supplied with the commands, or interactively. Character arguments may be supplied as unsigned decimal ASCII codes, or as single quoted characters. String arguments may be supplied quoted in "'s. Real quotes may be supplied by escaping them with \'s and real \'s may be supplied by quoting themseleves. Numbers may be supplied as unsigned decimal numbers. Yes/No responses may be supplied as 'yes' or 'no'. 'When' responses (when to enter a fold during searching for example) may be supplied as 'always', 'if_open' or 'never'. Buffer and language arguments may be supplied by stating their names in double quotes. Alternatively '.' may be supplied to indicate the current buffer or language of the current buffer. With all the arguments specifying ? will cause the user to be prompted for the arguments value. This is usually via a menu. Eg: character_overtype 65 overtype the current character with A character_type 'A' type A character_insert ? insert a character (to be decided later) line_goto 100 goto 'flat' line number 100 buffer_write . no write the current buffer, no appending line_insert "Hello \"Ace\"" insert Hello "Ace" as a new line /*...e*/ /*...scharacter:0:*/ character_left Move the cursor one character keft. character_right Ditto - but right. character_insert c Insert character and move right. character_overtype c Overtype character over existing one or if at end of line then insert. character_type c Either insert or overtype, depending on flag. None of the 3 character entering routines will do anything if supplied the NUL (ASCII 0) character since this is used internally within the program (written in "C"). character_delete_left Delete the character to the left of the cursor. If the character is no an end of line mark, the character is placed on the deleted stack, along with a flag to say that if it is undeleted then the cursor should move one right afterwards. character_delete_right Delete the character to the right of the cursor. If it is not an end of line mark, it is placed on the deleted item stack along with a flag to say that if it is undeleted, simply insert it at the cursor position and do not move the cursor. character_delete_eol Delete to end of line. Store the end of the line on the deleted stack. character_tab Inserts or overtypes as with either a tab character (^I) or as many spaces as are necessary to pad to the next tab stop. eg: character_type 'A' character_delete_right /*...e*/ /*...sstring:0:*/ string_insert s Insert a string (repeatedly character_insert's). string_overtype s Overtype a string (repeatedly character_overtype's). string_type s Type a string (repeatedly character_type's). eg: string_insert "Hello World" /*...e*/ /*...sword:0:*/ word_left Move left by a word (scope is current fold). word_right Ditto - but right. /*...e*/ /*...sline:0:*/ line_insert string Insert a new line, text of which is string. line_insert... string open indent Insert a fold line. line_insert::: string open indent Insert a virtual fold line. line_delete Delete current line (if not last line). Line is put onto deleted line stack. line_yank Copy current line and put on stack. line_up Move to the previous line in current fold. line_down Ditto - but next. line_start Move to the start of the line. line_end Ditto - but end. line_goto Goto a 'flat' line-number. line_split Splits line at cursor and move to start of new line line_trans from to Convert letters in from to corresponding in to line_exec Takes current text line from current buffer and executes it. Good for testing key-bindings. eg: line_insert... "tag" yes 0 /*...e*/ /*...spage:0:*/ page_up Scroll a page up. page_down Ditto - but down. page_scroll_up Scroll the visible area up a line. page_scroll_down Ditto - but down. /*...e*/ /*...ssearch:0:*/ search_for pattern case_sens reg_exp ... ::: dir n confirm Search for a pattern, which may or may not be a regular expression, searching in either direction, n times, possibly confirming each's position. Can specify when to enter nested folds and virtual folds. search_replace pattern replacement case_sens reg_exp ... ::: dir n confirm Ditto - but replace occurences. search_again Repeat last search or search and replace. search_bracket If currently on a bracket character, find the matching bracket. Scope of search is limited to current fold. eg: search_for ".*\.c" yes yes if_open if_open yes 5 no /*...e*/ /*...stag:0:*/ tag_line Place/remove a tag on current line. There is no limit on the number of tags that may be inserted into each buffer. tag_error Examine current line after cursor and extract a filename and line-number if present. Then if we are editing such a file, place a tag in the file's buffer at the given line number. This is intended for use with the output of the UNIX/DOS make(1) utility. tag_goto dir Move to the next or previous tag in the current buffer. /*...e*/ /*...sfold:0:*/ fold_start Move to the first line in the current fold. fold_end Ditto - but last. fold_open open The cursor must be on a fold line. Make the fold either open or closed. fold_in The cursor must be on a fold line. Enter the fold. fold_out Leave the current fold and go to its parent. /*...e*/ /*...sblock:0:*/ block_mark_1 Place marker one at the current line. block_mark_2 Ditto - but marker two. block_unmark Remove both markers. block_to_mark_1 Move the cursor to the line with the first marker. Do nothing if it is not set. block_to_mark_2 Ditto - but marker two. block_fold tag open indent Create a fold and insert the marked area into it. If there is no marked area, simply create the fold. block_unfold The cursor must be on a fold line. Unfold the fold and make the nested lines be marked. block_entab For each line in the block, insert a tab at its start. Error if line would become too long. block_detab For each line in block starting with a full tab remove the tab. block_read filename Read filename into fold and mark as a block. block_write filename append Write the marked block to a file, possibly appending to it. block_filter command Write marked block to temporary file 1. Run the command with temporary file 1 as its standard input and temporary file 2 as its standard output. Delete marked block. Read in temporary file 2 as the new block. Important: fold information is also written out for any nested folds. Therefore, if you pass a fold through 'sort' the folding structure of the file would almost certainly be corrupted. # This takes a copy of the 'before' block on the deleted item stack. block_delete Delete currently marked block. Put on deleted item stack. If this is subsequently undeleted, the resulting lines will be re-marked as a block. block_yank Put a copy of the current block on the deleted item stack. block_trans from to Convert letters in from to corresponding in to /*...sproblems with block_filter:0:*/ # This is a problem caused by the way fold information is stored in the file. eg: The fold used as the argument File before "sort" File after "sort" {{{ this fold /*...sthis fold:0:*/ contents contents contents /*...e*/ }}} /*...e*/ /*...sthis fold:0:*/ Note that the resulting file has its end reserved comment before its start! If you passed the above file through an "uppercaseifier" then you would find that the reserved comments would be "uppercaseified" as well. In the reserved comment ...s implies closed fold, ...S would imply open. Therfore such a command would, as a side effect, open all nested folds! Moral: only use block filter on text, unless you know the program knows about folding. /*...e*/ /*...e*/ /*...sbuffer:0:*/ buffer_create filename read select Create a new buffer of name filename. If read requested, read it in too. If select requested, select the buffer too. buffer_delete filename Delete the buffer and its contents. Do not delete the file. buffer_select filename Select a buffer for editing. buffer_rename filename filename Change the name of a buffer. buffer_read filename Read in the file into its buffer. buffer_write filename append Write the buffer to its file. eg: buffer_write . no /*...e*/ /*...slanguage:0:*/ language_create langname rc_st rc_end match visible auto insert_mode tab seps Create a language which has reserved comments rc_st and rc_end, matches filenames with an extended regular expression, possibly has autoindent, and has a tab size of tab. The seps string determines what characters, apart from white space seperate words. as making up a word. eg: for "C" use "_" since identifiers may contains _'s. language_delete langname Delete a language. language_select langname Change the language of the current buffer. language_rename langname langname Change the name of a given language. eg: language_create "pascal" "{..." "}" ".*\.pas" no yes yes 0 "_" /*...e*/ /*...ssetup:0:*/ setup_visible Toggle the white space visibility flag. setup_autoindent Toggle the autoindent flag. setup_insert Toggle the insert/overtype flag. setup_tabs Modify the tab size. /*...e*/ /*...skey:0:*/ key_prefix key_name This is used to allow multiple key bindings. eg: to get wordstar like block bindings you should use key_prefix "^K". key_bind key_name(s) stuff_to_end_of_line Make key key_name(s) execute the commands on the rest of the line each time it is pressed. If the first key_name is a prefixed key then a second key name will be expected, to complete the binding. eg: key_bind "^B ^S" "buffer_select ?" /*...e*/ /*...sother:0:*/ other_shell command Execute subprocess command. other_redraw Redraw the entire screen. other_exit confirm Leave Andys Editor. You will be prompted about saving edited buffers. other_abort confirm Leave Andys Editor. No prompts. other_undelete Last deleted item is replaced at cursor position into the text. other_put Last deleted item is copied from deleted item stack to text. other_squeeze Discards deleted stack to free up memory. other_colours t f s mt mf ms Set the colours used by the editor for the text, fold lines, status information and also their marked counterparts. These numeric values used for the arguments vary from machine to machine. eg: other_shell "ls -al" /*...e*/ /*...e*/ /*...sdefault key bindings:0:*/ The configuration file is accessable from these virtual folds (provided you are currently in the right directory). /*...vae\46\ini \45\ DOS\44\ OS\47\2 and Amiga versions:0:*/ /*...v\46\aerc \45\ UNIX\44\ XENIX and AIX versions:0:*/ Any line in these files starting with a ; is ignored by the editor. Any other line is executed as-is by the editor at load time only. AE makes no attempt to re-read this file after it has been edited. Any line in these files may be fed to AE directly by pressing escape and typing in the line as a command (except for comment lines). /*...e*/ /*...sae file format:0:*/ This section is provided to allow people to write tools (including other folding editors) that understand the folded file format. The editor deduces the language of the file from the filename via the extended regular expression specified in the languages language_create statement which is usually done in the initialisation file. eg: For "assembler", the extended regular expression ".*\\.(s|i|asm|inc|mac)" is used to say all .s, .i, .asm,... etc. files are "assembler" files. Also defined per language is and strings (reserved comment start and end). is the most common comment introducer for the language, followed by and is the comment completor (if required). is a string the user is unlikely start a comment with. In practice for all currently defined languages "..." is used, and is recommended for any new languages, unless it is not allowed, in which case something else will do. eg: For "pascal", the most common comment starter is "{", and ender is "}". Hence is "{..." and is "}". eg: For "assembler", comments start with ";" and need no ender. Hence is ";..." and is "". A text file is an ordered list of lines. If a line begins with in column 1, then it is considered to be a 'crease'. Crease types defined are :- s:: begin closed fold, shown as "... tag" S:: begin open fold, shown as "{{{ tag" e end fold E end fold, shown as "}}}" v:: closed virtual fold, "::: tag" V:: open virtual fold, ">>> tag" Any other letter after is reserved for future use and is an error. Begin fold and end fold creases must nest correctly and all match up properly within a text file. Consider them much like brackets. ( Aside: You might note than end fold can be either 'e' or 'E'. The "}}}" is shown by the editor if it pairs with a 'S', not whether it is an 'E' ). is a fold or virtual fold tag. The user may type in any character codes to make up the . Alphanumeric, '_' and ' ' characters are represented in the as-is, but anything else gets mapped to '\' followed by decimal ASCII code followed by '\'. eg: The fold tag "Hypen-ated" is represented in the file by "Hypen\45\ated" For virtual folds (which are essential just references to another file), the first part of the upto the first space or tab character is considered to be the filename, the rest is disregarded when entering a virtual fold. eg: Entering virtual fold with of "sort.c - do sorting" will attempt to load the file "sort.c". represents the columnar indent of the contents of the fold being begun from the beginning of the file. Therefore it is an error if the value for a nested fold is less than the of its parent. Looking back, it might have been better to make +ve and relative to its parent. Example of what is in a sample file, what it represents :- <---- column 1 #include "check.h" #include "check.h" /*...vcheck\46\h:0:*/ ::: check.h static void check(void) static void check(void) { { if ( condition ) if ( condition ) /*...Sdie:16:0*/ {{{ die { { /*...Vwhywarn\46\txt:16:*/ >>> whywarn.txt warn(); warn(); exit(1); exit(1); } } /*...e*/ }}} } } If the die fold used little 's' not big 'S', then the fold would be closed and shown by the editor as "... die" only on the right, until the fold is entered. There is no explicit limit to the levels of nesting allowed. In practice, many of AEs internal functions are written recursively, so it is possible to blow the (very large) stack. I envisage a least 500 levels being safe. In practice, users don't tend to nest much more than 10 levels, so this is not a problem. /*...e*/ /*...smisc stuff:0:*/ /*...sadding to AE:0:*/ Probably the easiest way of "adding" functionality to AE is to write a small filter program and to bind a key like so :- key_bind "^R" "block_filter \"reform -\"" The example uses a program reform to reformat a block. The program reform is simply a filter that reforms its standard input to its output. This paragraph itself was formatted using the very same key-binding. Other filters could supply 'line-drawing-mode', 'white space stripping'. Note that such filters could cause problems if you send folds through them. /*...e*/ /*...smachines supported:0:*/ The editor is written in portable "C" and may easily be ported to new machines, provided they have suitable screen and keyboard control. The only things that change from version to version are available keys for binding, colours and filename conventions. In the case of filename conventions, to ensure portability of folded files, the filenames are converted to a suitable internal format for passing to the operating system. Machine specifics :- /*...sDOS on IBM\45\PC or hardware compatible:0:*/ Bindable keys are all special (non ASCII) keys on the keyboard except ^Break, Caps-Lock, Num-Lock, Scroll-Lock and Sys-Req. The DOS version of AE uses Int-16h, functions 0 and 1 to read the keyboard, or possibly functions 10h and 11h if support for 102 key keyboard is found. Note that if 102 key keyboard support does not exist, then some of the keys listed below will not be bindable. Most of the keys accessible via these mechanisms are available for binding. Ctrl-keys :- ^A ^B ^C ^D ^F ^G ^H ^I ^J ^L ^L ^M ^N ^O ^P ^Q ^R ^S ^T ^U ^V ^X ^Y ^Z ^\ ^] ^^ ^_ NOTE: ^@ is not bindable, its ASCII NUL. NOTE: ^[ is not bindable, its the Esc key. Alt-keys :- @A @B @C @D @E @F @G @H @I @J @K @L @M @N @O @P @Q @R @S @T @U @V @W @X @Y @Z @0 @1 @2 @3 @4 @5 @6 @7 @8 @9 @- @= Function-keys :- F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 ~F1 ~F2 ~F3 ~F4 ~F5 ~F6 ~F7 ~F8 ~F9 ~F10 ~F11 ~F12 ^F1 ^F2 ^F3 ^F4 ^F5 ^F6 ^F7 ^F8 ^F9 ^F10 ^F11 ^F12 @F1 @F2 @F3 @F4 @F5 @F6 @F7 @F8 @F9 @F10 @F11 @F12 Numeric pad keys :- Home Up PgUp ^Home ^Up ^PgUp Left Right ^Left ^Right End Down PgDn ^End ^Down ^PgDn Ins Del ^Ins ^Del Keys for which support is not guaranteed on all keyboards :- @Ins @Home @PgUp ~Tab @Del @End @PgDn ^Tab ^Grey+ ^Grey- @Tab @Grey+ @Grey- @Up @Left @Down @Right ^Break is not bindable, although it can be used to abort searching functions. Filenames may be supplied in normal DOS notation but internally they are converted to lower case using forward slashes. Colours are made up of a foreground colour, a background colour, a flash and a brightness value. Values are :- Black 0 Flashing 1 Blue 1 Static 0 Green 2 Cyan 3 Red 4 Magenta 5 Yellow 6 Extra bright 1 White 7 Low brightness 0 The complete colour is calculated as :- foreground_colour + background_colour * 16 + brightness * 8 + flashing * 128 eg: bright yellow on red is 6 + (4 * 16) + (1 * 8) + (0 * 128) The seasoned IBM-PC user will note that these are simply the screen colour attribute values. Also that on a black and white system, these colours will be completely different for the same values! A wide variety of CGA, EGA, VGA and Super VGA screen modes are supported, including various 43,50 and 60 line modes, and also 132 columns modes. /*...sDOS Terminal Handler:0:*/ Terminal Handler for IBM-PC and 100% compatibles ------------------------------------------------ Here is a statement of the support for various text modes by this module. Several levels of support are defined. MDA No EGA, VGA or super VGA BIOS support has been found and the machine was observed running in Mode 7. Assumed because there are no modes 0-3. SUPPORTS ==> 80 columns, 25 lines CGA No EGA, VGA or super VGA BIOS support has been found. SUPPORTS ==> 40/80 columns, 25 lines EGA Support for EGA found, but no VGA or super VGA. SUPPORTS ==> 40/80 columns, 25/43 lines The 25/43 line support is acheived by the use of the 'char- generator' BIOS call setting a 14 or 8 pixel high font in the 350 line high screen giving 350/14=43 or 350/14=25 line modes. VGA Support found for VGA, but no super VGA. SUPPORTS ==> 40/80 columns, 12/14/21/25/28/43/50 lines The 12/14/21/25/28/43/50 line mode support is acheived by the combined use of the 'char-generator' BIOS call setting a 16, 14 or 8 pixel high font and the 'alternate-select' to set 400, 350 or 200 line high modes :- 200 lines 350 lines 400 lines 8 pixel font 25 #1 43 50 14 pixel font 14 25 #1 28 16 pixel font 12 21 25 Note #1: The code will pick the 400 line, 16 pixel high font in preference to these combinations, as it looks better. XGA2 Support for XGA2 BIOS 132 column mode 0x14 has been found. (int 0x10,ah=0x1b,bx=0,es:bx->0x40 byte buffer, returned al=0x1b, byte ptr = first dword of buffer, (ptr [2] & 0x10) != 0 => mode 0x14 supported). SUPPORTS ==> 40/80/132 columns, 12/14/21/25/28/43/50 lines XGA cards are capable of a 132 column modes. BIOS support for the new mode 0x14 only officially appeared with the release of XGA2. The test performed above is the official IBM recommended test. In early drivers, there is a bug which makes the above test fail. However a slightly different secondary test will work, and is done. ((buffer[0x2e]&0x10) != 0 => 132 column support => mode 0x14). There is a public domain TSR available that adds the BIOS support for 132 column modes to the video BIOS shipped with the old XGA. If you install this TSR on your old XGA, then this should work. In the current level of XGA2 BIOS, support for any number of scan lines other than 400 lines is broken. Hence 12/14/21/43 lines do not work at 132 columns. IBM will fix this later... The IBM Models 35, 40, 56, and 57 have a special form of VGA in them that is a halfway-house between VGA and XGA. This hardware supports all the 132 column modes listed without flaw, and declares its support in the same way. FEEDBACK ==> Works to degree specified - Tested by Author ET4000 Support for the Tseng BIOS extensions. (int 0x10,ax=0x10f1 returned al=0x10, Tseng get DAC type function). SUPPORTS ==> mode w h base 0x18,132,44,0xb000 <--+ 0x19,132,25,0xb000 | 0x1a,132,28,0xb000 +--- #1 0x21,132,60,0xb800 | 0x22,132,44,0xb800 <--+ 0x23,132,25,0xb800 0x24,132,28,0xb800 0x26, 80,60,0xb800 0x2a,100,40,0xb800 + VGA modes Note #1: If a mode change is required, then support will prefer a mode with base address 0xb800 over one with base address 0xb000. FEEDBACK ==> Works! - Tested by Author PARADISE Paradise / Western Digital BIOS support detected. (signiture "VGA=" found at 0xc000:0x007d). This BIOS support is present for "Paradise EGA-480" and "Paradise VGA" cards. However the test matches both types of card. I have only got full information on the "Paradise VGA". SUPPORTS ==> mode w h base 0x21,132,44,0xb800 0x51, 80,30,0xb800 #1 0x54,132,43,0xb800 #2 0x55,132,25,0xb800 #3 + VGA modes Note #1: This mode exists only on EGA-480 card. Base address is assumed to be 0xb800. If on a VGA card, and request this mode screen output will be lost. Notes #2 and #3: The base address is known to be 0xb800 on the VGA card, but I have had to assume the same for the EGA-480 card. If this is false, then screen output will be lost in these modes. Please can someone mail be a differentiating test between the Paradise VGA and Paradise EGA-480 cards. FEEDBACK ==> Works! VEGA Support for the VEGA / Video 7 extensions has been found. (int 0x10, ax=0x6f00 returned 0x5637 (='V7')). SUPPORTS ==> mode w h base 0x40, 80,43,0xb800 #1,#3 0x41,132,25,0xb800 #3 0x42,132,43,0xb800 #3 0x43, 80,60,0xb800 #3 0x44,100,60,0xb800 #3 0x4d,120,25,0xb800 #3 0x4e,120,43,0xb800 #3 0x4f,132,25,0xb800 #2,#3 + VGA modes Note #1: If a mode change is required, then the regular VGA mode 80x43 will be used in preference to this mode. Note #2: If a mode change is required, then mode 0x41 will be used in preference to mode 0x4f. Note #3: the base address is assumed to be 0xb800. If it is not (unlikely), then screen output will be lost for these modes FEEDBACK ==> None AHEAD Support for Ahead Systems BIOS extensions has been found. (signiture "AHEAD" found at 0xc000:0x0025). This test matches the "Ahead Systems EGA2001", the "Ahead B" and the "Ahead B (Wizard 3270)" cards, and will not differentiate between them. The "Ahead B" modes are well documented. SUPPORTS ==> mode w h base 0x22,132,44,0xb800 #2 0x23,132,25,0xb800 #2 0x24,132,28,0xb800 #1 + VGA modes Note #1: This mode does not exist for the EGA2001. Since my test does not differentiate among Ahead cards you can select this mode. If your card is an EGA2001, screen output will be lost. Note #2: My documentation omits the base addresses for these modes on the EGA2001 card. If they are not also 0xb800 (unlikely) screen output will be lost. Currently my test will match the "Ahead B (Wizard/3270)". Sadly none of the above modes will work on it. If I could recognise this specific card, then I could support :- ==> mode w h base 0x2f,160,50,0xb800 0x32, 80,34,0xb800 #1 0x33, 80,66,0xb800 Note #1: If a mode switch is required, the support will use the normal VGA BIOS mode 80x34 in preference to this mode. Please can someone mail me a test to differentiate between types of Ahead card. At the moment I assume "Ahead B". FEEDBACK ==> None ATI Support for ATI cards found. (signiture "761295520" found at 0xc000:0x0031 identifies ATI support) (signiture "31" found at 0xc000:0x0040 identifies "ATI VGA Wonder") (signiture "32" found at 0xc000:0x0040 identifies "ATI EGA Wonder") Support exists for "ATI EGA Wonder" :- SUPPORTS ==> mode w h base 0x23,132,25,0xb800 0x33,132,44,0xb800 0x58, 80,33,0xb800 + VGA modes In my documentation the "ATI VGA Wonder" only has a 132x25 special mode, which requires a special program VCONFIG loaded. If this TSR is loaded (int 0x10, ax=0x5555 returns ax=0xaaaa), then support the "ATI VGA Wonder" card, assuming the mode is a colour mode. SUPPORTS ==> mode w h base 0x08,132,25,0xb800 + VGA modes Also, my documentation talks of an "ATI VIP" card. It is not known what signiture this card places at 0xc000:0x0040, if, in fact it does. If it has "32" there, all be okay, as this card supports the same modes as the "EGA Wonder". But if I can identify the ATI VIP card as above "EGA Wonder" then more modes can be supported. ==> mode w h base 0x55, 80,66,0xa000 #1 0x59, 80,66,0xa000 Note #1: If a mode change is required, the support would pick mode 0x55 over 0x59 for no readily explainable reason. FEEDBACK ==> None TRIDENT Support for Trident TVGA 8800/8900 found (outp(0x03c4,0x0e); old_reg = inp(0x03c5); outp(0x03c5,0x00); new_reg = inp(0x03c5); outp(0x03c5,0x02); ??? if (new_reg & 0x0f) == 0x02, then Trident supported) SUPPORTS ==> mode w h base 0x50, 80,30,0xb800 0x51, 80,43,0xb800 #1 0x52, 80,60,0xb800 0x53,132,25,0xb800 0x54,132,30,0xb800 0x55,132,43,0xb800 0x56,132,60,0xb800 0x57,132,25,0xb800 #2 0x58,132,30,0xb800 #2 0x59,132,43,0xb800 #2 0x5a,132,60,0xb800 #2 + VGA modes Note #1: Should a mode change be required, the support will pick the VGA BIOS 80x43 mode in preference to mode 0x51. Note #2: These modes have a character cell 9 pixels wide, compared to the 8 pixels wide of modes 0x53 to 0x56. Therefore if a mode change is required, the support will pick these modes rather than the other modes. FEEDBACK ==> None OAK OAK Technologies VGA-16 has been detected. (Bank switch register found, writeable via: outpw(0x3de, (value<<8)|0x11); readable via: outp(0x3de, 0x11); value = inp(0x3df); All bits of value remembered at this port. Port is restored to original value after test). SUPPORTS ==> mode w h base 0x50,132,25,0xb800 0x51,132,43,0xb800 + VGA modes FEEDBACK ==> None VESA VESA BIOS extensions identified. (int 0x10, ax=0x4f00 returned ax=0x004f). VESA support is special. The VESA BIOS extensions are only used if they are detected via the above test. The supported modes are enumerated, looking for supported text modes with number >= 0x0100, Window A present, being read/writable. SUPPORTS ==> mode w h base 0x0108, 80,60,0x???? #1 0x0109,132,25,0x???? #1 0x010a,132,43,0x???? #1 0x010b,132,60,0x???? #1 + VGA modes Note #1: The base segment is queried from the VESA BIOS. FEEDBACK ==> None USER User defined extension to the support. Supplied to allow testing of ONE additional mode. When you have tested an additional mode(s), you can mail them to me and I can incorporate them into the internal mode table. Most SVGA text modes are defined via a mode number, rows and columns, and a base segment for the screen buffer. If the environment variable TH_VSUPP_USER is set correctly, this module assumes that the corresponding hardware to support the mode is present, and will use it if present. In this mode support assumed to exist for VGA and below modes also. No other SVGA support is tested for. This support is intended for the debugging and adding support for new and as yet supported cards. For example, to try out support for the "Ahead B (Wizard 3270)", 160x50 mode, which is not supported explicitly at present, type SET TH_VSUPP_USER=0x2f,160,50,0xb800 Before using a program that uses the Terminal Handler, and you will be able to use the new mode (assuming you ask for it). Note: no spaces should appear in the definition of TH_VSUPP_USER, despite some of the listings above, which have had spaces added for readability. Finally, due to the nature of VESA support (specifically: different BIOS calls used), this extension mechanism - TH_VSUPP_USER - can not be used to set up VESA modes. Remember, VESA BIOS used if and only if the VESA check above succeeds, and if TH_VSUPP_USER is found, no other super VGA cards are tested for. FEEDBACK ==> None Super VGA? ---------- I have assumed that an card that supports these additional text modes also supports the VGA BIOS to provide the VGA 43, 50 line modes etc. If I am wrong, and some cards are actually Super EGA, then my code will fail when using VGA style modes (obviously). There is some evidence for this as one or two cards actually supply modes that seem to duplicate those acheivable via the VGA BIOS. Summary ------- I am working from an incomplete reference, but have tried to support a variety of levels of BIOS/hardware/modes/sizes as best I can. If you have a SVGA adaptor with modes that do not work, or are not supported, please send me the following information. 1) The name of the card. 2) Does the card support a superset of VGA or EGA (see comment above). 3) A test that can be used to uniquely identify the card. 4) The values of TH_VSUPP_USER you have successfully used for the card. 5) Any special specifics for the card/mode etc. No promises but, if you send me the above information, I will try to incorporate it into the DOS Terminal Handler code. /*...e*/ Note that the usual AE.EXE file is a stubbed DOS+OS/2 1.x executable, and so will run on DOS, OS/2 1.x, OS/2 2.x and WindowsNT. /*...e*/ /*...sOS\47\2 on any OS\47\2 machine:0:*/ Keys as DOS, filenames as DOS, colours as DOS. Any mode OS/2 can provide to a text mode application via the Vio interface can be used by AE, including the Super VGA modes detected by the SVGA.EXE utility and stored in the SVGADATA.PMI data file under OS/2 2.x. This includes 132 column modes on XGA-2 for example. Note under OS/2, AE can access HPFS style long filenames. Note that the usual AE.EXE file is a stubbed DOS+OS/2 1.x executable, and so will run on DOS, OS/2 1.x, OS/2 2.x and WindowsNT. A 32 bit compiled version of AE for OS/2 2.x does exist, but offers little over the 16 bit version. /*...e*/ /*...sAny generic UNIX machine:0:*/ Bindable keys are limited to K0-K9 as available via their termcap(5) k0-k9 entries. The cursor pad should work provided your terminal is in the correct mode. Backslashes are automatically converted to slashes in filenames. There are 4 'colour' settings available on a UNIX terminal. Some or all of them may be supported, depending on the terminal. They are :- Normal 0 Underline 1 -- support for this often not present Standout 2 -- this is usually invert or bold Alternate 3 -- this could be an alternate character set It is important the user be aware of potential problems operating AE over a network or a pad system. Note that ^Q and ^S are usually used for flow control, and typing these can hang a connection. Also, ^Y and ^Z are often the 'susp' and 'dsusp' keys, which can suspend ae, until fg is typed (csh). The stty command can be used to reassign/disable these keys. Also note that AE needs to know accurately, what sort of terminal it is on. If the TERMCAP is not set properly then AE will either refuse to load, or will put junk on the screen. /*...e*/ /*...sSunOS UNIX:0:*/ As UNIX except that suntools(1) permitting, L1-L10 and R1-R15 are also bindable. Also note that the keys Left, Right, Up and Down no longer exist. You should use the relevant R keys. AE is not designed to be a full Sun Windows application. Judicious use of setkeys(1) is required to get access to the Sun Function Keys. When adding Andys Editor to the rootmenu then the following line should be used :- "Andys Editor" shelltool -Wl "Andys Editor" \ -Wi \ -WL "" \ /fullpath/ae 'fullpath' is the full path to the directory with AE stuff in it. /*...e*/ /*...sMicrosoft XENIX:0:*/ All the Fn keys, ~Fn keys, ^Fn Keys, and ~^Fn keys. @Fn key combinations are reserved for use by the XENIX multi-terminal system. The keypad is also accessible. Filenames as UNIX. Colours as UNIX. /*...e*/ /*...sIBM AIX 3\46\1 or later:0:*/ This is just like most other UNIXes except that AIX does not have compatible/ proper termcap level support. So on this system, AE is compiled up with a terminal handler that uses AIX Extended Curses. This provides access to most function keys and colour support, provided a suitable terminal type is in use. If you use aixterm() or log into AIX via the IBM Internal tool HFTTERM.EXE, excellent support is obtained. The following additions to your .cshrc file will improve Ctrl key support. stty -ixon -ixoff # Disable ^S ^Q flow control stty susp undef # ^Y no longer suspends stty dsusp undef # ^Z no longer suspends However, the support has hard coded keycodes for most of the keys available from an aixterm(1) session. So in addition to the usual UNIX keys you get :- Alt-keys :- @A @B @C @D @E @F @G @H @I @J @K @L @M @N @O @P @Q @R @S @T @U @V @W @X @Y @Z @0 @1 @2 @3 @4 @5 @6 @7 @8 @9 Function-keys :- F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 ~F1 ~F2 ~F3 ~F4 ~F5 ~F6 ~F7 ~F8 ~F9 ~F10 ~F11 ~F12 ^F1 ^F2 ^F3 ^F4 ^F5 ^F6 ^F7 ^F8 ^F9 ^F10 ^F11 ^F12 @F1 @F2 @F3 @F4 @F5 @F6 @F7 @F8 @F9 @F10 @F11 @F12 Note that if you are working on an X-Station, then depending upon your window manager, some of the keys may be intercepted before AE sees them. For example, when I run the Motif-Window-Manager, mwm, I find that @F4 is intercepted before AE sees it, and it is used to close the aixterm window. Colours are the same as those for DOS or OS/2, except bright and flash attributes are ignored. /*...e*/ /*...sCommodore Amiga:0:*/ Bindable keys are the Fn keys, ~Fn keys, Arrow-keys and ~arrow-keys and most of the @keys. For some unexplained reason @E to @H and @J to @K are unaccessable. The Amiga version contains the bug that when disk access is requested, a pop-up box may appear asking the user if he wishes to abort. Somehow Intuition thinks a break has been requested. The workaround is simply to click on continue. The cause is unknown - I 'borrowed' my terminal code from Emacs and I can only assume they have the same problem. Backslashes in filenames are converted to slashes internally. Colours on the Amiga are simply numbered from 0 to 3. They are whatever intuition currently has them set up as. /*...e*/ /*...e*/ /*...scopying this editor:0:*/ This editor is all my own work. I hereby place it in the Public Domain. Do what you like with it. Please redistribute it as you received it. Please don't try to sell it. Please don't try to place restrictions on what others can do with it. This software is supplied as-is, with no guarantee. /*...e*/ /*...srevision history:0:*/ Significant and recent revisions are only listed. If you have a version between listed dates, it will have some of the problems listed. You should always upgrade if you can. 15/1/89 Initial version (Alpha-Test). Various dates: Many minor bugfixes and various speed increases. Extremely extensive testing (4 years worth)! Brought OS/2, DOS, AIX and UNIX versions closer together. Many releases to university and work collegues. 1/5/93 Made Public Domain. First official external release to Internet. 1/7/93 Added readonly file test to UNIX versions. Fixed backup filename of "../.login" etc.. Improved tag_error to work with "filename.ext", line NUM. 21/3/94 Converted all source to fully prototyped form. Made source tree structure much safer. Compilable with IBM C-Set++ for 32 bit OS/2. Language redefiniton fix. Comments at ends of lines in .INI files now allowed. /*...e*/ /*...sobtaining this editor:0:*/ Internet: ftp.cdrom.com:/pub/os2/all/editors/ae.zip IBM-VNET: REQUEST AE FROM AKEY AT HVTVM5 /*...e*/ /*...scontacting the author:0:*/ {{{ Andy Key Internet: ak@vnet.ibm.com # Currently working at IBM until September 94 IBM-VNET: AKEY AT HVTVM5 # so addresses valid at least until then. /*...e*/ /*...e*/