EED - Extended EDitor The Text Editor in the 41CX represents a major improvement in manual ASCII file handling. This little program, EED, incor- porates automatic creation and resizing of the file and provides a few other functions I've found useful, including printer and mass storage support. If you don't have these, you can easily delete the relevant routines (and any others you deem unnecessary). Also, some of the routines might be useful separa- tely (even for C/CV users). User instructions: 0. Ensure there is a zero-byte program file named " " (space) in the X-memory (needed to reactivate key assignments; see PPC Cal- culator Journal V10N8P53c or V11N4P11, or Keith Jarett's book "Extended Functions made easy", program "IN"). EED can easily be modified to use other key suspension techniques (like PPC ROM SK/RK) or the assignments may simply be cleared (either selecti- vely or by CLKEYS); or you may just trust that there is nothing assigned to the local label keys (delete lines 1-6, 33-35 and 196-198). 1. Place the file name in ALPHA and XEQ "EED". If the file doesn't already exist it will be created, its type is checked and it is resized as large as possible. Then key assignments are sus- pended and ED is entered. 2. The following operations are available when you exit ED. In most cases you must set the pointer (cursor) before leaving ED. After the operation is completed, ED is re-entered automatically. R/S with ALPHA off returns to ED without doing anything else (if you stopped to think or something). R/S with ALPHA on searches for a string (POSFL): place the string in ALPHA and press R/S (with ALPHA on). If it is found (after the current pointer position) the cursor is positioned at it, else a tone sounds and the cursor remains where it is. A: Loading the file from mass storage: place the mass storage file name in ALPHA if it differs from the XM file name, and press A. B: Printing records: enter bbb.eee in X, where bbb is the first record you wish to print and eee the last, and press B. To print the entire file, use .9. This works with the 82143A as well as any HP-IL printer or video interface (utilizing full line length, one record per line if possible). Characters 128-255 will be sent mod 128, however (blame ACA). C: Non-keyboard characters: enter the character code 1-255 and press C. If you wish to enter a null, you must key a dummy character in ALPHA first and delete it when back in ED. c: Changing multiple occurrences of a string: Place "/s1/s2" in ALPHA, where / may be replaced by any non-null character not occurring in either s1 or s2, pointer limit in X, and press c. All occurrences of string s1 between current pointer and x will be changed into s2. Both s1 and s2 must be at most 7 characters long. D: Deleting characters near the beginning of a big file is rather slow if you do it character-by-character in ED. This provides a faster way: just key in the number of characters you want to delete (from the pointer position, not beyond the end of record) and press D. d: Deleting multiple records: enter the number of records you wish to delete (from current on) and press d. H: Moving half-records: pressing H will move the end of the cur- rent record, from pointer on, to the end of the record whose number is in X. This allows you to split a record in two, join two records, or just move a record around. I: Inserting characters in a big file can also be annoyingly slow. You can insert up to 24 characters simultaneously by keying them in ALPHA and pressing I (leave ALPHA mode first). 3. When you've done with the file for the time being, there are three ways to leave EED (exit ED first): E: This will only resize the file to minimum in XM. J: This will save the file in mass storage. Place the mass storage file name in ALPHA if it differs from the XM file name. If the mass storage file does not exist, necessary size is computed and displayed with a tone. You may enter a dif- ferent (bigger) size if you wish; then press R/S and the file will be created. (Note that the size will always be rounded up to the nearest multiple of 32, but the estimated size is disp- layed accurately to give you some idea about how much room there would be left. The estimate is usually a few bytes too big, depending on the number of odd-length records.) After the file has been saved, a tone sounds and display shows "PURFL?Y/N". If you wish to purge the file from XM, press Y; if you wish to retain it there, press N - it will be resized to minimum as in E. e: If you wish to purge the file from XM without saving it, press e. As above, you will be asked to verify this drastic step by pressing Y. Registers R00 and R01 are used (to save the file name), and USER is left on. The file name is left in ALHA and its size in X. Technical notes: - Line 111 appends 6 nulls (hex F77F000000000000). - Lines 1-6 and 198 are necessary in case EED is the last program in CAT 1. Then the GETP in line 197 will cause program execu- tion to continue from line 1. Note that the program may be started by R/S immediately after loading even though it doesn't begin with label. - VERIFY on line 148 is only used to check if the file already exists on mass storage. Extended I/O ROM owners might substi- tute FLTYPE or FLLENG. - Lines 79-81 are needed with the 9114A Disc Drive only. Similar operation is not needed with SAVEAS because preceding VERIFY or CREATE has left the drive motor spinning. - In certain operations a few extra bytes are needed in the file. In H and c characters are inserted before deleting because DELCHR may delete the entire record. Tapani Tarvainen [337] Kiljanderinkatu 2 A 7 SF-40600 JyvÌskylÌ Finland