02.07.99
Library 502 : EXT48 v2.4
by Yoann DESIR
e-mail: YoannDESIR@yahoo.com
URL : http://www.multimania.com/ydesir/hp48gx/english.html
This library allows system-RPL programming using mnemonics.
The EXT48v2.4i version contains an entry called INFO EXT48, which gives all
informations you need to use EXT48. Howerver, the EXT48v2.4 version,
with the same functions but a little smaller, requires some explanations...
First of all, the required datas for EXT48 are available in the file "Vars2.05", which you have to execute after its transfer on the calculator. Since then, datas are written in two new variables of the hidden directory of HOME.
Notice that the "Crvar" entry allows you to create a file, which may replace "Vars2.05", with the mnemonics and adresses informations that you are using at the moment and which are stored in the hidden directory of HOME.
But let’s stop joking ...
EXT48 by Y.Désir
Version 2.4
System-RPL programmation
for HP48G(X)
->Prg: Takes a string containing words called « mnemonics » and creates a
program or a list with it.
Both programs and sub-programs are delimited using "begin" at the
beginning and "end" at the end; lists are delimited by "{" and "}".
Be careful, every program or list started must be ended by the
proper delimitor, else an error occurs.
The program or the list generated is left on the stack.
Without any "begin" or "{" at the beginning of the string, all mnemonics are
EVALUATED after conversion into system RPL commands.
In the main string, any command located after the first RPL structure or after the
first list are ignored.
In case of an error occurs while processing the compilation, the incorrect
mnemonic is highlighted and the source string is edited in the command line.
Before : |
After : |
![]() |
![]() |
Prg->: Reverses the operation processed by ->Prg. Lists and RPLs are accepted, but Prg-> also functions with a global name, which contents is converted into a string, or else with an XLIB name, which contents is processed the same way.
->mn: Converts the objet on stack level 1 into its associated mnemonic.
mn->: Reciprocal operation. Interest: get back the system command associated to the provided mnemonic without executing it.
TABLE OF CONVERSION OF OBJETS INTO MNEMONICS
Real | 0 | <1h> | 1.25E234 | "1.25E234" |
Complex | 1 | <2h> | (1.23548698,2E-245) | "(1.23548698,2E-245)" |
String | 2 | <3h> | "ABC" | C$ 5 "ABC" |
"A C" | C$ 7 &"A B"& | |||
Array | 3 or 4 | <4h> | [ 1 2 3 ] | "&[1 2 3]&" |
List | 5 | <5h> | { 1 A 1_kg } | "\47A20........" |
Global name | 6 | <6h> | 'A' | "vA" |
'A B' | "&vA B&" où "v" est ASCII 120 | |||
Local name | 7 | <7h> | 'A' | "£A" |
'A+B' | "&£A+B&" | |||
Program | 8 | <8h> | << DUP >> | "\D9D20........" |
Expression | 9 | <9h> | 'A*X^2+B*X+C' | "'A*X^2+B*X+C'" |
Binary | 10 | |
# 3223h | "#3223h" |
Graphic | 11 | |
Graphic 1 x 1 | "&GROB 1 1 00&" |
Tagged | 12 | |
:1: A | "\CFA20........" |
Unit | 13 | |
1_kg | "'1_kg'" |
XLIB name | 14 | |
XLIB 232 15 | "&XLIB 22 15&" |
HEAD | "HEAD" | |||
Directory | 15 | <2Fh> | DIR END | "\69A20........" |
Library | 15 | <8Fh> | Library 502: EXT48... | "\69A20........" |
Backup | 17 | <9Fh> | Backup A | "\26B20........" |
Function | 18 | <8h> | INV | "INV" |
Command | 19 | <8h> | DUP | "DUP" |
System-binary | 20 | <1Fh> | <1h> | "<1h>" |
Long real | 21 | <3Fh> | Long real | "¥1.23456789012345E49999" |
Long complex | 22 | <4Fh> | Long Complex | "¥(1.E-49999,0)" |
Linked Array | 23 | <5Fh> | Linked Array | "\A0A20........" |
Character | 24 | <6Fh> | Character | "K_A" |
Character | "K_\65" | |||
Library Data | 26 | |
Library Data | "\88B20........" |
AddM: Adds the mnemonic from level 2 defined by the ROM adress from level 1 given under the form of a binary b < # 80000h. The mnemonic must not be already known, but the same adress may be associated to several mnemonics...
RnMn: Renames a mnemonic from level 2 into a new mnemonic from stack level 1.
ClrM: Clears a mnemonic given at level 1.
IdxM: Looks for n, where n is a real put on stack level 1, mnemonics containing the string given at level 2. That string must have a size between 1 and 20.
GetM: Generates the list of the known mnemonics of size r, r real at level 1 with r < 21.
![]() |
![]() |
NbMn: Gives the number of known mnemonics.
KMn?: Specifies whether a mnemonic is known of not. If yes, gives back its adress on stack level 2.
Stat: Provides some informations about the known mnemonics : Number of entries in ROM, number of Primitive Code Objects, Number of System-RPL Programs...
Menu502: ( hidden but may be typed in ) Produces a temporary menu which carries the usual characters of EXT48 version 2.4.
LAinit: ( hidden but may be typed in ) This gives the content of
the 'LAmnémo' variable when no mnemonic is known. 'LAmnémo' contains the
characters of the known mnemonics. The other variable stored in the hidden
directory, 'inst', carries the ROM adresses of the entry points associated to
the mnemonics.
To create your own new mnemonics, start with LAinit for 'LAmnémo' and an empty
list for 'inst', and then define new mnemonics with 'AddM'.
The user-flag n°12 decides ( if cancelled ) if at every startup, parameters are set to enable automatic data entry into EXT48 syntax. Indeed, in USER mode, it is possible, if user-flag n°12 is not set, to type in objects and sequences of instructions from the command line after having launched the environment - in USER mode - with [alpha] and then [SPC]. After having typed your command or object(s), hit [ENTER], still in USER mode, and ->Prg is directly applied to the written command line...
It is important to remember that any character of ASCII code < 33 - so,
spaces and new line character included - separates two mnemonics. To include
mnemonics containing characters of ASCII code < 33, add "&" delimitors around
the mnemonic, as for instance in :
Strings, arrays, global and local names, XLIB names...
The unknown mnemonics encountered by ->Prg lead to an error; the unknown adresses detected by Prg-> are quoted like binaries, except the prefix, which is "$" : so, if "swap" is unknown, Prg-> can give back "$3223h".
To include unspecified binary datas, you have to add the prefix "\" before the hexadecimal sequence. To include the content of a global name into an object to compile with ->Prg, type its name after the character of ASCII code 164.
For any help or further information, contact me !