EDVV.LIB ver 1.2 ED and VV extracted from Jazz (c) 1994 Mika Heiskanen and 1995 Will Laughlin --> S/SX/G/GX [Note: The ED and VV commands in the Jazz library are so useful that people asked Mika to make a stand-alone library containing just them. Will Laughlin extracted them, and called it EDVV.LIB, so if you'd like to have ED and VV available even when your Jazz card is out, now you can. I never use this myself, though; I always have Jazz installed! -jkh-] These programs were originally written by Mika Heiskanen. I have decided to make this library, in the hope that it will be useful to others who do not have or need the Jazz library, but would like a string editor and viewer. The library is provided 'as is' and is subject to change without notice. No warranty of any kind is made with regard to the software or documentation. The authors shall not be liable for any incidental error or consequential damages in connection with the software and the documentation. To install the library to port 0: (port 1 is similar) a) Download the library to your hp48 b) Recall the library for the variable. c) 0 STO (or 1 STO if port 1 is desired) d) Execute OFF-ON sequence or do a ON-C e) Purge the variable that has the original copy of the library if necessary. [Note: a few ED keys differ from Jazz 4.0. -jkh-] The Commands: ============== Command: ED Stack: ( $ --> $) Description: ED is an editor intended for editing RPL and machine language source code. ED makes no duplicate of the edited string if it is in temporary object area, thus enabling editing very large strings. Note that this implies that no backup of the original string is kept! ED is very fast but since it supports the tabulator it has to do special calculations whenever the display is scrolled. Thus scrolling the display when long lines are present can be quite slow. ED will accept an optional cursor position argument on stack level one, in case you wish to begin editing somewhere other than at the beginning of the string. Most of the normal character keys are in their normal places, others can be fetched via the special character browser. Special keys having different definitions are mostly in the non-alpha plane. The NS,LS,RS planes are defined as follows: +-------+-------+-------+-------+-------+-------+ |BSTART |BEND |BCOPY |BDEL | |FIND | | | | | | |PREV | | | | | | |REPLALL| +-------+-------+-------+-------+-------+-------+ |ARG? | |MEXEC | |UP |NEXT | |ROW? |CHR? |MSTART |TOHEX |PGUP | | |POS? |CHRCAT |MEND |TOASC |TOP |STATUS | +-------+-------+-------+-------+-------+-------+ |'' | | |LT |DN |RT | | | | | |PGDN | | | |RCLSTK1| |LSTART |BOTTOM |LEND | +-------+-------+-------+-------+-------+-------+ |GOTO |GOSUB |GOYES |REVERSE| | | |GOLONG |GOSUBL |GONC | | | | |GOVLNG |GOSBVL |GOC | | | | +-------+-------+-------+-------+-------+-------+ | EXIT |TOGBEEP|TAB |DEL |BS | | |TOGCASE| |DELLINE| | | |TOGOVER| | | | +-------+-------+-------+-------+-------+-------+ |alpha |7 |8 |9 |/ | | |SETMK7 |SETMK8 |SETMK9 |() | | |GOMK7 |GOMK8 |GOMK9 |# | +-------+-------+-------+-------+-------+ |lshift |4 |5 |6 |* | | |SETMK4 |SETMK5 |SETMK6 |[] | | |GOMK4 |GOMK5 |GOMK6 |ASS_RPL| +-------+-------+-------+-------+-------+ |rshift |1 |2 |3 |- | | |SETMK1 |SETMK2 |SETMK3 |<<>> | | |GOMK1 |GOMK2 |GOMK3 |"" | +-------+-------+-------+-------+-------+ |REDISP |0 |. |SPC |+ | | | |, |TAB |{} | |OFF |GOMK0 |NEWLINE|TAB |:: | +-------+-------+-------+-------+-------+ Explanations: BSTART - Set block start address BEND - Set block end address BCOPY - Copy block/cut to cursor position BDEL - Delete block (copied to cut) FIND - Incremental search REPLALL - Incremental replace all MSTART - Start defining macro key sequence MEND - End macro key sequence MEXEC - Execute macro key ARG? - Input repeat count for next key press ROW? - Input row to jump to POS? - Input position to jump to CHR? - Input character number to insert CHRCAT - Character browser, ENTER key echos chosen character to cursor position, ON key exits. RCLSTK1 - Pop string from stk1 into cursor position REVERSE - Reverse chars in block/word SETMK - Set mark GOMK - Jump to mark GOMK0 - Go to previous cursor position TOHEX - Convert block to hex nibbles (Suitable for NIBASC -> NIBHEX conversions) TOASC - Convert block to asc nibbles NEXT - Finds the next occurance of the search string. PREV - Finds the previous occurance of the search string. Special keys during inputline: ENTER - Input ok ON - Cancel DEL - Delete char BACKSPACE - Delete previous char LT/RT - Move left/right During find input pressing RT at the end of input will take the next input char from the current match location. NXT - Next match during find input Special keys in alpha plane: A LS - = ::\n; (with indent checks) A RS - = $ "" A LS + = {\n} (with indent checks) A RS + = CODE\nENDCODE A ENTER = \n + indent the same way as the previous line Notes: Repetition and macro key execution can be aborted with the ON key. Both are aborted automatically if an error occurs. Macro save is aborted if an error occurs. Max length of a macro key sequence is 50 keys. The Viewer ========== Command: VV Stack: ( $|grob --> $|grob ) Description: Simple string/grov viewer. Keys when viewing a string: Up/Down/Left/Right = scroll display PRG/STO/'/EVAL = scroll one display page F/NXT = top/bottom - = slow scrolling + = fast scrolling (default) ON/ENTER = exit Keys when viewing a grob: Up/Down/Left/Right = move grob . = set (x,y) = (0,0) ON/ENTER = exit A-F = choose scroll speed 1-6 The grob viewer uses a grob! replacement with automatic cutting. Masking grobs less than 4 bits wide is not not properly implemented yet. Viewing is done on the text grob, thus the following will create a weird effect: :: ABUFF xVV ;