HP-71 Lexfile List
Collected by Joe HornAn Alphabetical list of the most popular and useful HP-71 lexfiles.
For a complete list of any lexfile's keywords and syntax, see The LEXicon.TO DOWNLOAD:
There are three ways to download the following files. You can (a) download each lexfile individually under its entry as a binary LIF image, or (b) as a hex dump (to be typed into the MAKELEX program), or (c) download the complete collection. Binary downloads are LIF images, which are transmitted to your HP-71 via your PC-to-IL card, or your PIL-box (USB-to-IL converter). Their file extension is .DAT because that's the file extension expected by the PIL-box. If your security settings don't allow you to download .DAT files, then download the zipfile and extract if from there.Complete Lexfile Collection as a DAT file (currently 51.5 KB)
Complete Lexfile Collection as a ZIP file (currently 22.3 KB)Note: The "complete collection" above contains the binary files only, not text files; see the individual files below for documentation and other text files.
ALARMLX “Multiple Alarms lexfile”. SIZE: 2180 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- ALARMLX gives to the HP-71 the same power that the HP-41CX enjoys: the ability to set multiple alarms for any time and date, message or control alarms, interrupting or non-interrupting, and one-shot or repeating alarms. One new feature which the HP-41CX does not have: you can specify how many times a repeating alarm is to activate before clearing itself.
- ALARMLX also contains equivalents of the HP-41CX's ALMCAT (alarm catalog), and CLRALMS (clear all alarms). New to ALARMLX, however, is the ability to clear just the one alarm at a given time and date.
ATTNLEX “Attention Key lexfile”. SIZE: 68 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- ATTN OFF disables the ATTN key from interrupting programs; it becomes just another key that is put in the key buffer when pressed.
- ATTN ON restores it to normal. Looks better than POKE “2F441”,“0” and POKE “2F441”,“1”, but has identical effects.
BANNER LCD print utility. SIZE: 202 bytes (“CLOCKVID” = 593 bytes).
Lexfile: BIN | HEX | DOC
CLOCKVID program: BIN | TXT
ALL 5 (ZIP)Converts a string character into a string of 48 characters that represents the LCD display (8 rows of 6 dots) of that character. Allows printing large banners from keyboard input text. Even works on CHARSET characters!
- BANNER$’s parameters allow optional specification of foreground and background characters.
- Comes with a BASIC program “CLOCKVID” that displays a digital clock on a CRT (using video interface) in HUGE digits; the HP-71 turns itself on once a minute to update the display, then turns off again!
BEEPLEX “Beeper lexfile”. Great for game programs. SIZE: 206 bytes.
BIN | HEX | Source | DOC | ALL 4 (ZIP)
- CHIRP causes the error-beep to sound, but without an error.
- MGUN causes a machine-gun type of noise.
- SING sings a happy upward sweep of notes.
- ZAP sounds a despressing, downward sweep of notes.
BREAKPT “Break Point lexfile”. Adds breakpoint ability, usually only found in low-level languages like Assembly language debuggers. SIZE: 365 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- BREAK lets you specify any line number or numbers where the HP-71 should automatically PAUSE (same as inserting a PAUSE at that line of code). Even works on ROM programs. Primarily used for debugging, but also good for simple program control.
- UNBREAK clears all breakpoints set by BREAK.
- BLIST lists all the current breakpoint line numbers.
CALCLEX “CALC Mode lexfile”. SIZE: 41 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)Adds no keywords to BASIC. Modifies the action of the back-arrow key in CALC mode to be identical to the BACKspace key. With CALCLEX in memory, you no longer have to press the gold “f” key to backspace!
CLOCKDSP “Clock Display lexfile”. SIZE: 328 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- CLOCK ON puts the HP-71 into clock display mode: the right end of the display turns into a digital clock updating every second, but the rest of the display is left alone for you to do work of any sort as usual! Even works in CALC mode.
- CLOCK OFF turns off the clock and returns the entire display to your control. Cannot be used with programs that use the WINDOW statement.
COMBARR “Combinations / Arrangements lexfile”. SIZE: 168 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- COMB quickly finds the number of different groups of R things you can take from a group of P things.
- ARR quickly finds the number of ways of arranging P things taken R at a time (also known as “permutations”).
- Allows greater ranges than allowed by the FACT definitions of combinations or permutations.
CONTRLEX “Contrast lexfile”. SIZE: 49 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- CONTRAST function: returns the current display setting as set by the built-in CONTRAST statement.
CURLEX “Cursor lexfile”. SIZE: 109 bytes.
BIN | HEX | Source | DOC | ALL 4 (ZIP)Adds no keywords to BASIC. Modifies the action of the “g”-shifted left and right-arrow keys. Ordinarily, they go to the far left and right, respectively. When CURLEX is in memory and USER mode is ON, then they only move 21 spaces left or right, respectively. This makes it possible to “jump” back and forth in the display in display-width chunks, like the HP-75 can. The feature can be disabled by turning USER OFF.
CURVIEW “Cursor VIEW lexfile”. SIZE: 90 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)Adds no keywords to BASIC. Modifies the action of the VIEW key. When VIEW is pressed in USER mode, the current position of the cursor is displayed until VIEW is released, then the display is restored. Disabled by USER OFF (VIEW works normally). Great for text editing.
CUSTUTIL “Customization Utilities lexfile”. This lexfile is a must for those who plan to market their programs to the “real world”. SIZE: 1007 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- INLINE is an improved INPUT, with controls such as cursor position and type, and termination key specification. It allows amazingly “friendly” programming.
- KEYNAM$ returns the name of the numbered key, and
- KEYNUM returns the number of the specified key name. These allow full use of functions and statements that use either key name or number.
- KEYWAIT$ is the most useful lex function of all; it is the same as KEY$ but it waits in low-power “idle” mode until a key is pressed.
- MSG$ returns the specified message or error string, automatically translating if a translator lexfile that handles pTRANS is in memory.
- SCROLL scrolls the display so that the specified character is the first one displayed, the rest being off the left edge, available with the arrow keys.
DATALEX “DATA File utilities”. SIZE: 1416 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- DDELETE deletes the specified record, and shrinks the DATA file size.
- DINSERT inserts data into the specified record, and the DATA file size grows.
- DRECORDS returns the number of records in the specified DATA file.
- EXPAND lengthens the specified DATA file by expanding all of its current records by any specified number of bytes.
- RECLEN returns the record length of the specified DATA file.
- SWAP: I'm not sure what this does, but it seems that it ought to swap records or fields in records. Can you figure out what it does?
DESAL SIZE: 718 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- ADBUF$ finds the address of the specified buffer.
- ASC$ returns its argument string with all non-printable characters (ASCII codes 0-31 and 127-255) changed to a period.
- ATH$ is an ASCII to HEX converter; a string of ASCII characters (regular string) is changed to a string of hex digits, each pair representing one byte of the string, nibble-reversed.
- HTA$ converts hex to ASCII.
- RED$ reduces a string by removing all spaces on both ends.
- KEYWAIT$: see KEYWAIT below.
- REV$: see REVLEX below.
- PEEK$ and POKE: see POKELEX below.
DRIVELEX “Lexfile Driver”. Wonderful! SIZE: 277 bytes.
BIN | HEX | Source | DOC | ALL 4 (ZIP)
- DISABLE <filename> “turns off” the specified lexfile; although the lexfile is left in the catalog chain, it is removed from the lex chain, and changed to a “D-LEX” file which has no effect on HP-71 operation.
- ENABLE <filename> changes the lexfile back into a “LEX” file, restores it to the lexfile chain, and returns all its effects (keywords and poll handlers) to normal.
- Having many lexfiles in memory is delightful because of the power it gives you, but it’s bad because it slows down the whole machine. For optimum speed, DISABLE the lexfiles not needed at the moment, and ENABLE them only as needed. This makes purging / reloading unnecessary. A must for all lexfile users, especially those with more memory than the bare HP-71B.
ENDUPLEX SIZE: 286 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- ENDUP is similar to the built-in STARTUP statement puts a string of BASIC commands into a special buffer that gets executed automatically at power-up, but the string specified by ENDUP gets executed at power-down. This is true whether power-down is due to pressing the OFF key, execution of OFF or BYE from the keyboard, or even if the HP-71 “times out” and automatically goes to sleep after ten minutes of inactivity. (Inactive in CALC mode, but active in FORTH mode).
- ENDUP$ returns the contents of that buffer, and STARTUP$ returns the contents of the STARTUP buffer.
EXTFILES “External Files Poll Handler”. SIZE: 502 bytes.
BIN | HEX | Source | DOC | ALL 4 (ZIP)This lexfile does not add any keywords to BASIC, but extends the number of file types that the HP-71 recognizes. The HP-71 normally recognizes only BASIC, KEY, TEXT, SDATA, DATA, LEX and BIN file types, and refuses to copy files into memory (or from disc to disc) if they are of any other type. The FORTH ROM allows a new file type, FORTH files, to be copied, and identifies these files by putting “FORTH” into their catalog string. The EXTFILES lexfile takes this idea a step further. It makes just about every file type known to the handheld community recognizable to the HP-71, and not only allows it to copy them, it identifies them in their catalog listing. No longer do we need to decipher file type code numbers.
FILELEX “File checker lexfile”. SIZE: 64 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- FILE? checks whether or not its argument is a filename that exists in the HP-71’s file chain, even if IRAM, ROM, etc. If it is, FILE? returns a 1; 0 if not. Most useful as in IF NOT FILE?(A$) THEN COPY A$&“:TAPE”.
FKEYLEX “First Key lexfile”. SIZE: 81 bytes.
BIN | HEX | Source | DOC | ALL 4 (ZIP)
- FKEY (similar to the built-in PUT statement) pushes the specified key onto the key buffer, but pushes it onto the other end of the stack, so that it is the first, not most recent, keystroke in the buffer. PUT uses the key buffer as the keyboard does: first in, first out. FKEY, on the other hand, uses it on a last in, first out basis.
FMTLEX “String Format lexfile”. SIZE: 597 bytes.
BIN | HEX | Source | DOC | ALL 4 (ZIP)
- When FMTLEX is in memory, a new BASIC keyword becomes available (IMAGE$), and two native keywords become enhanced (PRINT and USING). IMAGE$ lets you pre-tokenize formatting strings used by the USING command, which greatly speeds up programs. PRINT is given a new syntax: PRINT TO var$, which redirects the output from PRINT to the specified variable. Combined with IMAGE$ and USING, this PRINT TO var$ feature makes the creation of custom formatted numbers and strings extremely easy and super fast.
FORMALEX “Format lexfile”. These functions are the core of all word processing. SIZE: 454 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- CENTER$ centers any string in a longer string of spaces of specified length.
- CESURE tells where to break a string for printing purposes, to avoid lines beginning with spaces and punctuation.
- FORMAT$ “right justifies” text to any specified length by inserting spaces between words.
- REDUCE$ does the opposite; spaces at the ends and any “extra” spaces between words are removed.
- SPACE$ returns a string of spaces of any specified length.
HIGHLEX “High bit lexfile”. SIZE: 57 bytes.
BIN | HEX | Source | DOC | ALL 4 (ZIP)
- HIGH$ sets the high bit of every byte in its argument to a 1. This allows rapid replacement of a string with its video inverse (if you have a video interface) or custom character replacement (if you are using CHARSET).
INDATLEX “Date Input lexfile”. Designed for French-speaking Europeans. SIZE: 147 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- INDATE$ first displays DATE : “JJ/MM/AA” with the cursor flashing on the JJ. The user types two-digit day, month and year over the letters, and they are reversed and returned as a string with slashes inserted properly (no input returns “AA/MM/JJ”).
KBEEP “Keyboard Beep lexfile”. SIZE: 38 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)When in memory, every keystroke causes a audible “chirp”, like the "key click" feature in the HP49 and HP50 series. The chirp can be turned off by BEEP OFF or by purging KBEEP. Or set flag -25 to make it really loud and annoying!
KEYWAIT The most useful of all lexfiles for the general programmer. SIZE: 55 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- KEYWAIT$, like KEY$, returns the most recent key from the key buffer, but unlike KEY$ it pauses execution of the program if there is nothing in the key buffer, and resumes execution the moment a key is pressed. Better than a loop, it goes into “idle” while waiting, which conserves battery power. The HP-71 design team has said that this function was supposed to have been in the mainframe, and it is unfortunate that it was one of the ones they decided would have to be left out to keep the operating system down to 64K. KEYWAIT$ is therefore found in many lexfiles and ROMs, since it is so useful. This lexfile adds just KEYWAIT$.
LCDLEX “Liquid Crystal Display control lexfile”. SIZE: 672 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- BLD puts the display into “bold” mode (letters look “fatter” than normal).
- BLINK puts the display into “blink” mode (whole LCD blinks on/off every half second).
- CLR clears (turns off) the specified dot in the display.
- DOT returns the value (0 or 1) of the specified dot in the display, and optionally sets or clears it.
- INVERT inverts the entire display (all dots toggle their value).
- LCD allows friendly setting of the contrast: up and down arrows raise and lower the contrast.
- MIRROR puts the display in “mirror” mode (everything in upside down).
- NRMAL resets the display to its normal mode.
- SET sets (turns on) the specified dot on the display.
- SMALL puts the display into “small” mode (everything looks tiny).
- None of these keywords affect anything other than the LCD display itself.
LIFELEX “Game of Life lexfile”. SIZE: 457 bytes (LIFEVID = 382 bytes).
Lexfile: BIN | HEX | DOC
LIFEVID program: BIN | TXT
ALL 5 (ZIP)
- LIFE$ takes a string of spaces and asterisks, representing a matrix of dead and living cells respectively, and calculates the next generation by the rules of Conway’s mathematical game of Life. Parameters specify the row width, and optionally specify wrap-around logic, and characters to be used instead of the default asterisks and spaces. Comes with a BASIC program “LIFEVID” designed for use with a video interface; each full-screen generation takes only 1 second!
LINKLEX “Lexfile Linker”. SIZE: 260 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- LINK merges two or more lexfiles into one, maintaining the features of all of them but saving memory because there is only one file header in memory. Allows the creation of custom lexfile packages by linking all the desired keywords into a single lexfile. Even works on lexfiles that don’t add any keywords.
LOCKOFF Disables the LOCK feature. SIZE: 33 bytes.
BIN | HEX | Source | DOC | ALL 4 (ZIP)Does not add any keywords to BASIC. Effectively puts the HP-71 into LOCK OFF mode; the LOCK command has no effect as long as LOCKOFF is in memory. To be precise, LOCKOFF clears the LOCK password at power-up before the “password?” routine, thus making it impossible to LOCK the machine. Can be used to unLOCK another HP-71 with unknown password even if LOCKOFF isn’t in memory (method available upon request). A must for those whose HP-71 can fall into the evil clutches of bozos who like to LOCK “IBM 360” or other “practical joke” passwords that no self-respecting HP-71 owner would ever guess, resulting in INIT 3 and total Memory Lost.
MARGELEX “Margin lexfile”. SIZE: 92 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- MARGIN sets the right “margin” on the HP-71. When typing and the specified position in the display is reached, a chirp is sounded, like the margin bell on a typewriter. This is like the HP-75’s margin feature, sorely missed on the HP-71... until now! Makes text editing a snap. Editing programs that should be listed on an 80-column printer without wrapping around is easy too.
MENULEX SIZE: 308 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- MENU allows easy menu-driven programming. MENU displays the first DATA statement’s data in the display, and pressing the up and down arrow keys steps through successive DATA data until the user presses ENDLINE which returns the number of the displayed data. RESTORE can be used to specify the starting DATA, and MENU specifies how many data to use in the menu and optionally specifies which of the menu entries should be displayed first.
NOISE SIZE: 299 bytes.
Lexfile: BIN | HEX | DOC
MUSIC program (716 bytes): BIN | TXT
TUNEUP program (259 bytes): BIN | TXT
MARYLAMB data file (512 bytes; string = 62 bytes): BIN
PHASER data file (512 bytes; string = 360 bytes): BIN
WTELL data file (2048 bytes; string = 1820 bytes): BIN
INV8A data file (1218 bytes; string = 606 bytes): BIN
INV8B data file (1238 bytes; string = 616 bytes): BIN
ALL 12 (ZIP)
- NOISE is similar to the NOISE statement that HP put into the HP-75 I/O ROM and then didn’t mention in the owner’s manual. Given a string containing encoded frequencies and durations, NOISE plays it as music (or noise). Does not use the operating system’s BEEP subroutines, but drives the beeper directly, resulting in a much wider frequency range than the BEEP function has. Timing is also much more precise. Comes with a BASIC program called MUSIC that allows you to write music on the keyboard, listen to it, save it in a file, and play back files thus saved. Three sample music files are available: MARYLAMB (Mary Had a Little Lamb), PHASER (spine-tingling red-alert type of sound), and WTELL (about two minutes of the William Tell Overture). Also available: INV8A & INV8B, both hands of a Bach two-part invention, to be played on two HP-71's at the same time, after running TUNEUP on both first to synchronize their speeds.
ONKEYLEX “ON Curser Keys lexfile”. SIZE: 195 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- CURSDOWN is like KEYDOWN but takes no argument, and responds only to the four arrow keys, returning 1 through 4 respectively if one of them is currently being pressed down.
- CURSKEYS is like KEY$, but responds only to the four arrow keys and the “g”-shifted up-arrow and down-arrow, returning 1 through 6 respectively if any of them is in the key buffer. Best used with the ON statement, ONKEYLEX makes writing menus much simpler.
PATTERN SIZE: 171 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- PATTERN$ takes a normal DISP-type string and converts it to a GDISP-type string, so that DISP “HELLO” and GDISP PATTERN$(“HELLO”) have the same result on the LCD, but the latter is much faster if the string is pre-compiled with PATTERN$. Even works with custom CHARSET characters.
PEEKUTIL “Peek Utilities lexfile”. SIZE: 351.
BIN | HEX | Source | DOC | ALL 4 (ZIP)
- REV$ reverses the byte order of a string (see REVLEX below).
- RPEEK$ is like REV$(PEEK$).
- PEEK$ is an unrestricted version of the native PEEK$.
- PEEK is like HTD(PEEK$), and the second parameter can be omitted for a default of 1 nibble.
- ADPEEK$ (“address peek”) is used when the nibble(s) being peeked contain a memory offset; ADPEEK$ adds the offset (considered a signed value) to the address being peeked.
- ADPEEK is like HTD(ADPEEK$).
- TEXT$ is like HTA$(PEEK$) (see DESAL above).
- All of these can take string or numeric address arguments, and work on PRIVATE files in RAM or ROM.
PLOTLEX “Plotter utilities lexfile”. SIZE: 855 bytes.
BIN | HEX | Source | DOC | ALL 4 (ZIP)Adds COLOR, CSIZE, DRAW, HOME, LABEL, LDIR, LTYPE, MOVE, PLOTTER IS, RDRAW, RESET PLOTTER, RMOVE, and SETORG to BASIC. Assumes an HP-IL plotter device (plotter, or video interface that recognizes HPGL). Makes reading BASIC programs easier.
POKELEX Improved PEEK$ and POKE. SIZE: 257 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)Improves the built-in PEEK$ and POKE to work anywhere, even on SECURE and PRIVATE sections of memory.
PRIMLEX “Prime Factor lexfile”. SIZE: 148 bytes.
BIN | HEX | Source | DOC | ALL 4 (ZIP)
- PRIM(X) returns the lowest prime factor of X. Allows rapid factorization of composite numbers.
PRINTLEX “Printer function lexfile”. SIZE: 565 bytes.
BIN | HEX | Source | DOC | ALL 4 (ZIP)
- BELL sends the ASCII “BEL” control character, CHR$(7), to the current printer, to ring its bell (if it has one).
- BOLD ON / OFF controls the printer’s bold mode.
- CR sends a carriage return, CHR$(13).
- ESC$ sends the escape character, CHR$(27).
- FF sends a form feed, CHR$(12).
- LF sends a line feed, CHR$(10).
- MODE 0 sends ESC$&“&kOS” to set normal pitch; MODE 1 and so on set other pitches or printer features.
- PERF ON / OFF controls perforation skip mode.
- PL 66, 56 sets the page length to 66 lines, with 56 lines of text per page.
- UNDERLINE ON / OFF controls the printer’s underline mode.
- WRAP ON / OFF controls wrap-around mode (unique to the ThinkJet).
REPEAT SIZE: 266 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- REPEAT modifies the keyboard repeat feature. Normally, when you press a key and hold it down, it begins to repeat after a little wait (half a second), repeating about 6 keys per second. This is too slow for us hyperactive people who want keys to repeat FAST and see the cursor control keys fly across the screen. REPEAT allows you to specify the length of the initial wait after pressing a key (from half a second to no wait at all), and automatically speeds up key repeating to about 13 keys per second (roughly twice as fast as normal). This is one of those lexfiles that you’ll always want to leave in memory.
REPLEX “REPLACE. String lexfile”. SIZE: 320 bytes.
BIN | HEX | Source | DOC | ALL 4 (ZIP)
- REPLACE$(A$,B$,C$) returns A$ with every B$ in it replaced by C$. An optional fourth parameter specifies a character which is to be considered a wildcard character in B$. Although useful in itself, it is very powerful when combined with the TEXTUTIL functions (see below).
REVLEX “Reverse String lexfile”. SIZE: 33 bytes.
BIN | HEX | Source | DOC | ALL 4 (ZIP)
- REV$ reverses its string argument’s byte order. REV$(“Hello!”) gives !olleH. Useful for heavy things like memory management, or silly things like display graphics. A subset of STRINGLX.
RGCMDS “Row Graphics Commands”. Originally used with the ThinkJet Space Shuttle demo. SIZE: 207 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- CPRSRG$ (“Compress Row Graphics String”) compresses strings of row-graphic data by replacing strings of zeros with a single zero and a count.
- EXPDRG$ (“Expand Row Graphics String”) expands a string compressed with CPRSRG$.
ROMAN8LX “Roman 8 lexfile”. SIZE: 850 bytes (note: after CHARSET ROMAN8$, LEN(CHARSET$) = 768 bytes).
BIN | HEX | DOC | ALL 3 (ZIP)
- CHARSET ROMAN8$ remaps the display to look like the International, or Roman 8 Extension character set. For example, CHR$(191) will no longer look like a “?“ but like a “t”, which is how the ThinkJet prints it. If only a few of the Roman 8 characters are desired, you can CHARSET or GDISP any substring of ROMAN8$.
ROWCOL “Row/Column swapper”. SIZE: 119 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- ROWCOL$ converts a string of 8 bytes into an 8x8 matrix of bits, transposes it (converting the rows to columns and vice versa), and converts it back into a string of 8 bytes. If the argument is less than 8 bytes, it is padded with nulls before transposing. Great for graphics work.
RPTLEX “Repeat String lexfile”. SIZE: 143 bytes.
BIN | HEX | Source | DOC | ALL 4 (ZIP)
- RPT$ repeats any string any number of times. Saves memory when programming and makes output simpler.
SHOWPORT Improved SHOW PORT. Size: 151 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)Improves the built-in SHOW PORT statement. The built-in SHOW PORT shows only IRAM and ROMs. This improved version shows everything, whether configured as part of main memory or not. Allows seeing exactly what the owner has installed inside the HP-71! And rapid verification of what’s in that module you paid so much for.
SPLEX “Special BASIC file utilities”. SIZE: 1250 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- LIST$ returns any program line of any BASIC program in memory, in the form of a string that is identical to the way the program line would be LISTed. This allows a program to examine the contents of another BASIC program, or even itself, without needing to TRANSFORM it into text.
- MODIFY takes a string (a valid line of program BASIC) and merges it into the specified program. This allows a BASIC program to modify any other BASIC program, or even itself, without POKE.
- Together, LIST$ and MODIFY allow such things as a telephone directory program with all its data in DATA statements that are updated by the program itself.
STKLEX SIZE: 107 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- STACK 15 sets the command stack to be 15 high; any number 1 to 16 can be used.
STRINGLX “String Utilities lexfile”. This package of string functions was originally intended to be part of the built-in BASIC, but was left out due to memory constraints. SIZE: 837 bytes.
BIN | HEX | Source | DOC | ALL 4 (ZIP)
- TRIM$ trims spaces (or any other specified character) off the ends of a string, whereas
- LTRIM$ trims only the left end, and
- RTRIM$ trims only the right end.
- LWC$ and its alias
- LWRC$ both convert a string to lowercase.
- MEMBER searches a string for any one of a given set of characters.
- SPAN searches a string for the first character which is not a member of a given set of characters.
- REV$ reverses the byte order of a string (see REVLEX above).
- ROT$ rotates the bytes in a string any number of times in either direction.
- RPT$ repeats a string (see RPTLEX above).
- SBIT and
- SBIT$ let you test, toggle, set or clear any bit or byte in a string.
SYRACUSE SIZE: 74 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- MSA (“Modified Syracuse Algorithm”) is like the ULAM function (see below), but counts how many steps it takes to fall below the starting number, and counts (3x+1)/2 as one step. This value is useful in rapid elimination of counterexamples to Ulam’s Conjecture.
SYSLEX “System Utilities lexfile”. SIZE: 643 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- ATTN OFF/ON - disables ATTN from exiting a running program.
- ATTNOFF? - returns 1 after ATTN OFF, 0 after ATTN ON.
- CLKSPD? - returns the current CPU clock speed.
- STACK - sets command stack height (1 to 16).
- CMDSTK? - returns the current command stack height.
- ZAPSTK - clears the command stack.
- CONTRST? - returns the current CONTRAST setting.
- DELAY? - returns the first argument of current DELAY setting.
- LOOPOFF? - returns 1 after OFF IO, 0 after RESTORE IO.
- WIDTH? - returns current WIDTH.
- PWIDTH? - returns current PWIDTH setting.
- SCROLL? - returns the second argument of the current DELAY setting.
- WSTART? - returns position of current start of window.
- WEND? - returns position of current end of window.
- WSIZE? - returns current window size.
TEXTUTIL “Text editor Utilities”. The core of a text editor program. SIZE: 1512 bytes.
BIN | HEX | DOC | ALL 3 (ZIP)
- DELETE deletes the specified record from a text file, and shrinks the text file size.
- FILESZR returns the number of records in the specified text file.
- INSERT inserts a string into a text file at the specified record number, and expands the text file size.
- REPLACE is a combination of DELETE and INSERT: it replaces the specified record with a string.
- SEARCH is a super-fast, super-powerful function that searches a text file for any specified substring, with several optional wildcard specifiers.
- LIST and PLIST are improved to be able to work on TEXT files.
ULAMLEX “Ulam’s Conjecture lexfile”. SIZE: 87 bytes.
BIN | HEX | Source | DOC | ALL 4 (ZIP)
- ULAM(x) calculates how many steps it takes for x to get to 1 by repeated application of the Syracuse algorithm. ULAM(27)=111 because if you start at 27 it takes 111 steps to get to 1. This iterative function is useless in itself, but there's £1000 awaiting the one who can prove that any number will eventually reach 1.
UNPRIVLX “UnPrivate lexfile”. SIZE: 105 bytes.
BIN | HEX | Source | DOC | ALL 4 (ZIP)
- UNPRIV is identical in all respects to the built-in PRIVATE statement, but has the opposite effect. What required several lines of BASIC or a few statements in FORTH is now possible in a single BASIC command.