does WAIT command in userRPL do a busy wait?


First: hi to all, i'm new here. I have an account on the hp official forum but seems that this forum is more technical (maybe i'm wrong) and moreover it allows questions about userRpl and the hp49g+/50g series. I tried to search an answer to the following question but i found nothing, sorry.

The question: i have an hp 50g and i know that the userRpl is not so energy efficient (unfortunately) due to emulation. Now if i use the command:

0 wait 

The calculator just wait for a keypress and go even in standby mode.I guess that this behaviour doesn't need a lot of energy or computations.
While if i use

5 wait 
The calculator seems to be busy. Can you confirm that? Does "5 wait" do a busy wait, using the CPU?

Thanks in advance for the reply.

Edited: 14 May 2013, 7:35 a.m.



> 0 wait

Runs the WaitForKey Loop which is a Parameterized Outer Loop.

> 5 wait

Runs a Saturn ML-Loop waiting the given ticks calculated from the
given seconds.

So without looking further into the code of the two different loops
the first loop most likely uses less energy, as in a POL only a
low level loop is running that scans for a key press.




Thanks andreas! (and hi! We lose the contact years ago!)


> We lose the contact years ago!

Well, I wouldn't go that far ;-)

But there is next to nothing activty in Italy for the 50g.




Anyway, do you know others commands to achive a delay with no busy wait with user/syRpl?


> with no busy wait with user/syRpl?

What do you mean with busy wait?

If you mean the busy annunciator you can simply turn it off with SYS-RPL or Saturn-ML.




No, i meant:

In other words, a delay cycle that doesn't use a lot the CPU but simply wait X milliseconds/seconds.


Thats what the POL is designed for.

So you probaly have to write your own POL with the wanted


You can also use the words that are used to construct a POL

according to your needs.




I'll try :)


Anyway, do you know other commands to achieve a delay with no busy wait with user/syRpl?


A few years ago, we get a new software to drive the mass spectrometer and treat mass spectra. I was not confident in this new piece of cake. So, I have used my HP-28S quite often to check mass attribution, spectra de-convolutions and statistics I obtained from this new (fully integrated and sophisticated) software.

Unfortunately, my poor Advance Calculator was a bit slow (I have not spend a lot of time in optimization or using adapted algorithm – I had prefered ‘brute force’ computations or systematic/algorithmic seeks – my priority was to be sure I don’t miss anything obvious).

The computations on my HP-28S was split in three logic blocks; input of survey data, deconvolution and factor analysis, list of main facts/mass peaks and individual mass-peak ions attribution with filters for coherent attribution with chemical formula coherence, mono- or poly- isotopic patterns, natural relative abundance of elements, etc…

Each block of computation was carried on a separate bunch of dedicated userRPL commands. Each long run command was ended with a BEEP and activate a custom MENU which give me the opportunity to continue to the next(s) step(s) of the process.

No WAIT or INKEY or INPUT was used. There were no ‘busy waiting’. The calculator simply turns off after a few minutes unattended.
This appended often, I was busy, my attention was mainly on driving the spectrometers and survey analysis was mainly performed as a background task. And the verification by the HP28S, when needed was the background of the background! (But, still an important task, especially because the new software has bugs and the user often miss to correctly activated the numerous and obscure options on it!


The other commands to achieve a delay with no busy wait until the user response I know is to split each part of the computation into a dedicated RPL command.
Eventually using the custom MENU facility to prepare the interface for the next(s) step(s) and, in case of long run, attract attention of the user by a short BEEP.
If no response arises in the moment, the calculator will simply turn off.

The late user will have to turn it back on. Fortunately RPL calculators keeps stack, menu, etc through ON/OFF power cycles.

Results and soft menus will then clearly indicate at which step of the total process the calculator has stop. Continuation or adjustments may be easily available, by specific soft-menu key assignation.


The other commands to achieve a delay with no busy wait until the user response

But what i want to achive is: wait without the user response.

A little explanation of my program in ultra pseudocode

number = 0
number +=5
show the number
wait for 5 seconds
until the number is higher than 1000

but the WAIT coomand, as Andreas stated, seems to do a busy wait (1). I thought that there is a way to achieve a sort of "sleep" without computations and user interaction. Even the Parameterized outer loop (following the 2nd sysrpl guide of Kalinowski, Dominik ) needs an event by pressing a key to work.

(1): Andreas i tried the "dowait" command in a small sysrpl program but it seems to achive the same effect of xWAIT (i mean the userRPL command mapped in SysRPL), can you confirm?

Edited: 15 May 2013, 8:12 a.m.

Possibly Related Threads...
Thread Author Replies Views Last Post
  [HP-Prime CAS] "Warning, ^ (Command) Is ambiguous on non square matrices"?? CompSystems 1 1,657 12-07-2013, 07:15 PM
Last Post: CompSystems
  HP Prime - most favorite command bluesun08 2 1,224 11-12-2013, 11:29 AM
Last Post: bluesun08
  hp prime - command syntax bluesun08 6 1,928 11-10-2013, 11:57 AM
Last Post: bluesun08
  HP PRIME: command to read the SERIAL ? Joseph Ec 9 4,918 11-01-2013, 12:43 AM
Last Post: Joe Horn
  Connectivty Kit for HP Prime needs an "Import Program" Command Eddie W. Shore 3 1,562 10-23-2013, 03:37 PM
Last Post: Eddie W. Shore
  HP Prime MOUSE command SanS 3 1,372 10-15-2013, 12:15 PM
Last Post: Han
  [HP-Prime] randPoly command CompSystems 0 843 09-26-2013, 08:49 AM
Last Post: CompSystems
  [HP-Prime xCAS] BUG: string command =( CompSystems 6 1,736 09-10-2013, 06:38 PM
Last Post: CompSystems
  [HP_Prime] definition of functions, APPLY command and BUGs CompSystems 1 1,083 09-05-2013, 03:59 PM
Last Post: CompSystems
  [HP-Prime] Request: New command for CAS (EvalStep) CompSystems 4 1,380 09-04-2013, 09:33 AM
Last Post: Eddie W. Shore

Forum Jump: