26.06.99
Library 501: EXT v2.08
by Yoann DESIR
e-mail: YoannDESIR@yahoo.com
URL : http://www.multimania.com/ydesir/hp48gx/english.html
This library contains some programs from some differents authors, including Jean-Michel FERRARD.
Thanks to them.
->EXT: Converts a list of binary adresses into an executable System RPL program. Binary objects to include in the future program and non-modified objects should be tagged with an empty tag. The sub-programs must be included as lists of binaries ( not tagged of course ).
EXT->: Reciprocal operation.
->ADR: Gives the adress of the level 1 object.
ADR->: Puts at level 1 the object which adress is present on stack level 1 under the form of a binary.
->Str: Converts the level 1 object into a string composed of the quartets of that object.
Str->: Reciprocal operation.
RPL: Removes the "<<" et ">>" of a User-Rpl program ( which frees 5 bytes ).
RPL->: Adds the "<<" et ">>" of a program previously processed by "RPL". Allows to edit the program.
<-->: "Breaks" any composed-object. The number of elements is left on stack level 1 under the form of a real number.
-><-: Creates a program from its n components at level 2 to n+1, and from the real number n at stack level 1.
L->H: Adds #14378h adresses after all necessary adresses in a list of adresses obtained after
processing by EXT->.
The adresses of pift, pifte, ?:skip,... are considered and are not to be followed by
#14378h.
Allows after recompiling the program with ->EXT to execute a System RPL program
in HALT mode : execute the recompiled program containing the #14378h adresses
with the "DBG" command and press [CONT] after each External executed.
H->L: Reciprocal of L->H. Allows to get the original list back, without any #14378h adress.
REPLS: Home-made program of string replacement. Needs a string at stack level 3 in which
replacements are made, a pattern string at level 2, and a string at level 1
used to replace all events of string level 2 inside string level 3.
Inside string level 2, the ASCII character n°127 means "any character".
The number of replacements is given back at level 1 and the possibly modified
string is left at level 2.
Only disadvantage: using REPLS often needs more memory than it should;
I'm trying to fix that.
REVS: The fastest and smallest version I found of that program, which gives back the reversed string from level 1.
PEEK: Classical, gives a string containing the n quartets of memory from the adress (a), where (a) and n are two binaries at respective levels 2 and 1.
POKE: Classical too, writes the quartets of string level 1 at the adress level 2 ( adress under the form of a binary ).
SEARC: Looks in the memory for n events of the string level 2, with n real integrer at level 1, from adresses a1 to a2, a1 and a2 being adresses present at respective levels 4 and 3 and under the form of binaries.
ROM1: Looks for a ROM event of the quartets of the string at level 1.
T
That's how I discovered the HP48G(X) equivalent of #C612h on HP48S(X): #6F261h,
which does get2(cp), and which is the same as SysRcl(b)...
REN: Renames the variable at level 2 into the variable at level 1. Needs that the variable from level 2 is known and available in the current directory, and that the variable level 1 is unknown. The variable renamed is left at the same place in the directory menu. The variable to rename may be hidden.
ORDER: Assembly langage version of the ordinary function of the HP48.
Major quality : it's speed ( nearly-instantaneous ).
Functions as well in HOME as in its sub-directories.
It is in particular possible with that program to move, in HOME, the hidden directory.
Notice that because this version of ORDER presents many advantages, it is impossible
to type in the ordinary ORDER function when the EXT 2.08 library is attached.
However, to use ORDER, you need as many available memory as the size of the current directory.
PG: universal "Purge" : wipes all user varaiables presented under global name form at
stack level 1 ( one variable or a list ).
Directories aren't protected. Pricnipal advantage : the entry point used, # 8C27h, is
pretty fast.
INVI: Hides the variable(s) given at stack level 1 ( if many variables, put them into a list ) by adding an "empty global name" variable in the current directory. This classical program is now functionnal in the HOME directory, where hiding variables is now possible. In fact, no other "empty golobal name" variable is then added, but the hidden directory is moved instead.
VISI: Makes visible the variable(s) of level 1 ( if many variables, put them into a list ) of the current directory by moving of even wiping an "empty global name" variable. In the same way, this operation is now possible in the HOME directory.
TVIS: Similar to VISI, but makes visible all variables of the current directory. Is also functinnal in HOME.
->XL: Converts the reals of levels 1 and 2 into an XLIB name.
Ex.: 2: 232 1: 15 => 1: XLIB 232 15
XL->: Reciprocal operation.
RCXL: Recalls the content of an XLIB. Takes as an entry the XLIB name which you want to get the content, or instead the two reals of the number of the library and of the number of the XLIB name.
Exemple: 1: XLIB 232 15 ==(RCXL)==> 1: External External ... or else: 2: 232 1: 15 ==(RCXL)==> 1: External External ...
REPLA: Replaces in the level 3 composed-object every events of the object(s)
( if several objects, included into a list ) from level 2 by the object(s)
( if several ones, included into a list ) from level 1.
The tagged objects ( i.e. :A: B ) of the composed-object from level 3 are recognized
as composed of the global name 'A' and the object B.
CPB: "Compresses" the typed-in binary from level 1, at the condition that this one
is only 5 digits long. This frees 5.5 bytes per binary.
Binaries provided by ->ADR and EXT-> are written in that "compressed" format.
The use of compressed binaries in the pattern will be necessary when executing REPLA
on a list generated by EXT->.
STCRC: Calculates the CRC of the quartets CONTAINED in the string from level 1.
Ex.: C2A20 F0000 11920 50000 at level 1 => <4AD7h>, which is the
Crc of the quartets <11920 50000>.
Let's try now to execute BYTES on the system-binary <5h>,
which quartets are just <11920 50000>...
ON-C: Launches a start up of the HP48. All current programs are interrupted.
D.OFF: Switches screen off. Execution of programs is about 13% faster.
To use preferably in a program.
D.ON: Switches on the screen. To use preferably in a program.
TIME: N.B. When library 501 is attached, you cannot type in the tandard function "TIME".
The XLIB 501 32, which replaces - when typing it - that function, takes an argument to execute
( typically, a program ) from level 1, with possibly the necessary elements at upper levels,
and gives at level 1 the tuime of execution of the eveluated object,
expressed in seconds.
ĪCST: (with an up arrow as first character)
Displays as temporary menu the parent directory CST menu.
Time: The same as TIME, but the execution time is expressed in clock ticks
( 1 clock tick is the equivalent of 1/8192 sec ).
hCST: Displays as temporary menu the HOME CST menu.
OutHP: Processes a Shutdown of the HP. Numerous advantages: silent,
on the contrary to the [ON] [SPC] sequence, and keeps in particular
LAST CMD, LASTARG, LAST STACK, the stack and PICT.
Can be compaired to the standard function OFF, but stops the clock and saves the batteries.
In addition to these standard entries of the library, learn ( possibly )
that it's possible in libraries to create XLIB names absent from the library menu,
but which may however be typed in the command line.
This originality was chosen for reasons of elegance in EXT v2.08,
where you'll find, in addition to the 38 visible XLIB names, two more XLIB names, hidden but
which may be typed in :
Menu501 , which creates in the current directory a variable called CST and sets thus the EXT v2.08 menu as the user menu.
AllVars , equivalent of the standard function VARS, but which shows the possibly hidden names and the empty global name included predent in the current directory.
Have a nice programming, and don't forget to send me lots of mails...