[comp.sys.handhelds] ALICE

Simone.Rapisarda@p1004.f602.n332.z2.fidonet.org (Simone Rapisarda) (05/22/91)

Is there anyone who can please tell me the addresses
of the routines that accomplishes the following functions:

- update the status and the stack areas on the display.

- swich on and off the screen.

- build a self modifying menu-label (like the MODES menu).

Thank you !

Now my contribute to the list.

\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

Reading the manuals and using the 48 i realized
that it misses an important feature:
There isn't a built-in way to let the 48 execute
automatically a configuration program entering
in a dir and another configuration program exiting
the same dir.

Let's see a simple example:

STOUT
\<< DEPTH \->LIST 'STACK' STO \>>

STIN
\<< { # 0h # 0h } STOF STACK LIST\-> DROP 'STACK'
    PURGE 1 MENU \>>

The automatic execution of STOUT on exiting a dir
and of STIN on entering a dir could really transforms
that directory in a 'workbech'.
The one above is only an example, infacts the
possibilities of a similar feature can bring to VERY
useful results.

As I said, to my knowledge the 48 doesn't have a
similar feature.

Am I wrong ???

If no I hope it will be on the next HP handheld !

In the meantime I (I hope you too) will use the program
that i wrote to accomplish this. It is at the end of this
message in ASC format (use ASC\-> to translate it).

It is written in user RPL - sorry but i'm not too good
in programming in internal RPL: I hope a kind person
that finds it useful (maybe at HP Corvallis) will
translate it ! -

-------------------

ALICE
-----

All is enclosed in a configuration program called ALICE
(it's important you don't change his, pardon, her name).
These are the things she does:

- takes you up to the HOME dir.

- stores two programs called UPDIR. and HOME. at the end
  of the HOME dir and assigns them to the keys 31.2 and
  31.3 (so they will substitute the two 48 commands).

- sets the flags -62 (user keyboard active), -63 (vectored
  [ENTER] active).

- stores the program \->WB in the HOME dir and deletes
  himself.

Now you have to put on the first level of the stack the
path of the dir you have choosed and execute \->WB (you
can repeat this operation with every directory you want).

As last thing you have to enter in this dir to write and
store its own configuration programs with the names STIN
and STOUT.

That's all folks!

...ehm, one moment, there are three and half little
rules to observe:

WARNING:

- DON'T enter in a dir-WB if the flag -63 is clear
  and the flag -62 is set.

- On EVERY subdir of a dir-WB you MUST run \->WB even if
  you don't want to use it as a dir-WB (infact a dir becames
  a dir-WB only when you store in it STIN and STOUT).

- The following global variable are used by or contents the
  programs so be careful when you use them for other pourposes.

   \->WB
   \GbENTER
   STIN
   STOUT 
   ENTER

if you have some questions or want more information I will be
happy to answer.

For the guys who collect goodies for the EduCalc disks:

If you think ALICE is good enought, you can take it but please
in this case let me know (if you can).

If somebody know a better way to accomplish this, please let
me know!

Here is the beast.

@----------8<----------  C U T   H E R E  ---------8<------------
@
@                           A L I C E
@
%%HP: T(3)A(D)F(.);
"D9D20E16324563284E205014C494345497632EFE02041A1491A147A20D9D20E1
632491A14563284E205054E4455425976323CE224BAC1AFE22D9D204B2A24563
284E205054E44554259763278BF104B024563284E2060FD54E445542597632DC
C02DCC0284E20503545F45545B21305DF22041A1491A14563284E2040354594E
4976323CE224BAC1AFE2284E2040354594E45DF2293632B213084E205084F4D4
54E2D9D20E1632491A14563284E205054E4455425976323CE224BAC1AFE22D9D
204B2A24563284E205054E44554259763278BF104B024563284E2060FD54E445
542597632DCC02DCC0284E20503545F45545B21305DF22B51A1491A14563284E
2040354594E4976323CE224BAC1AFE2284E2040354594E45DF2293632B213084
E20605505449425E2B2130A59C18DBF1DCC02DCC029DF024563284E206055054
49425E2976323392010000000000021304F4224563284E205084F4D454E29763
23392010000000000031304F422339201000000000000269472C133920100000
0000000369472C147A20D9D20E1632EB3A1491A147A20D9D20E16328DBF1521A
11C432D6E201007E1632B51A1491A14563284E20503545F45545976323CE224B
AC1AFE2284E20503545F455455DF22D6E201007EF532EB3A1491A14563284E20
40354594E4976323CE224BAC1AFE2284E2040354594E45DF224563284E2060FD
54E44554259763278BF104B024563284E205054E445542597632DCC02EFE0293
632B213084E2060FD54E4455425B2130A59C18DBF1DCC024B2A284E205054E44
55425DCC02FD3329DF02F17328DBF15DF22041A193632B213084E2030D87524B
2130A59C18DBF1DCC0293632B21306763"
@----------8<----------  C U T   H E R E  ---------8<------------


bye
            Simone Rapisarda

      FIDONET: 2:332/602.0@fidonet.org
      SIGNET: 27:1339/200.0@signet.org
  UUCP: ...!rutgers!modus!otello!gear!wolf






--  
 WolfNet BBS Pisa (Italy) Tel. +39-50-589050 300-14.4K Baud Matrix 2:332/602.0
 Simone Rapisarda - via FidoNet node 2:332/602
 UUCP: ...!gear!wolf!602.1004!Simone.Rapisarda
 ARPA: Simone.Rapisarda@p1004.f602.n332.z2.fidonet.org

grue@cs.uq.oz.au (Frobozz) (05/24/91)

In <10584.2839AE98@wolf.sublink.org> Simone.Rapisarda@p1004.f602.n332.z2.fidonet.org (Simone Rapisarda) writes:



>Reading the manuals and using the 48 i realized
>that it misses an important feature:
>There isn't a built-in way to let the 48 execute
>automatically a configuration program entering
>in a dir and another configuration program exiting
>the same dir.

>Let's see a simple example:

>STOUT
>\<< DEPTH \->LIST 'STACK' STO \>>

>STIN
>\<< { # 0h # 0h } STOF STACK LIST\-> DROP 'STACK'
>    PURGE 1 MENU \>>

>The automatic execution of STOUT on exiting a dir
>and of STIN on entering a dir could really transforms
>that directory in a 'workbech'.
>The one above is only an example, infacts the
>possibilities of a similar feature can bring to VERY
>useful results.

Using the vectored enter capabiities of the HP should allow you to do
something pretty close to what you want.  I can think of two different
method of doing it:
1) detect when the current directory changes and perform your magic when
it does change (you'd have to remember the old directory for this to really
be much use).

2) Keep some kind of global around to indicate that this is the first entry
to this directory and purge it on exit.

The \Gbenter facility should be able to detect a change in current directory
and it will detect it right after the command that changed the directory was
executed (have I stuffed up my tense here?).


I should also point out that I haven't tried this and it may not be possible
(I don't have my 48 on me at the moment )-:




        						Pauli
seeya

Paul Dale               | Internet/CSnet:            grue@cs.uq.oz.au
Dept of Computer Science| Bitnet:       grue%cs.uq.oz.au@uunet.uu.net
Uni of Qld              | JANET:           grue%cs.uq.oz.au@uk.ac.ukc
Australia, 4072         | EAN:                          grue@cs.uq.oz
                        | UUCP:           uunet!munnari!cs.uq.oz!grue
f4e6g4Qh4++             | JUNET:                     grue@cs.uq.oz.au
--

akcs.joehorn@hpcvbbs.UUCP (Joseph K. Horn) (05/30/91)

Simone Rapisarda writes:

--------

> Reading the manuals and using the 48 i realized that it misses an
> important feature: There isn't a built-in way to let the 48 execute
> automatically a configuration program entering in a dir and another
> configuration program exiting the same dir.  

> Am I wrong ???

> In the meantime I (I hope you too) will use the program that i wrote
> to accomplish this called ALICE...

> For the guys who collect goodies for the EduCalc disks:

> If you think ALICE is good enought, you can take it but please in this
> case let me know (if you can).  

> If somebody know a better way to accomplish this, please let me know!  

--------

Hi, Simone.  I'm the guy who collects the goodies for the EduCALC disks,
and thanks for offering ALICE to this Public Domain software project.

However, it seems to me that the best way to do it is via the Custom
Menu (CST).  For example, I have a "TVM" key in page 1 of my HOME custom
menu which saves the stack and path and flags, sets FIX 2, changes to my
FIN directory, and fires up HP's TVM program.  Then there's a custom
menu in FIN with an EXIT key which instantly restores me back to where I
was.  No bizarre shells or Master Control Programs required.

--  Joseph K. Horn  --  Peripheral Vision, Ltd.  --

Simone.Rapisarda@wolf.sublink.org (Simone Rapisarda) (05/30/91)

Yes, I know about the possibilities of the vectored enter,
infact I used \GbENTER in ALICE and in ALICE 1.2 but I don't
like how it works, if you give a look at ALICE 1.2 you
will find that it uses also key assignement and some tricks
to accomplish this. I don't think it's a clean way, but in
user-RPL i thik it's the only way.

bye                                   Simone Rapisarda

--  
 WolfNet BBS Pisa (Italy) Tel. +39-50-589050 300-14.4K Baud Matrix 2:332/602.0
 Simone Rapisarda - via FidoNet node 2:33/800
 UUCP: ...!gear!wolf!Simone.Rapisarda
 ARPA: Simone.Rapisarda@wolf.sublink.org

Simone.Rapisarda@wolf.sublink.org (Simone Rapisarda) (06/04/91)

Joseph K. Horn writes:

> However, it seems to me that the best way to do it is via the Custom 
> Menu (CST).  For example, I have a "TVM" key in page 1 of my HOME custom 
> menu which saves the stack and path and flags, sets FIX 2, changes to my 
> FIN directory, and fires up HP's TVM program.  Then there's a custom 
> menu in FIN with an EXIT key which instantly restores me back to where I 
> was.

Thanks for your answer about ALICE (BTW: some days ago I posted a 
new improved version: faster and shorter).

Using custom menus is a very good idea but not exactly what I want. 
If you use a program like ALICE 1.2 you CAN move up and down the 
path using the normal keys (UPDIR, HOME and the dirs labels in the 
VAR menu). After you have configured each dir, you don't have to 
mind to select the CST menu and hit EXIT (BTW: in this way you 
'lose' one label in each custom menu).
If you forget it and hit UPDIR instead of EXIT the state of that 
dir (stack etc.) will not be saved and the configuration program 
of the new dir will not be executed, i think this isn't so kind!

ALICE is designed for general puorpose use: maybe that in some 
case it's better to use another metod like the CST one.

> No bizarre shells or Master Control Programs required.

Where are the bizarre shells ?

Please give a look at the doc of ALICE 1.2 and see how this new 
version works, I think/hope you will like it. Let me know!

I take this opportunity to tank you for your great PACK program.

bye
                                 Simone Rapisarda
--  
 WolfNet BBS Pisa (Italy) Tel. +39-50-589050 300-14.4K Baud Matrix 2:332/602.0
 Simone Rapisarda - via FidoNet node 2:33/800
 UUCP: ...!gear!wolf!Simone.Rapisarda
 ARPA: Simone.Rapisarda@wolf.sublink.org