Changes to the software interrupt in the 1456 object code system.

William Overington

Copyright 2000 William Overington

On 14 October 2000 the following note is added to the document entitled "The software interrupt in the 1456 object code system." and published on the internet.

---- Start of quotation ----

Supplementary note added on 14 October 2000.

I have altered the meaning of the ? command to the following extent. When a zero or negative value is in the bi1456 register at the time of the software interrupt, the software interrupt parameter takes the value of the ai1456 register minus the value of the bi1456 register. The result may be positive, zero or negative. The software that I have used in my own implementation of the 1456 engine is as follows.

            if (c == '?')
              {
                if (bi1456 > 0)
                  {            
                    softwareinterruptparameter=bi1456;
                  }
                else // if bi1456 is zero or negative
                  {
                    softwareinterruptparameter=ai1456 - bi1456;
                  }
              }

I am aware that, although I have previously added instructions to 1456 object code that this is the first time that, for the present 1456 object code system, that I have altered the meaning of a command after it has been published. This raises various issues. Accordingly, as well as this supplementary note added to a previously published document for the benefit of people reading this document for the first time on or after 14 October 2000, I am writing an additional new document drawing attention to this change and placing it next in the sequence of documents so that people who have already read this document before the addition of this supplementary note will become aware of the change. Issues concerning the changing of the definition of a previously published command are also mentioned as well as an explanation of the reasons for the change.

---- End of quotation ----

This is the additional new document referred to in the supplementary note quoted above. If you are reading this, then the 1456 engine file, Engine1456.class, on the web space has already been updated.

In designing the 1456 object code system I have been conscious that if it is to become a widely accepted type of standard system for the programming of Java applets for telesoftware and for the internet by means of including 1456 object code in parameters of an applet call on HTML pages, then it must carefully balance compactness with the potential to be able to perform a wide range of computations effectively. I am also aware that if 1456 object code is to become a type of standard system then it must be stable and not subject to any changes that makes previously written 1456 object code programs run differently than when they were written. Accordingly I have taken care to give consideration to this situation while adding these changes to the 1456 object code system. The key issue is as to whether the changes will make any programs run differently. Programs will only run differently if they are being run with a particular 1456 applet landscape that uses either zero or a negative number as the integer that is the software interrupt parameter and that that parameter value is used. For example, someone could have a 1456 applet landscape with just one function provided in the software interrupt service routine and might therefore just use ? as the means of accessing that function, without checking the value of the software interrupt parameter, with the effect that, although the software interrupt parameter would have been zero, the fact of it being zero were immaterial. At a practical level I imagine the chance of someone having explicitly used zero or a negative value as a software interrupt parameter value and treating that value as significant to be either zero or between zero and extremely small. Another possibility is that someone might use a software interrupt and check the software interrupt parameter for some particular value and if that value is not used, then carry out some default action. Thus, say, 1180? and 1240? used as software interrupt parameters to switch to 18 point and 24 point sans serif type for drawing, with anything else presumed to be for 12 point. Well, ? in those circumstances would previously have given the 12 point and now would give either the 12 point or possibly the 18 point or the 24 point if either of the numbers 1180 or 1240 happened, by chance, to be in the ai1456 register at the time.

The heading of this document and the text refer to changes, in the plural, whereas the quoted piece of software has but one change. This is because the changes are really two changes, one for a zero software interrupt parameter and one for a negative software interrupt parameter. As it happens, the one part of the software handles both cases.

The changes arose as follows. I was thinking about how to implement some of the functions that involve selecting part of an image file, stored off screen, and placing that part onto the screen, with the 1456 programmer having full control of the process. I have deliberately avoided loading images into the 1456 engine, leaving image adding facilities for the 1456 applet landscape designer and having a software interrupt used to add the image, getting parameters from a known place. However, as I have learned more about drawing images and selecting parts of images, I have begun to think in terms of whether image control should be as part of the eutodraw system. I have decided against that route as it would require a $E command to send a software interrupt within its action and that could cause problems. So, I am now thinking of a eutoimage table to be located in a 1456 applet landscape or landscapes that provide image handling facilities and have the software available as a standardized function that can be copied into a 1456 applet landscape if so desired. I could also provide a variant of the Print1456 1456 applet landscape, with a new name, as an example available for general use by 1456 programmers who use ready prepared 1456 applet landscapes and do not prepare their own 1456 applet landscapes.

So I began to think of how a software interrupt could carry data from the ai1456 register out as part of the software interrupt parameter. The software sequence 99&>99&<? would achieve the result, yet is somewhat inelegant, so I decided that to use ? on its own would be suitable, which involved the first change to the meaning of the ? command. That is, if the software interrupt parameter would be zero, then it could have instead the value of the ai1456 register. This could also be useful for font selection, where one could use typeface codes of 1 for sans serif, 2 for serif, 3 for monospaced; 12, 18, 24, 36, 48, 60, 72 as point sizes; 0 for plain, 1 for bold, 2 for italic, 3 for bold italic, and then add together in ai1456 1000 times the type face code, 10 times the point size, and the type style and then use ? in order to get that font, provided that the particular 1456 applet landscape in use supported those fonts. For example, Print1456 supports only sans serif in plain and italic.

The design idea that I have for the eutoimage table, which would be located in some 1456 applet landscapes, is that different parameters would be entered using different codes so that, say, perhaps a software interrupt parameter of between 40000 and 59999 would be for the eutoimage table. Within that, 41000 to 41999 might be to place a value between 0 and 999 into some particular specified place in the eutoimage table. So, placing a value into ai1456 and then adding 41000 to ai1456 and then using a ? command would set the required value into the software interrupt parameter. However, suppose that one wishes to send the same value that is in ai1456 to two different places in the eutoimage table. One would then have to subtract the 41000 out and add in another number, say 42000 or whatever, or add the difference, say 1000 in this example, which could be tedious. So I have added the facility that if the value of the software interrupt parameter would be negative, then the value of the software interrupt parameter would be the value of the ai1456 register with the original negative value that was in bi1456 subtracted from it. This use of negative numbers and subtractions makes the system look more complicated than it really is in practice, so let us look at the situation in another way. Suppose that we wish to send a software interrupt with a software interrupt parameter of 41180 where the 41180 is really a screen coordinate value of 180 and the 41000 is really a code of 41 multiplied by 1000 in order to pack two items of data into one software interrupt parameter. All that one does is have the value of 180 in ai1456 and use the software !-41000? to cause the software interrupt. Sending 180 to two places in the eutoimage table would then be simply to have the value of 180 in the ai1456 register and use the software such as !-41000?!-42000? to cause the two software interrupts. Direct adding of data to the eutoimage table could be achieved using 41180?42180? if so desired. In designing the eutoimage table, the intention is that the underlying Java drawImage features will be available, and also, in addition, a few features to facilitate a policy of providing some images as a gif file containing twenty or so smaller images, like a tray of type sorts, so that a user downloading files to local storage need only download one gif file rather than many gif files. Software interrupt parameter values will be used to select an image from such a type tray by index number without the 1456 program needing to compute the place of the illustration in the type tray directly.

1456 object code

Copyright 2000 William Overington