Notes on the Mumps Language
April 20, 2011

Experimental version of Mumps for Android 2.3 (gingerbread) built and uploaded. This version was built with an older copy of my interpreter. Many later standard Mumps features (such as blocks) are not enabled. It was done as a proof of principle to test the Android native development kit and whether Mumps-on-a-phone (or tablet) would work.

The old version of Mumps was entirely written in C and didn't make extensive use of complicated linkage or compilation options. The current open-source version of Mumps from my site at UNI requires C++.

The C compilation was successful and the module on this web site is the result. To run/install you need to get a terminal window application from an Android store. Copy the Mumps executable module to a directory on your tablet or phone where you have write privileges.

In my case, I first rooted my tablet (Viewsonic Gtab 2.2) and replaced the original ViewSonic stock 2.2 operating system with Cyanogenmod 7 system (gingerbread 2.3).

As root in the tablet's terminal window, I created a directory named mumps in /data/data. I connected by USB cable the tablet to my desktop and transfered the Mumps module to this directory and made the module world read/executable. You need to have write privs in this directory.

To start the Mumps interpreter, type ./mumps

You will see some introductory text and an error message complaining about not finding init.mps which is a default initialization file. You may ignore the message.

You are now in interactive mode. To exit, type halt. Otherwise, you may enter Mumps commands at this point. If you make global array entries, they will be stored in two files in the directory you are currently in named key.dat and data.dat as is the case with the current C++ version.

You can write a Mumps programs. Android has both vi and nano but you will need to do some key re-assignment as control keys and escape are not the same meaning. Alternatively, you can import Mumps programs.

The Mumps interpreter syntax requires a tab character to preceed the first command on each line either as the first character on the line or the character immediately after a label. Do not use blank characters.

To run, type:

./mumps filename.mps

Overall, on my ViewSonic 2.2, the performance was outstanding. Much faster that I would have expected, on a par with a laptop!

Here are some links to screen images. As of yet, I have not found a way to do a proper screen-capture so these were done with an ordinary camera, sorry.

AndroidMumps images: 1 2 3 4 5

As to porting the full version, this may take some time. For reasons that are incomprehensible, Google does not have ostream available in the NDK (native development kit) although they do say C++ is supported. Thus, C++ I/O such as cout will need to be replaced with stdio.h code.

Another to-do is to build a graphical interface to access Mumps programs. The appInventor package may help here.