[comp.sys.handhelds] Nice little starter program for flags

izar@SHUM.HUJI.AC.IL (Izar Tarandach) (11/09/90)

Hi, fellows.
First of all, thanks to all those that so promptly answered my questions
about graphing equations.I really apreciated it.

And now, with the hope that it can be usefull to *anybody* as it was for
me, and in order to prove myself I learned something, I'd like to share
my little program with all of you.Last night my room mate complained about
the noises that my HP did at late hours, when I was discussing with it ;) ,
so I had to turn off the sound.But I wanted to know how was the flag, and be
able to invert it, without interrogating and so on.

So, I did this small program, and it's proving very usefull ('till now,hours
after).So, I'd like to have answers from you experts, because I know there
must be a smaller and nicer way to do it:

<<IF 51 FS?
 THEN 51 CF S1
 ELSE 51 SF S2
  END
 MNU ORDER
>>

This program should be called 'SND.' or 'SND*', depending on the actual state
of your HP: 'SND.' if sound is OFF, 'SND*' if it is ON.

'S1':
<< 'SND.' 'SND*' OVER RCL ROT PURGE SWAP STO >>

'S2':
<< 'SND*' 'SND.' OVER RCL ROT PURGE SWAP STO >>

'MNU':
{ 'OFF' 'CLOCK' 'FAST' 'DN' 'UP' }
In this list you put the order of the USER menu as you want it,just make sure
that if you want my utility to be in the first menu, leave one space for it.
Corrections, suggestions, constructive critics ARE MORE THAN WELCOME!
Hope it's good enough to keep up with the standard of the postings.
(BTW, why are the postings on HP28S disappearing ? 48 Fever ?)


--
+--------------------Izar Tarandach  izar@shum.huji.ac.il---------------------+
 I used to live in the sunniest place on Earth.Now I live in the brightest.
    Where every human being is a soldier, and every soldier a human being.
+-disclaimer:All opinions are MY responsability - HUJI/Jerusalem, Israel------+

edchen@uokmax.ecn.uoknor.edu (Edwin Chen) (11/14/90)

To turn your beep on/off effectively try the following:

<< RCLF #4000000000000h XOR STOF 1200 .1 BEEP >>

This program was previously posted in this group.


-----------------------------------------------------------------------------
   edchen@uokmax.ecn.uoknor.edu
    (Eng. Physics > fun)
-----------------------------------------------------------------------------