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.

William Overington

Copyright 2002 William Overington

Saturday 2 February 2002

Here is a full list of the basic sequences thus far defined.

Button push sequence Meaning Notes
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
yellow negative data
blue decimal point
red 1 +
red 2 -
red 3 *
red 4 /
red 5 =
red 6 , Please see note below
red 7 ; Please see note below
red 8 : Please see note below
red 9 clear a,b,c,d
red 0 1 a=b
red 0 2 b=a
red 0 3 swap a and b
red 0 4 a=c
red 0 5 c=a
red 0 6 b=c
red 0 7 c=b
red 0 8 swap a and c
red 0 9 swap b and c
red up 0 in a macro, return from a call
red up 1 in a macro, jump to label 1
red up 2 in a macro, jump to label 2
red up 3 in a macro, jump to label 3
red up 4 in a macro, jump to label 4
red up 5 in a macro, jump to label 5
red up 6 in a macro, call to label 6
red up 7 in a macro, call to label 7
red up 8 in a macro, call to label 8
red up 9 in a macro, call to label 9
red down .... (next one not a digit) General escape mechanism so as to allow longer sequences to be defined.
red down 0 in a macro, return from a call, if linkflag is true
red down 1 in a macro, jump to label 1, if linkflag is true
red down 2 in a macro, jump to label 2, if linkflag is true
red down 3 in a macro, jump to label 3, if linkflag is true
red down 4 in a macro, jump to label 4, if linkflag is true
red down 5 in a macro, jump to label 5, if linkflag is true
red down 6 in a macro, call to label 6, if linkflag is true
red down 7 in a macro, call to label 7, if linkflag is true
red down 8 in a macro, call to label 8, if linkflag is true
red down 9 in a macro, call to label 9, if linkflag is true
red left get from memory
As sequences are simply a method of inputting commands using the minimum set of input events, implementation is up to the Java programmer.
However, for programmers who would prefer a specific recommendation, a=m[d] is suggested.
red right store to memory
As sequences are simply a method of inputting commands using the minimum set of input events, implementation is up to the Java programmer.
However, for programmers who would prefer a specific recommendation, m[d]=a is suggested.
red teletext 0
red teletext 1 define label 1 within a macro
red teletext 2 define label 2 within a macro
red teletext 3 define label 3 within a macro
red teletext 4 define label 4 within a macro
red teletext 5 define label 5 within a macro
red teletext 6 define label 6 within a macro
red teletext 7 define label 7 within a macro
red teletext 8 define label 8 within a macro
red teletext 9 define label 9 within a macro
red green 0 clear a
red green 1 a=d
red green 2 d=a
red green 3 b=d
red green 4 d=b
red green 5 c=d
red green 6 d=c
red green 7 clear b
red green 8 clear c
red green 9 clear d
red yellow 0
red yellow 1 a register gets the focus
red yellow 2 b register gets the focus
red yellow 3 c register gets the focus
red yellow 4 d register gets the focus
red yellow 5
red yellow 6
red yellow 7
red yellow 8 Text box gets the focus
red yellow 9 Text area gets the focus
red blue 0 end macro definition
red blue 1 define macro 1
red blue 2 define macro 2
red blue 3 define macro 3
red blue 4 define macro 4
red blue 5 define macro 5
red blue 6
red blue 7
red blue 8
red blue 9
green 1 sine
green 2 cosine
green 3 tangent
green 4 pi
green 5 exponential
green 6 natural logarithm
green 7 sinh
green 8 cosh
green 9 tanh
green 0 1 arcsine
green 0 2 arccosine
green 0 3 arctangent
green 0 4 arctangent2
green 0 5 10 to the power of
green 0 6 base 10 logarithm
green 0 7 squared
green 0 8 square root
green 0 9 random number
green up 0 eutodraw $Z
green up 1 eutodraw $P
green up 2 eutodraw $X
green up 3 eutodraw $Y
green up 4 eutodraw $C
green up 5 eutodraw $M
green up 6 eutodraw $N
green up 7 eutodraw $F
green up 8 eutodraw $E
green up 9 eutodraw $Q
green up red eutodraw $r
green up green eutodraw $g
green up yellow eutodraw $c
green up blue eutodraw $b
green down .... (next one not a digit) General escape mechanism so as to allow longer sequences to be defined.
green down 0
green down 1 in a macro, if a=b set linkflag true, else false
green down 2 in a macro, if a!=b set linkflag true, else false
green down 3 in a macro, if a>b set linkflag true, else false
green down 4 in a macro, if a>=b set linkflag true, else false
green down 5 in a macro, if a<b set linkflag true, else false
green down 6 in a macro, if a<=b set linkflag true, else false
green down 7 in a macro, if a and b may be compared, set linkflag true, else false
green down 8 in a macro, if a and b may not be compared, set linkflag true, else false
green down 9
green left .... (next one not a digit) Function escape mechanism so as to allow longer sequences to be defined for yet even more mathematical functions.
green left 0
green left 1 Bessel function of the first kind
green left 2 Bessel function of the second kind
green left 3 Chebyshev polynomial
green left 4
green left 5
green left 6 absolute
green left 7 floor
green left 8 rounded
green left 9 ceiling
green right ... Entry of a unicode character
green red 0 The E code used for entering very large and very small numbers.
green red 1 convert a from degrees to produce radians
green red 2 convert a from radians to produce degrees
green red 3 convert a from x + iy form to produce r, theta form
green red 4 convert a from r, theta form to produce x + iy form
green red 5
green red 6
green red 7 private use area
green red 8 private use area
green red 9 private use area
green yellow 0 Clear the graphics screen.
green yellow 1 Move the pen without drawing on the graphics screen using the contents of the a and b registers as data.
green yellow 2 Draw a line on the graphics screen using the contents of the a and b registers as data.
green yellow 3 Choose the pen colour using the contents of the a register to give the colour number. The colours are up to the individual programmer, though the colour set in the document ast01300.htm is available for use and if programmers used that set it would assist standardization and also have the advantage of those colours that can do so having the same numerical codes as the well know resistor colour code of electronics. That is, colours are from 0 to 13 for standardized colours and then there are colours 14 and 15 as well if people choose to add them in. The link above is a local link due to problems of fitting a full link into this table. A full link is available after the end of the table.
green yellow 4 Draw a cencharacter located by the present pen position, the shape of the particular cencharacter being determined by the contents of the a register.
green yellow 5 Draw the string from the text box starting at the present pen position.
green yellow 6 Set the text size that is to be used, based upon a number that is contained in the a register. If this command is not used, a default text size is to be provided so that use of green yellow 5 will work properly.
green yellow 7
green yellow 8
green yellow 9
green blue 0
green blue 1 run macro 1
green blue 2 run macro 2
green blue 3 run macro 3
green blue 4 run macro 4
green blue 5 run macro 5
green blue 6
green blue 7
green blue 8
green blue 9

In the description of the "green yellow graphics" system above, the word cencharacter is used. The word cencharacter is a word that I have used for many years. It was the name of a proceduce call in the hardcopy plotter graphics package for the Elliott 803 mainframe computer upon which I first used computer graphics. A cencharacter is one of those small graphics drawn around a point on a scientific graph so that its position can be clearly noticed. There is a circle, a square, a triangle and so on. I remember that cencharacter(4) was a butterfly style design made up of four straight lines, two of which passed through the data point itself, whereas the circle, square and triangle did not actually connect with the data point itself.

In relation to the colour codes mentioned in the "green yellow graphics" system above, where a full link could not be fitted into the table, here is the full link.

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

Here is the note about the use of the commands red 6, red 7 and red 8.

An interesting aspect of the sequences is that the contents of the registers that are entered with these sequences may be any of a number of different mathematical forms provided that the Java calculator program accepts them. For example, a simple calculator would only accept ordinary numbers. However, the sequences provide facilities for entering complex numbers, quaternions, vectors and matrices, including matrices of complex numbers.

The various numerical types are achieved using just three sequences. These are as follows.

red 6 field separator

red 7 column separator

red 8 row separator

In order to enter a complex number such as 1.2 -3.4i into a Java calculator that will accept complex numbers, one would use the following.

1 blue 2 red 6 yellow 3 blue 4

In order to enter a two by two matrix which has a first row that contains 1 2 and a second row that contains 3 4 one would enter the following.

1 red 7 2 red 8 3 red 7 4

A quaternion would be entered using three red 6 sequences between four numbers.

Here is a link to the document with some four character sequences and some notes, including the notes relating to the optional use of this system in conjunction with the Astrolabe Channel numerical pointer.

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 3 of 3.

 

Astrolabe Channel

Copyright 2002 William Overington

This file is accessible as follows.

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