Some additional features of the 1456 object code system.

William Overington

Copyright 2000 William Overington

As development of the 1456 object code system and the writing of experimental 1456 object code programs has proceeded the desirability of adding a few additional features to the system has become apparent.

These are all additional features and do not alter anything that has been stated previously, except that previous lists of functions and features are not complete lists.

The first addition is the addition of the a and &a commands. The a command places into ad1456 the absolute value of the contents of ad1456. The &a command places into ai1456 the absolute value of the contents of ai1456. There can be a problem if the very most negative integer that can be represented as a Java int is in ai1456, when the same very negative number can be returned instead of the positive value. I mention this as it is included in the Java documentation. For most computations involving integer values this will present no problems whatsoever.

The next addition is the adding of the !T command. This gives the arctangent with two arguments, namely the numerator and the denominator of a ratio, with the numerator in ad1456 and the denominator in bd1456. The result is placed in ad1456. The !T command must be used immediately after the denominator is placed in the bd1456 register. This makes the !T command a little different in its availability to the other mathematical functions. Nevertheless, I felt that its inclusion might potentially be of value, so I have included it. It is produced directly from the Java method Math.atan2(a,b).

Having decided to add the !T function which uses two variables, I decided to add a few more functions that use two arguments, using both the a and b registers of the 1456 engine.

The !P command is the 1456 object code implementation of the Java method Math.pow(a,b). The !P command places into ad1456 the value of ad1456 raised to the power of bd1456.

The !^ and !v commands implement the max and min functions of Java for Java double variables. Although the letter v is a letter of the alphabet and thus not intended as a downward arrow, nevertheless it is useful as a downward arrow in these instructions. The !^ command places into ad1456 the greater of ad1456 and bd1456. The !v command places into ad1456 the lesser of ad1456 and bd1456.

The &^ and &v commands implement the max and min functions of Java for Java int varaibles. The &^ command places into ai1456 the greater of ai1456 and bi1456. The &v command places into ad1456 the lesser of ai1456 and bi1456.

Another addition, which does not directly affect 1456 programmers directly, is the provision of the methods shown below.

//  public char obeySoftwareAtLabelNoEutodraw(int entrylabel)
//  public char obeySoftwareAfterSoftwareInterruptNoEutodraw()
//  public char obeySoftwareNoEutodraw()

//  private void obeyOtherThanEutodrawCommands()
//  private void obeyEutodrawCommands(Graphics screen)

This has meant some restructuring of the internal structure of the software of the 1456 engine, which is written in Java, so that the commands of the eutodraw system, that is, those two character commands that begin with a $ character, are obeyed in a different function to all of the other 1456 object code commands. The reason for these changes is that it enables the designer of a 1456 applet landscape to run software in the 1456 engine without the call to the 1456 engine being within the paint function of the 1456 applet landscape. The price of doing this is that such 1456 object code cannot contain eutodraw commands. They should not be included in such 1456 software. However, if they are included they need to be ignored, so software is added to the obeySoftwareNoEutodraw method so that if a $ command is included, both it and the next character in the 1456 object code are ignored.

My thinking is that a 1456 applet landscape could potentially have a thread running which uses the paint function and produces graphic output continuously, with the nature of the graphics output affected by whether the user clicks buttons on the screen and so on. The clicking of buttons could be used to activate small pieces of 1456 object code without needing to take command of the paint function. So the facility is provided.

There are several additions to the eutodraw system. The first is that the contents of ai1456 may be printed on the screen by action code 32, in a similar manner to the printing on the screen of the contents of ad1456 by action code 31. A control code in the range 3200 to 3299 would be used.

The action code 99 is defined so that the name of the author of the 1456 engine software will be printed on the screen. Authors of 1456 engines that run according to the 1456 object code specification may include authorship details in the 1456 engine so that they can be accessed in this manner. A control code in the range 9900 to 9999 would be used.

The action code 98 is defined so that the name of the author of the 1456 applet landscape currently being used in conjunction with the 1456 engine will be printed on the screen. Authors of 1456 applet landscapes may load authorship details into the 1456 engine so that they can be accessed in this manner. As the author of a 1456 applet landscape may well not be the same person as the author of the 1456 engine with which it is run, the 1456 engine provides a method so that the author of a 1456 applet landscape may include in the 1456 applet landscape authorship details of the 1456 applet landscape and load them into the 1456 engine.

//  public void landscapeAuthorIs(String landscapesoftwareauthor)

A control code in the range 9800 to 9899 would be used.

Both action codes 98 and 99 also use x and y coordinates, just as if an action code of, say, 69 were being used.

Here is an updated list of the functions of the 1456 engine.

//  public class Engine1456

//  public Engine1456()

//  public void loadSoftwareFromAppletParameters(String stringofsoftwarefromparameters)
//  public void loadSoftwareFromString(String stringofsoftware)
//  public void loadStringFromString(int i,String stringoftext)

//  public char obeySoftwareAtLabel(Graphics screen,int entrylabel)
//  public char obeySoftwareAfterSoftwareInterrupt(Graphics screen)
//  public char obeySoftware(Graphics screen)

//  public char obeySoftwareAtLabelNoEutodraw(int entrylabel)
//  public char obeySoftwareAfterSoftwareInterruptNoEutodraw()
//  public char obeySoftwareNoEutodraw()

//  public void ad1456Set(double doublevalue)
//  public double ad1456Get()
//  public void double1456Set(int i,double doublevalue)
//  public double double1456Get(int i)

//  public void ai1456Set(int integervalue)
//  public int ai1456Get()
//  public void integer1456Set(int i,int integervalue)
//  public int integer1456Get(int i)

//  public void ac1456Set(char charvalue)
//  public char ac1456Get()
//  public void char1456Set(int i,char charvalue)
//  public char char1456Get(int i)

//  public void as1456Set(String stringvalue)
//  public String as1456Get()
//  public void string1456Set(int i,String stringvalue)
//  public String string1456Get(int i)

//  public int softwareinterruptparameterGet()

//  public void landscapeAuthorIs(String landscapesoftwareauthor)

//  private void loadSoftware()

//  private void obeyOtherThanEutodrawCommands()
//  private void obeyEutodrawCommands(Graphics screen)

1456 object code

Copyright 2000 William Overington