Posts Tagged HP-48

Variable Declaration

Let’s continue our HP-48 programming course, this time I’m going talk about variable declaration. A variable is where data is stored temporally, therefore programs can process them. In USER-RPL language,  you can local, global or environment variables.

Local variables

Programs use this kind of variables in order to do internal operations. Let’s see an example:

HP48 -  local variables - en

Here, variables  ONE and TWO have the values 1 and 2 respectively. Later, inside the program they are used to perform an addition which answer is left on the calculator’s stack.

Global variables

If you define a global variable, it can be used in the current program and it can also be used by other programs that were invoked from the current one. I modified the latter example to use an external program which perform the addition, called PLUS:

HP48 -  global variables - en

The PLUS program invokes global variables and performs the addition, as is showed in here:

HP48 - global variables2 -en

This kind of declaration has no limit on variable’s scope, because it’s defined as global. But it has a downside effect: programs that use that type of declaration will be be bigger than those which not.

Environment variables

The environment variables are the ones you can use from the current working directory. For instance, values 1 and 2 can be stored in the current directory using ONE and TWO as named, and you can edit the PLUS program to use these variables:

HP48 - environment variables -en

Este tipo de declaración no tiene restricción en el ámbito de existencia de la variable, ya que es definida como global. Pero tiene como inconveniente que los programas que usan variables globales ocupan más espacio que los que no lo usan.


Running Windows apps on Linux

winehq_logo_glassIf you need to run a Windows application but you are using Linux, you don’t need to reboot your PC and expose it to virus on Windows, or to use a virtualization solution, because you could try to run your Windows application on Linux using Wine.

What’s Wine?

It’s a Windows system calls implementation, so programs that runs on Windows can work on Unix-like systems  (Linux, FreeBSD, Solaris, Mac OS X, among others).

Installing Wine

On Debian and spin-offs, as root you can type the following command to install Wine on your system:

aptitude install wine

How does it work?

As easy as clicking on the app you want to run or install. You can also right-click on your app and select “Open with Wine”. As an example I installed the classic HP48GX emulator (now it also emulates HP49G y HP50G) using Wine:


Abrir con Wine

Once you have selected “Open with Wine” an installing dialog window will pop up as it would occur on Windows:


After  installation, a launcher for the app would be created on the Applications menu, i.e.  Applications > Other > Emu48, as shown here:


Finally, the emulator I installed runs normally as if it were running on Windows. Let’s see how looks the app:


Unsintalling Windows applications

Although the applications comes with an uninstaller program, you better use Wine’s uninstaller because it uninstall the application and also delete the launcher it created on your desktop manager’s menu. In order to run the uninstaller go to Applications > System > Wine uninstaller, where you can select the application from the following window:


Will my X or Y application run?

If you want to know if a particular application will work with Wine you can check out the application compatibility list on the  project’s web page, or try to install it and test it :)



No Comments

HP48 programming


Some time ago I uploaded a programming course for the HP-48g / HP-48gx calculators. The thing is that I lost my password on that server (angelfire) I couldn’t update any more. So, it’ s time get back what’ s mine: I’m going to put the entire course here with more examples and better explanation if possible.

Let’s start over…

What is a program?

All between << >> character is taken as a program. For example, you can write this on the calculator:

<< 1 2 + >>

This program put on your HP’s stack 1 and 2 to add them. In order to edit any program in USER-RPL mode just put it on the stack and push “EDIT”. To save this program put it on the stack, then put a name and push “STO” button (you can also type it). Here’s the example:

3: << 1 2 + >>
2: ‘Nombre’
1: STO

It’s all for now. In the next post I will cover variable definition…