[comp.sys.handhelds] On HYDE

cloos@acsu.buffalo.edu (James H. Cloos) (01/30/91)

I thought that some discussion on how the HYDE library replaces the default
messages would be worthwhile, if only for those who want messages in
another language.

Basically the xlib HYDE (XLIB 998 0) does the following:

#0		/* a short representing a lib number		*/
@7709h		/* Attatch Lib to HOME, takes: 1#		*/
#0		/* the same short				*/
XLIB 998d Nd	/* An ARRY of CHS (CHar String)			*/
@764Eh		/* Replace Msg Table, takes: 2#1Arry		*/

This is done for each of the ten default message tables.  NB: As library
number 2 is already attatched, that step is skiped for #2.

The xlib JECKLE (XLIB 998 1) does the following:

#0		/* a short representing the lib number		*/
@76AEh		/* Detatch from HOME, takes: 1#			*/

Again, for lib 2, a small change in procedure.  After detatching it, JECKLE
immediately reattatches it (using 7709h).

Below I'll show an example of doing this for the FIN library that comes on
the EQ card.  It is lib number 270d.  It's default message table is:
(The syntax is from my forthcoming RPL compiler, all numbers are assumed
hex unless trailed by a b, o, or d.)

ARRY CHS DIM 1 OF 7 "No Solution" "Many or No Solutions"
"I%YR/PYR \<= -100" "Invalid N" "Invalid PYR" "Invalid #Periods"
"Undefined TVM Variable"

If we were then to compile the following, it would change those messages to
the given ones:

:: # 270d ARRY CHS DIM 1 OF 7 "Dis Don't Work Out!" "Duh, I Can't Decide."
"One EXPENSIVE Account" "Gimme A *good* N" "Gimme a *good* PYR"
"*HOW* Many Periods???" "I'm Not *That* Smart:)" @764Eh ;

(This would show up on the stack as:
<270d> Array of String
)

Notice, that we assume the library is already attached to HOMEDIR, a more
robust version would check to see if it is attached, and re-attach it if
not.  (Remember that 270's config code attaches itself.)  To get back to
the normal message table, either do a system halt (I presume) or the
following:

:: # 270d @76AEh # 270d @7709 ;

which simple detatches the lib & then re-attaches it.

Hope some of this is useful to someone.  Oh, and Jake, please add 0764Eh to
the compiled address list with an appropriate name ;-).

-JimC

P.S.	No jokes on the replacement messages above!  22 characters isn't
	much to work with.  Kudo's to Bill (& Co.??) for those in HYDE.

P.P.S.	Production of rpl is delayed due to my intention to now use
	star for the MC assembly, and the need therefore to make certain
	support files work there, too.  You can quote me on this, though:
	"It will be out R.S.N!"	:) :) :)

--
James H. Cloos, Jr.		Phone:  +1 716 673-1250
cloos@ACSU.Buffalo.EDU		Snail:  PersonalZipCode:  14048-0772, USA
cloos@ub.UUCP			Quote:  <>