Message 1 in thread

From: Arnaud Amiel (aamiel@hotmail.com)
Subject: [48] What is flags -63 doing?
Newsgroups:
comp.sys.hp48

View this article only

Date: 2002-07-22 09:07:00 PST

As subject says, from the manual, it looks like it is related to the
ENTER key assignment but I can't figure it out.
Any help would be greatly appreciated

Arnaud

Post a follow-up to this message

Message 2 in thread

From: James M. Prange (jmprange@i-is.com)
Subject: Re: [48] What is flags -63 doing?
Newsgroups:
comp.sys.hp48

View this article only

Date: 2002-07-22 23:32:09 PST

Arnaud Amiel wrote:
> As subject says, from the manual, it looks like it is related to the
> ENTER key assignment but I can't figure it out.
> Any help would be greatly appreciated

It's for "vectored ENTER", or the flag browser calls it "custom ENTER",
which I suppose describes it just as well. Vectored ENTER modifies what
happens when ENTER is invoked, whether explicitly by pressing the ENTER
key, or implicitly by pressing some other "immediate-execute" key. For
vectored ENTER mode to be in effect, both flag -63 and flag -62 (user
keys) must be set. By the way, it works the same on the 49G.

With vectored ENTER in effect, when ENTER is invoked, the current path
is searched for the reserved variable \GaENTER (where "\Ga" is
lower-case Greek alpha). If \GaENTER is found, then the command line is
put on the stack as a character string, and then \GaENTER is executed,
and after \GaENTER is finished, whatever is assigned to the key that
started the ENTER is executed. Then the current path is searched for the
reserved variable \GbENTER (where "\Gb" is lower case Greek beta). If
\GbENTER is found, then a string representing the key that started the
ENTER is put on the stack, and then \GbENTER is executed.

Bill Wickes gives a simple example of vectored ENTER usage in his "HP 48
Insights" book. If you have a printer try this out. Store the following
as \GaENTER:

\<< PR1 OBJ\-> \>>

and this as \GbENTER:

\<< "[" SWAP + "]" + PR1 DROP PR1 \>>

with both flags -62 and -63 set, you'll have "trace mode" printing.

The command line will be printed, then a string (possibly empty) with
brackets around it for the key that started the ENTER will be printed,
and then the result (assuming that the operation returns one result)
will be printed.

Of course, you can get a bit fancier, using a program to store programs
in the reserved variables and setting the flags, and another program to
purge the reserved variables and clear flag -63 (and perhaps flag -62).
Or you could use just one program that prompts you whether you want to
set up or disable your vectored ENTER, or one that has a HALT in it, or
one that sets up and disables vectored ENTER every time it runs. You
could put the reserved variables in sub-directories instead of HOME so
that they won't be found from other parts of the directory tree.


-- 
Regards,
James

Post a follow-up to this message

Message 3 in thread

From: Wolfgang Rautenberg (raut@math.fu-berlin.de)
Subject: Re: [48] What is flags -63 doing?
Newsgroups:
comp.sys.hp48

View this article only

Date: 2002-07-23 06:44:50 PST

Arnaud Amiel wrote:
> As subject says, from the manual, it looks like it is related to the
> ENTER key assignment but I can't figure it out.
> Any help would be greatly appreciated

Salut Arnaud,
some additions to what has been said by James.
It is easier to work with betaENTER alone. Both 
variables together are infact seldom needed. Also
the OS makes occasionally use of these names. If
present in HOME and flags -62 and -63 are set, keep
simply xDROP in the betaENTER-file. That amounts to
same as if betaENTER were not present. betaENTER
should carry some additional instruction only while
running some application. This, of course, may also
be a run in a new context as in the example below.

A useful application of betaENTER is the creation of
a smart suspendor of the Edit mode which I have on
the SPACE key. The key generates a space if normally
pressed, but if longpressed in Edit mode, it writes
"EditHLT" in the header instead of simply "HLT". So 
I get always a hint that HLT refers to a suspended
editor session, to be continued by pressing CONT.
This is what has to be assigned to SPC in the presence
of Keyman for the 49. On the 48, Rompointer 4B0 8 (the
longhold-tester) may have another number:

:: TakeOver ROMPTR 4B0 8 :: CHR \20 DoKeyOb ;
  EditLExists?
  NOT?SEMI (or SPC may make still something else) 
 ' :: ' :: xDROP 88 2 "EditHLT" $>grob     
           XYGROBDISP SetDA1NoCh ; DUP' ID betaENTER
    SAFESTO CDRCOMP EVAL xHALT ; RunInNewContext_ 
 ' xDROP ' ID betaENTER SAFESTO   
;

The exciting command RunInNewContext_ is unsupported
but stable on the HP49 (PTR 0B954). Hence, it should
exist also in the MetaKernel :-)

- Wolfgang

Post a follow-up to this message


©2002 Google

Zur Beitragsübersicht