Using 1456 applet landscapes which have screen components.

William Overington

Copyright 2000 William Overington

Thus far all 1456 object code programs have been regarded as starting at label 1. Label 1 is the place at which the 1456 engine begins running at the load time of the HTML page. With a 1456 applet landscape that has just a plain background with no buttons or other items supplied upon it, some 1456 software commencing at label 1 and ending with an H command is all that is required.

When a 1456 applet landscape is supplied with active elements, additional 1456 software is required to define the action that is to be taken when each active element is clicked or altered by using the mouse or by using the keyboard. The general approach is that the specific element activated is represented in the Java software by an integer named obeycode. Each element produces a different value of obeycode. The value of obeycode is set as 1 at start up. Running of 1456 object code is achieved by instructing the 1456 engine to obey the 1456 object code located at some particular label. The label number to be used is the value of obeycode at the time.

This is not as difficult as it may sound as the 1456 applet landscape will specify in its documentation what is required. For example, the 1456 applet landscape Button1456.class has one button and upon the button being clicked, the 1456 object code at label 51 will be obeyed.

Thus, in using Button1456.class as the 1456 applet landscape one simply needs to define 1456 software starting at label 1 and 1456 software starting at label 51 and make sure that each piece of software ends with an H command. The two pieces of software may each call the same subroutines if so desired.

In the document entitled "The 1456 object code system." mention was made of the inclusion of 1456 object code in one or more param statements of an applet call.

An example was given of a minimal program.

<applet code="Applet1456.class" width=300 height=500>
<param name="SOFTWARE01" value="1:H">
</applet>

Software can be included in SOFTWARE02 and SOFTWARE03 and so on according to which parameters are allowed for the particular 1456 applet landscape being used. Software may run over between adjacently numbered SOFTWAREnn parameters provided that there is no split within a label definition, as label definitions are compiled at load time as soon as each SOFTWAREnn string is loaded. That is, the numerical digits and the : character of a label definition must be within the same SOFTWAREnn parameter.

It can be convenient to use a separate SOFTWAREnn parameter for each entry point.

For example, where one has label 1 for start up and label 51 for a button being clicked, one might use a structure such as follows.

<applet code="Button1456.class" width=300 height=500>
<param name="SOFTWARE01" value="1:H">
<param name="SOFTWARE02" value="51:H">
</applet>

When using a 1456 applet landscape which has screen components, the practice is that if the screen component generates any numerical data then it is arranged that that data is supplied to the 1456 engine by a software simulation of direct memory access, in that values of, say, the position of a scrollbar with, say, an obeycode of 81, will be loaded into memory location mi1456[1] shortly before the 1456 engine is asked to obey the 1456 object code located at label 81 in the 1456 object code stored in the 1456 engine. In a similar manner, when the 1456 engine completes the running of the obeySoftwareAtLabel method for that particular event, the 1456 applet landscape may be programmed to extract data by simulated direct memory access from the memory of the 1456 engine and use it as desired, perhaps by displaying it in a text box or in the state of a checkbox. A 1456 object code programmer can only produce Java quality output using such 1456 applet landscapes as are available for use.

Where a 1456 applet landscape has two buttons each button will have a separate value of obeycode associated with it, for example 51 and 52; and 1456 object code at labels 1, 51 and 52 will need to be supplied. Similarly, with a 1456 applet landscape with four buttons each button will have a separate value of obeycode associated with it, for example 51, 52, 53 and 54; and 1456 object code at labels 1, 51, 52, 53 and 54 will need to be supplied. When checkboxes are being used, either each checkbox may have, at the choice of the designer of the particular 1456 applet landscape, one obeycode, with the fact of whether the checkbox is checked or unchecked passed by simulated direct memory access as an integer to the 1456 engine; or each checkbox may have two obeycodes associated with it, one to be used when the checkbox becomes checked and one to be used when the checkbox becomes unchecked. The use of two obeycodes means that different sections of 1456 object code may be programmed at two different labels within the 1456 object code. It should be remembered that such software may call subroutines, so this can be a very efficient mechanism to cause 1456 object code to react to checkbox events.

For specialized 1456 applet landscapes, a collection of several obeycodes may be used to allow the Java software within the 1456 applet landscape to take a lot of the processing work from the 1456 object code. For example, suppose that the x and y coordinates of the mouse have been determined at a mouse pressed event. One scenario is that a general purpose 1456 applet landscape might pass the values of x and y to the 1456 engine by simulated direct memory access into mi1456[1] and mi1456[2] and then cause the 1456 engine to obey the 1456 software at label 41. A specialized 1456 applet landscape might, say, process the values of x and y and decide which of four different areas of the screen the mouse is upon, set the value of obeycode to be one of four values according to which area the mouse is upon, pass the coordinates of the mouse relative to some point on that area to the 1456 engine by simulated direct memory access and then cause the 1456 engine to obey 1456 object code at one of four different labels.

Any variation of the choice of screen components and any choice of layout that cannot be controlled by the use of parameter statements in an HTML file will require the production of a different 1456 applet landscape before such a choice of screen components and layout may be used.

1456 object code

Copyright 2000 William Overington