Sequences of push button pushes to input information to Java Calculator Programs on the DVB-MHP platform using the minimum set of input events, part 1 of 3.

William Overington

Copyright 2002 William Overington

Saturday 2 February 2002

An interesting topic that has arisen in the field of content creation for telesoftware services that are to be broadcast on the DVB-MHP platform is as to how the twenty buttons of the minimum set of input events may be used in particular Java programs in order to enter data of various types.

On 30 July 2001 the present author posted the following in the forum at http://forum.mhp.org as a suggested standard for entering numerical data.


Entering numerical data a suggested standard

I write to suggest the following as a standard for entering numerical data into a program using a hand held infra-red control device.

Scenario:

An end user is being invited to enter numerical data into a program using a hand held infra-red control device.

Standard:

VK_COLORED_KEY_2 (often yellow in colour) is used to enter a minus sign when the numerical value is negative.

VK_COLORED_KEY_3 (often blue in colour} is used to enter a decimal point when the numerical data requires a decimal point.

Reasoning: The entering of numerical data into a program may require an end user to enter a negative sign and may require an end user to enter a decimal point.

As there are no specific keys within the minimum set of user input events for these facilities, I feel that it would be better to have a widespread generally known about standard for entering a minus sign and a decimal point rather than for programmers to need to devise their own local standard for a particular program whenever the need arises. End users will benefit as programs involving entering a minus sign and a decimal point will have a standard way of working to which end users could become accustomed.

William Overington

30 July 2001


Since that time the present author has devised the Astrolabe Channel numerical pointer, which seeks to use the twenty buttons of the minimum set of input events to generate mouse events that appear to the Java program identically as if they were generated using a real mouse unit.

The Astrolabe Channel numerical pointer is described in other documents in this series.

This present document puts forward a design for a standardized system of using the twenty push buttons of the minimum set of input events in order to produce calculator programs and pop-up calculators for use within packages, such as educational packages.

The system is a stand alone system that does not need to be used in conjunction with the Astrolabe Channel numerical pointer and would normally be used quite separately from an Astrolabe Channel numerical pointer. However, the system is designed so as not to conflict with an Astrolabe Channel numerical pointer so that if it is desired to install a pop-up calculator and an Astrolabe Channel numerical pointer within the same Java program then that is entirely possible. A note on the use of this system with an Astrolabe Channel numerical pointer is added later in this document for those readers who are interested: however, knowledge of the Astrolabe Channel numerical pointer system is not needed in order to use this present system.

The system is designed to be comprehensive and also to be capable of later expansion.

The intention is that a programmer will make a design choice as to how much of the system to use for the particular application. For example, an ordinary calculator may not implement functions such as sines and cosines and will just use ordinary real numbers. Button sequences that are not implemented will just do nothing, yet will be recognized as do nothing codes for that particular calculator.

At the other extreme, the system is designed to be able to understand an intention of an end user to enter a quaternion and calculate its logarithm.

Between these two extremes are such features as calculations involving complex numbers.

The system also provides several private use codes so that the system may be used for setting up a calculator that carries out specialized calculations by an individual programmer if so desired.

The system could also be used as a method of data entry for spreadsheets and databases if so desired.

The idea is to provide a system such that, in a variety of programs by a variety of authors, end users can get used to a consistent look and feel for input to calculators that are provided.

An important design feature is that a particular type of calculator is not specified. The purpose of this system is to provide a standardized method of being able to enter information into a calculator program using a twenty button key pad that carries just the twenty buttons of the minimum set of input events of a DVB-MHP terminal.

The model, introduced later in this document, of pebbles upon a base plane and pebbles upon discs and pebbles upon discs that are themselves on discs will hopefully be a useful way in which end users can envisage the system and that the thus envisaged model will make the system easy to use.

My thinking has been influenced by something that I read on a web page at http://www.abstractgamesmagazine.com where there is the statement that follows, in a graphic by Cameron Browne.

quote

There are many interesting and original abstract games about which very little has been written. We believe these fascinating and beautiful games deserve greater attention--they are a neglected artform which is both intellectual and interactive.

end quote

The word artform influenced me quite strongly. I had not previously thought of abstract games, such as chess and rithmomachia, as being an artform. Yet the word artform seems just right. This has influenced me to think of this coding system as a work of art and that manner of thinking has hopefully influenced the design of the coding system for the better. So, although it is functional, it is also a work of art to be enjoyed and delighted in for its abstract structure.

The coding system may be looked at as follows. There is a base plane. On the base plane are ten grey pebbles, numbered from 0 to 9. Each pebble is an input command that can be obeyed. Also on the plane is a red disc, of a small thickness. On top of the red disc are nine grey pebbles, numbered from 1 to 9. Each pebble is an input command that can be obeyed. Thus, so far, there are nineteen grey pebbles, each different. These represent commands that can be obeyed. They are selected by either one push button press of a digit button; or by two button push presses, the first being of the red button and the second being of a digit button from 1 to 9.

On top of the red disc, separately from the nine pebbles, is a smaller disc called a zero disc. On top of this zero disc are nine grey pebbles, numbered from 1 to 9. Each pebble is an input command that can be obeyed. Thus, so far, there are twenty-eight grey pebbles, each different. They are selected by either one push button press of a digit button; or by two button push presses, the first being of the red button and the second of a digit button from 1 to 9; or by three button pushes, the first being of the red button and the second being of the digit 0 button and the third of a digit button from 1 to 9.

On top of the red disc there are also, separately from the zero disc and the pebbles, and from each other, a green disc, a yellow disc and a blue disc. Each of these three discs has ten pebbles on top of it, numbered from 0 to 9. This is because three button pushes is the normal maximum number of button pushes needed to enter one command to the calculator, so 0 is used here as an extra command. A pebble numbered 0 was not used on top of the zero disc so as to avoid two successive pushes of the same digit button being needed. Indeed, this avoidance of two successive pushes of the same button being used is the normal practice in this system.

On top of the red disc there are also two pebbles designated left and right.

Returning to the base plane, there is, separately from the red disc, a green disc on the base plane. This is a different green disc to the green disc that is on top of the red disc mentioned previously. On top of this new green disc are nine grey pebbles, numbered from 1 to 9.

On top of this new green disc, there are also a red disc, a zero disc, a yellow disc, a blue disc, a disc designated left and a disc designated right. Please note that the green disc has discs designated left and right on top of it, whereas the red disc did not have discs designated left and right on top of it but had pebbles designated left and right upon it instead. This is because the push button sequence red, left is a complete command whereas the push button sequence that starts green, left needs a digit from 0 through to 9 added to it in order to produce a command. This was a design decision by the present author so that red left and red right would both be commands with only two button pushes for speed of use in using memory storage, as the red right command is used for storage of data in memory and the red left command is used for retrieval of data from memory and may be used a lot in some circumstances.

On top of the zero disc there are nine grey pebbles, numbered from 1 to 9.

Each of the discs red, yellow, blue and left has ten grey pebbles on top of it, numbered from 0 to 9.

The right disc has upon it a unicode courtyard similar to that in the Astrolabe Channel numerical pointer. That is, various keys may be pushed in order to produce a unicode character. The keys that may be used are 0 through to 9, red, green, yellow, blue, left, right in order to represent the hexadecimal characters 0 through to f respectively. Also, if available, VK_COLORED_KEY_4 may also be used to express hexadecimal e and VK_COLORED_KEY_5 may also be used to express hexadecimal f if these keys are available on the particular hand held infra-red control device and set top box combination that is being used, though in that case the left and right buttons should nevertheless still be programmed to be able to be used for e and f so that the Java calculator program can be used on terminals that only have four coloured buttons.

My own suggestion is that VK_COLORED_KEY_4 should be magenta and that VK_COLORED_KEY_5 should be orange, yet those are only my suggestion.

The unicode courtyard has within it just one pebble, designated as Enter, for a pebble represents a command to the calculator and the only command produced as output from this unicode courtyard is a unicode character and that is done when the Enter button is pushed. This is because various numbers of hexadecimal characters will need to be entered in order to produce various unicode characters.

Returning to the base plane. The base plane also has pebbles for up, down, left, right and for Enter and for Teletext and for yellow and blue. The yellow and blue pebbles are the only two coloured pebbles on the base plane. There are a few coloured pebbles elsewhere in the system. For example, the commands used for defining a special drawing colour in the eutodraw system. The use of the coloured pebbles there was a happy result of needing to implement fourteen eutodraw commands and four of them involving defining a special drawing colour in the eutodraw system using red, green and blue values. So, using red, green and blue pebbles for entering the red, green and blue values and the colour that remained, namely yellow, for entering the colour number seemed a good choice that both solved the problem of including fourteen commands as a collection and also provided a colourful, user friendly result.

The reader may observe that there are only two discs that sit directly upon the base plane, namely a red disc and a green disc. Upon those discs, however, there are already various other discs.

Thus overall, there are many pebbles in the structure, each of which represents a command, and those pebbles are also either on the base plane or at a height above the base plane, which height, at present, is either one disc thickness above the base plane or two disc thicknesses above the base plane.

Although each command is separate from other commands, there are some broad areas of designation.

The base level red disc is used largely to group together the basic calculator functions of arithmetic, movement between registers, and memory storage. There are also commands to allocate the focus to various registers if that is what is the chosen manner of operation of the particular kind of calculator implemented.

The base level green disc is used largely to group together mathematical functions, character input and graphics.

The pebbles on the base plane are used to input data, digits, negation sign and decimal point, and to input cursor movements up, down, left and right. The Enter key is used to leave the universe and continue, the Teletext key is used to leave the universe and to go back to the part of the program where it was previously.

In addition, above the base plane, the left key is used with a sense of getting some information into the a register from somewhere else. The yellow discs are used to indicate a command that is concerned with the display rather than an actual computation. Red then yellow leads to commands that affect the focus of where input is to be placed and green then yellow leads to graphics commands that enable the user to produce plots of data. Blue discs are used so as to provide a programmable calculator system: red then blue leads to commands that define a macro, green then blue leads to commands that run a macro.

The teletext button has not thus far been used anywhere in this system except to leave it. It occurs to me that if the teletext button is used to define labels in macros, and only ever used in the command system for that purpose, then when a macro that contains a loop is being used and a jump takes place, that it would be easy to find the destination label just by searching through the stored code and to look at the character following a teletext button character to determine whether that is the required label. So, I add a disc designated teletext to sit upon the red disc that sits on the base plane. That teletext disc has ten pebbles upon it, numbered from 0 to 9. These commands define a label, and are only of use in defining macros. There is specifically no disc designated teletext sitting on the green disc that sits on the base plane, so that if the teletext button is found in searching through a macro stored as characters then the character previous to it need not be examined.

Calls to subroutines are also possible.

How are conditional jumps and calls programmed? By having a linkflag and jumping on the boolean state of the linkflag. The jumps are programmed as red up and a digit and as red down and a digit. It may be a helpful method of remembering that red up and a digit is used for unconditional jumps and calls and that red down and a digit is used for conditional jumps and calls by thinking that when a conditional jump or call is obeyed, the system needs to look down at a piece of paper to know whether to jump or not.

The system, being for a small scale programmable calculator, has nine labels defined. Jumps are possible to labels 1 through to 5 and calls are possible to labels 6 through to 9.

In the tables that follow, the colours red, green, yellow, blue respectively are used for VK_COLORED_KEY_0, VK_COLORED_KEY_1, VK_COLORED_KEY_2, VK_COLORED_KEY_3 respectively, though the system is not affected by whatever colour those keys happen to be coloured.

The calculator operates in its own calculator universe. Entry to the calculator universe is either by a Java calculator program starting up in the calculator universe or by a Java program entering the calculator universe as it prompts the end user to carry out some calculation or by the user initiating entry to the calculator universe as a pop-up calculator by pushing a button on the hand held infra-red control device. In the latter case, the choice of button is up to the programmer, though people who would like to have a suggestion made may like to consider using VK_COLORED_KEY_0 for this purpose. This is the key that is often coloured red.

Here is a general overview of the types of sequences, in a dictionary order based on the order of the buttons in the minimum set of input events in the DVB-MHP specification and my use of specific colours for the VK_COLORED_KEY_ buttons as mentioned above. The order is 0 1 2 3 4 5 6 7 8 9 up down left right enter teletext red green yellow blue.

Please note that the first button of a sequence is always red or green.

Two button sequences and those three button sequences that have as their second character 0, left, right, red or green are more fundamental that those button sequences that have as their second character up, down, yellow, blue or teletext.

There is, quite deliberately, no sequence that starts green teletext, as red teletext sequences each specify a label in a macro and so by not having green teletext sequences, wherever the teletext button is used in a sequence that use must be a label.

Of the more fundamental sequences, those that start with red are more basic to arithmetic and moving between registers, those that start with green are more mathematical.

Sequences that have blue as the second button push are solely to do with defining and running macros.

First button push Second button push number of button pushes in the sequence Notes
red 2 arithmetic, data entry and clear all registers
red 0 3 movement between registers
red up 3 in a macro, unconditional return, unconditional jumps and unconditional calls
red down (3)4..n and 3 General escape mechanism and in a macro, conditional return, conditional jumps and conditional calls
red left 2 get from memory, no third character used
red right 2 store in memory, no third character used
red green 3 clear registers individually and manipulations involving the d register
red yellow 3 focus
red blue 3 define macros
red teletext 3 in macros, define a label
green 2 mathematical functions
green 0 3 more mathematical functions
green up 3 eutodraw commands
green down (3)4..n and 3 General escape mechanism and also comparisons, to assist conditional return, conditional jumps and conditional calls
green left (3)4..n and 3 Function escape mechanism and yet more mathematical functions
green right 3..9 unicode courtyard
green red 3 The E code of entering very large and very small numbers, degrees to radians, radians to degrees, complex to r, theta and r, theta to complex
green yellow 3 simple graphics system
green blue 3 run macro

A table detailing the meanings of individual sequences is in the following document.

Sequences of push button pushes to input information to Java Calculator Programs on the DVB-MHP platform using the minimum set of input events, part 2 of 3.

 

Astrolabe Channel

Copyright 2002 William Overington

This file is accessible as follows.

http://www.users.globalnet.co.uk/~ngo/ast02100.htm